Skip to content

Commit

Permalink
Fix #41, update examples (#42)
Browse files Browse the repository at this point in the history
- Fix #41, update examples
- update keywords.txt
  • Loading branch information
RobTillaart authored Apr 16, 2024
1 parent 44876b6 commit 6ad5805
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 20 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.2.3] - 2024-04-16
- Fix #41, update examples
- update keywords.txt

## [0.2.2] - 2024-01-08
- Update readme with advanced interrupts insights
- add example
- Fix URL in examples
- minor edits


## [0.2.1] - 2023-12-29
- Fix #34 change addresses in examples.
- add range check to **setAddress()**.
Expand Down
2 changes: 1 addition & 1 deletion PCF8575.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// FILE: PCF8575.cpp
// AUTHOR: Rob Tillaart
// DATE: 2020-07-20
// VERSION: 0.2.2
// VERSION: 0.2.3
// PURPOSE: Arduino library for PCF8575 - 16 channel I2C IO expander
// URL: https://github.com/RobTillaart/PCF8575

Expand Down
5 changes: 3 additions & 2 deletions PCF8575.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FILE: PCF8575.h
// AUTHOR: Rob Tillaart
// DATE: 2020-07-20
// VERSION: 0.2.2
// VERSION: 0.2.3
// PURPOSE: Arduino library for PCF8575 - 16 channel I2C IO expander
// URL: https://github.com/RobTillaart/PCF8575

Expand All @@ -12,7 +12,7 @@
#include "Wire.h"


#define PCF8575_LIB_VERSION (F("0.2.2"))
#define PCF8575_LIB_VERSION (F("0.2.3"))


#ifndef PCF8575_INITIAL_VALUE
Expand All @@ -35,6 +35,7 @@ class PCF8575


// note: setting the address may corrupt internal buffer values
// and should not be used unless it is needed.
// a read16() / write16() call updates them.
bool setAddress(const uint8_t deviceAddress);
uint8_t getAddress();
Expand Down
1 change: 0 additions & 1 deletion examples/PCF8575_Wire1/PCF8575_Wire1.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: PCF8575_Wire1.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-01-03
// PURPOSE: demo
// URL: https://github.com/RobTillaart/PCF8575

Expand Down
5 changes: 2 additions & 3 deletions examples/PCF8575_array/PCF8575_array.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: PCF8575_array.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-12-13
// PURPOSE: demo array of PCF - not tested
// URL: https://github.com/RobTillaart/PCF8575

Expand Down Expand Up @@ -36,7 +35,7 @@ void loop()
{
for (int i = 0; i < 3; i++)
{
for (uint8_t port = 0; port < 15; port++)
for (uint8_t port = 0; port < 16; port++)
{
PCF[i].write(port, 1);
delay(200);
Expand All @@ -45,7 +44,7 @@ void loop()

for (int i = 0; i < 3; i++)
{
for (uint8_t port = 0; port < 15; port++)
for (uint8_t port = 0; port < 16; port++)
{
PCF[i].write(port, 0);
delay(400);
Expand Down
1 change: 0 additions & 1 deletion examples/PCF8575_interrupt/PCF8575_interrupt.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: PCF8575_interrupt.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-01-03
// PURPOSE: test PCF8575 library
// URL: https://github.com/RobTillaart/PCF8575
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: PCF8575_interrupt_advanced.ino
// AUTHOR: Rob Tillaart
// DATE: 2024-01-08
// PURPOSE: test PCF8575 library
// URL: https://github.com/RobTillaart/PCF8575
//
Expand Down
1 change: 0 additions & 1 deletion examples/PCF8575_isConnected/PCF8575_isConnected.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: PCF8575_isConnected.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-01-03
// PURPOSE: demo device detection
// URL: https://github.com/RobTillaart/PCF8575

Expand Down
1 change: 0 additions & 1 deletion examples/PCF8575_performance/PCF8575_performance.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: PCF8575_performance.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-01-24
// PURPOSE: test PCF8575 library
// URL: https://github.com/RobTillaart/PCF8575

Expand Down
1 change: 0 additions & 1 deletion examples/PCF8575_select/PCF8575_select.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: PCF8575_select.ino
// AUTHOR: Rob Tillaart
// DATE: 2022-06-18
// PURPOSE: demo PCF8575 library select functions
// URL: https://github.com/RobTillaart/PCF8575

Expand Down
1 change: 0 additions & 1 deletion examples/PCF8575_test/PCF8575_test.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: PCF8575_test.ino
// AUTHOR: Rob Tillaart
// DATE: 2020-07-20
// PURPOSE: test PCF8575 library
// URL: https://github.com/RobTillaart/PCF8575

Expand Down
5 changes: 2 additions & 3 deletions examples/PCF8575_test1/PCF8575_test1.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: pcf8575_test.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-01-03
// PURPOSE: demo
// URL: https://github.com/RobTillaart/PCF8575

Expand All @@ -10,7 +9,7 @@

// adjust addresses if needed
PCF8575 PCF_20(0x20); // add switches to lines (used as input)
PCF8575 PCF_21(0x21); // add leds to lines (used as output)
PCF8575 PCF_21(0x21); // add LEDs to lines (used as output)


void setup()
Expand Down Expand Up @@ -68,7 +67,7 @@ void setup()

void loop()
{
// echos the lines
// echoes the lines
uint16_t value = PCF_20.read16();
PCF_21.write16(value);
delay(100);
Expand Down
1 change: 0 additions & 1 deletion examples/PCF8575_test2/PCF8575_test2.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: pcf8575_test2.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-01-03
// PURPOSE: demo rotateLeft, -Right and toggleMask
// URL: https://github.com/RobTillaart/PCF8575

Expand Down
3 changes: 3 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ valueOut KEYWORD2
readButton16 KEYWORD2
readButton KEYWORD2
setButtonMask KEYWORD2
getButtonMask KEYWORD2

toggle KEYWORD2
toggleMask KEYWORD2
Expand All @@ -37,6 +38,8 @@ selectN KEYWORD2
selectNone KEYWORD2
selectAll KEYWORD2

lastError KEYWORD2


# Constants (LITERAL1)
PCF8575_LIB_VERSION LITERAL1
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/PCF8575.git"
},
"version": "0.2.2",
"version": "0.2.3",
"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=PCF8575
version=0.2.2
version=0.2.3
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for PCF8575 - 16 channel I2C IO expander
Expand Down

0 comments on commit 6ad5805

Please sign in to comment.