Skip to content

Commit

Permalink
update GitHub actions (#7)
Browse files Browse the repository at this point in the history
- update GitHub actions
- minor edits
  • Loading branch information
RobTillaart authored Apr 6, 2024
1 parent 7d7ca52 commit 158de1b
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# These are supported funding model platforms

github: RobTillaart
github: RobTillaart
custom: "https://www.paypal.me/robtillaart"

3 changes: 2 additions & 1 deletion .github/workflows/arduino-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: arduino/arduino-lint-action@v1
with:
library-manager: update
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/arduino_test_runner.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
---

name: Arduino CI

on: [push, pull_request]

jobs:
runTest:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- run: |
gem install arduino_ci
arduino_ci.rb
arduino_ci.rb
5 changes: 3 additions & 2 deletions .github/workflows/jsoncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ on:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
uses: limitusus/json-syntax-check@v2
with:
pattern: "\\.json$"

8 changes: 4 additions & 4 deletions AnalogKeypad.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FILE: AnalogKeypad.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.2.4
// VERSION: 0.2.5
// DATE: 2019-01-31
// PURPOSE: Class for (Robotdyn) 4x4 and 4x3 analog keypad

Expand All @@ -19,10 +19,10 @@
// Other may have 12 or even 16 bits.


AnalogKeypad::AnalogKeypad(const uint8_t pin, const uint8_t bits)
AnalogKeypad::AnalogKeypad(const uint8_t analogPin, const uint8_t bitsADC)
{
_analogPin = pin;
_analogShift = bits - 8;
_analogPin = analogPin;
_analogShift = bitsADC - 8;
_lastKey = NOKEY;
}

Expand Down
7 changes: 4 additions & 3 deletions AnalogKeypad.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// FILE: AnalogKeypad.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.4
// VERSION: 0.2.5
// DATE: 2019-01-31
// PURPOSE: Class for (Robotdyn) 4x4 and 4x3 analogue keypad
// URL: https://github.com/RobTillaart/AnalogKeypad
Expand All @@ -11,7 +11,7 @@
#include "Arduino.h"


#define ANALOGKEYPAD_LIB_VERSION (F("0.2.4"))
#define ANALOGKEYPAD_LIB_VERSION (F("0.2.5"))

#define NOKEY 0x00
#define PRESSED 0x80
Expand All @@ -23,7 +23,8 @@
class AnalogKeypad
{
public:
explicit AnalogKeypad(const uint8_t pin, const uint8_t bits = 10);
// bits is resolution of the internal ADC.
explicit AnalogKeypad(const uint8_t analogPin, const uint8_t bitsADC = 10);

// returns 0 if no key pressed
// otherwise returns key pressed first => ignoring fluctuations
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.2.5] - 2024-04-06
- update GitHub actions

## [0.2.4] - 2023-10-17
- update readme.md (badges)


## [0.2.3] - 2023-01-21
- update GitHub actions
- update license 2023
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2023 Rob Tillaart
Copyright (c) 2019-2024 Rob Tillaart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ the **MAGIC NUMBERS** in the function **rawRead()**.

#### Constructor

- **AnalogKeypad(const uint8_t pin, const uint8_t bits = 10)** constructor, pin is typical A0 etc.
Bits has a default of 10, but need to be set to match the platform.
If bits < 8 then the internal shift would be large causing all reads to return 0 or so.
- **AnalogKeypad(const uint8_t analogPin, const uint8_t bitsADC = 10)** constructor,
analogPin is typical A0 etc. BitsADC has a default of 10, but need to be set to match the platform.
If bits < 8 then the internal shift would be too large causing all reads to return 0 or so.


#### polling interface
Expand Down
1 change: 0 additions & 1 deletion examples/analogKeypad/analogKeypad.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// PURPOSE: demo 4x4 analogue keypad
//
// https://www.tinytronics.nl/shop/nl/arduino/accessoires/robotdyn-keypad-4x4-matrix-analoog?search=matrix
//


#include "AnalogKeypad.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// PURPOSE: demo 4x4 analogue keypad
//
// https://www.tinytronics.nl/shop/nl/arduino/accessoires/robotdyn-keypad-4x4-matrix-analoog?search=matrix
//


#include "AnalogKeypad.h"
Expand Down
1 change: 0 additions & 1 deletion examples/analogKeypad_values/analogKeypad_values.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// FILE: analogKeypad_values.ino
// AUTHOR: Rob Tillaart
// PURPOSE: helper for adjust 4x4 analogue keypad MAGIC numbers
//


#define ANALOGPORT A0
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/AnalogKeypad"
},
"version": "0.2.4",
"version": "0.2.5",
"license": "MIT",
"frameworks": "*",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=AnalogKeypad
version=0.2.4
version=0.2.5
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino Library for (Robotdyn) 4x4 and 4x3 AnalogKeypad
Expand Down

0 comments on commit 158de1b

Please sign in to comment.