Skip to content

Commit

Permalink
Fix URL examples + minor edits (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Jan 6, 2024
1 parent ee7330f commit 7782452
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 29 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.2.1] - 2024-01-06
- Fix URL in examples
- minor edits


## [0.2.0] - 2023-11-21
- simplify begin() interface - breaking change
- update readme.md
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) 2021-2023 Rob Tillaart
Copyright (c) 2021-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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// FILE: rotaryDecoder_demo_interrupt.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-05-08
// PUPROSE: demo interrupt controlled rotary decoder
// PURPOSE: demo interrupt controlled rotary decoder
// URL: https://github.com/RobTillaart/rotaryDecoder
//
// connect up to 4 rotary encoders to 1 PCF8574.
//
Expand All @@ -19,17 +20,17 @@
//


#include "Wire.h"
#include "rotaryDecoder.h"


rotaryDecoder decoder(0x20);

volatile bool flag = false;


void moved()
{
// one should not read the PPCF8574 in the interrupt routine.
// one should not read the PPCF8574 in the interrupt routine.
flag = true;
}

Expand Down Expand Up @@ -66,9 +67,9 @@ void loop()
Serial.println();
}

// other tasks...
// other tasks...
}


// -- END OF FILE --
// -- END OF FILE --

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// FILE: rotaryDecoder_demo_polling.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-05-08
// PUPROSE: demo
// PURPOSE: demo
// URL: https://github.com/RobTillaart/rotaryDecoder
//
// connect up to 4 rotary encoders to 1 PCF8574.
//
Expand All @@ -17,7 +18,6 @@
//


#include "Wire.h"
#include "rotaryDecoder.h"

rotaryDecoder decoder(0x20);
Expand Down Expand Up @@ -50,9 +50,9 @@ void loop()
Serial.println();
}

// other tasks...
// other tasks...
}


// -- END OF FILE --
// -- END OF FILE --

10 changes: 5 additions & 5 deletions examples/rotaryDecoder_demo_simple/rotaryDecoder_demo_simple.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// FILE: rotaryDecoder_demo_simple.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-05-08
// PUPROSE: demo
// PURPOSE: demo
// URL: https://github.com/RobTillaart/rotaryDecoder
//
// connect up to 4 rotary encoders to 1 PCF8574.
//
Expand All @@ -17,7 +18,6 @@
//


#include "Wire.h"
#include "rotaryDecoder.h"

rotaryDecoder decoder(0x20);
Expand All @@ -39,7 +39,7 @@ void setup()

void loop()
{
// if one of the counters is updated, print them.
// if one of the counters is updated, print them.
if (decoder.update())
{
for (uint8_t i = 0; i < 4; i++)
Expand All @@ -50,9 +50,9 @@ void loop()
Serial.println();
}

// other tasks...
// other tasks...
}


// -- END OF FILE --
// -- END OF FILE --

12 changes: 6 additions & 6 deletions examples/rotaryDecoder_demo_single/rotaryDecoder_demo_single.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// FILE: rotaryDecoder_demo_single.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-05-08
// PUPROSE: demo single direction rotary decoder.
// PURPOSE: demo single direction rotary decoder.
// URL: https://github.com/RobTillaart/rotaryDecoder
//
// note this is used for e.g. RPM counters that are unidirectional.
// all moves are interpreted as same direction.
Expand All @@ -20,7 +21,6 @@
//


#include "Wire.h"
#include "rotaryDecoder.h"

rotaryDecoder decoder(0x20);
Expand All @@ -42,8 +42,8 @@ void setup()

void loop()
{
// if one of the counters is updated, print them.
if (decoder.updateSingle()) // note values will only go up!
// if one of the counters is updated, print them.
if (decoder.updateSingle()) // note values will only go up!
{
for (uint8_t i = 0; i < 4; i++)
{
Expand All @@ -53,9 +53,9 @@ void loop()
Serial.println();
}

// other tasks...
// other tasks...
}


// -- END OF FILE --
// -- END OF FILE --

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// FILE: rotaryDecoder_performance.ino
// AUTHOR: Rob Tillaart
// DATE: 2021-05-08
// PUPROSE: demo
// PURPOSE: demo
// URL: https://github.com/RobTillaart/rotaryDecoder
//
// connect up to 4 rotary encoders to 1 PCF8574.
//
Expand All @@ -17,7 +18,6 @@
//


#include "Wire.h"
#include "rotaryDecoder.h"

rotaryDecoder decoder(0x20);
Expand Down Expand Up @@ -57,5 +57,5 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --

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/rotaryDecoder.git"
},
"version": "0.2.0",
"version": "0.2.1",
"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=rotaryDecoder
version=0.2.0
version=0.2.1
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library to rotary decoder with a PCF8574
Expand Down
2 changes: 1 addition & 1 deletion rotaryDecoder.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FILE: rotaryDecoder.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.2.0
// VERSION: 0.2.1
// DATE: 2021-05-08
// PURPOSE: rotary decoder library for Arduino
// URL: https://github.com/RobTillaart/rotaryDecoder
Expand Down
4 changes: 2 additions & 2 deletions rotaryDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// FILE: rotaryDecoder.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.0
// VERSION: 0.2.1
// DATE: 2021-05-08
// PURPOSE: rotary decoder library for Arduino
// URL: https://github.com/RobTillaart/rotaryDecoder
Expand All @@ -11,7 +11,7 @@
#include "Arduino.h"
#include "Wire.h"

#define ROTARY_DECODER_LIB_VERSION (F("0.2.0"))
#define ROTARY_DECODER_LIB_VERSION (F("0.2.1"))


class rotaryDecoder
Expand Down

0 comments on commit 7782452

Please sign in to comment.