Skip to content

Commit 7782452

Browse files
authored
Fix URL examples + minor edits (#9)
1 parent ee7330f commit 7782452

File tree

11 files changed

+35
-29
lines changed

11 files changed

+35
-29
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.2.1] - 2024-01-06
10+
- Fix URL in examples
11+
- minor edits
12+
13+
914
## [0.2.0] - 2023-11-21
1015
- simplify begin() interface - breaking change
1116
- update readme.md

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021-2023 Rob Tillaart
3+
Copyright (c) 2021-2024 Rob Tillaart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

examples/rotaryDecoder_demo_interrupt/rotaryDecoder_demo_interrupt.ino

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// FILE: rotaryDecoder_demo_interrupt.ino
33
// AUTHOR: Rob Tillaart
44
// DATE: 2021-05-08
5-
// PUPROSE: demo interrupt controlled rotary decoder
5+
// PURPOSE: demo interrupt controlled rotary decoder
6+
// URL: https://github.com/RobTillaart/rotaryDecoder
67
//
78
// connect up to 4 rotary encoders to 1 PCF8574.
89
//
@@ -19,17 +20,17 @@
1920
//
2021

2122

22-
#include "Wire.h"
2323
#include "rotaryDecoder.h"
2424

25+
2526
rotaryDecoder decoder(0x20);
2627

2728
volatile bool flag = false;
2829

2930

3031
void moved()
3132
{
32-
// one should not read the PPCF8574 in the interrupt routine.
33+
// one should not read the PPCF8574 in the interrupt routine.
3334
flag = true;
3435
}
3536

@@ -66,9 +67,9 @@ void loop()
6667
Serial.println();
6768
}
6869

69-
// other tasks...
70+
// other tasks...
7071
}
7172

7273

73-
// -- END OF FILE --
74+
// -- END OF FILE --
7475

examples/rotaryDecoder_demo_polling/rotaryDecoder_demo_polling.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// FILE: rotaryDecoder_demo_polling.ino
33
// AUTHOR: Rob Tillaart
44
// DATE: 2021-05-08
5-
// PUPROSE: demo
5+
// PURPOSE: demo
6+
// URL: https://github.com/RobTillaart/rotaryDecoder
67
//
78
// connect up to 4 rotary encoders to 1 PCF8574.
89
//
@@ -17,7 +18,6 @@
1718
//
1819

1920

20-
#include "Wire.h"
2121
#include "rotaryDecoder.h"
2222

2323
rotaryDecoder decoder(0x20);
@@ -50,9 +50,9 @@ void loop()
5050
Serial.println();
5151
}
5252

53-
// other tasks...
53+
// other tasks...
5454
}
5555

5656

57-
// -- END OF FILE --
57+
// -- END OF FILE --
5858

examples/rotaryDecoder_demo_simple/rotaryDecoder_demo_simple.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// FILE: rotaryDecoder_demo_simple.ino
33
// AUTHOR: Rob Tillaart
44
// DATE: 2021-05-08
5-
// PUPROSE: demo
5+
// PURPOSE: demo
6+
// URL: https://github.com/RobTillaart/rotaryDecoder
67
//
78
// connect up to 4 rotary encoders to 1 PCF8574.
89
//
@@ -17,7 +18,6 @@
1718
//
1819

1920

20-
#include "Wire.h"
2121
#include "rotaryDecoder.h"
2222

2323
rotaryDecoder decoder(0x20);
@@ -39,7 +39,7 @@ void setup()
3939

4040
void loop()
4141
{
42-
// if one of the counters is updated, print them.
42+
// if one of the counters is updated, print them.
4343
if (decoder.update())
4444
{
4545
for (uint8_t i = 0; i < 4; i++)
@@ -50,9 +50,9 @@ void loop()
5050
Serial.println();
5151
}
5252

53-
// other tasks...
53+
// other tasks...
5454
}
5555

5656

57-
// -- END OF FILE --
57+
// -- END OF FILE --
5858

examples/rotaryDecoder_demo_single/rotaryDecoder_demo_single.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// FILE: rotaryDecoder_demo_single.ino
33
// AUTHOR: Rob Tillaart
44
// DATE: 2021-05-08
5-
// PUPROSE: demo single direction rotary decoder.
5+
// PURPOSE: demo single direction rotary decoder.
6+
// URL: https://github.com/RobTillaart/rotaryDecoder
67
//
78
// note this is used for e.g. RPM counters that are unidirectional.
89
// all moves are interpreted as same direction.
@@ -20,7 +21,6 @@
2021
//
2122

2223

23-
#include "Wire.h"
2424
#include "rotaryDecoder.h"
2525

2626
rotaryDecoder decoder(0x20);
@@ -42,8 +42,8 @@ void setup()
4242

4343
void loop()
4444
{
45-
// if one of the counters is updated, print them.
46-
if (decoder.updateSingle()) // note values will only go up!
45+
// if one of the counters is updated, print them.
46+
if (decoder.updateSingle()) // note values will only go up!
4747
{
4848
for (uint8_t i = 0; i < 4; i++)
4949
{
@@ -53,9 +53,9 @@ void loop()
5353
Serial.println();
5454
}
5555

56-
// other tasks...
56+
// other tasks...
5757
}
5858

5959

60-
// -- END OF FILE --
60+
// -- END OF FILE --
6161

examples/rotaryDecoder_performance/rotaryDecoder_performance.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// FILE: rotaryDecoder_performance.ino
33
// AUTHOR: Rob Tillaart
44
// DATE: 2021-05-08
5-
// PUPROSE: demo
5+
// PURPOSE: demo
6+
// URL: https://github.com/RobTillaart/rotaryDecoder
67
//
78
// connect up to 4 rotary encoders to 1 PCF8574.
89
//
@@ -17,7 +18,6 @@
1718
//
1819

1920

20-
#include "Wire.h"
2121
#include "rotaryDecoder.h"
2222

2323
rotaryDecoder decoder(0x20);
@@ -57,5 +57,5 @@ void loop()
5757
}
5858

5959

60-
// -- END OF FILE --
60+
// -- END OF FILE --
6161

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type": "git",
1616
"url": "https://github.com/RobTillaart/rotaryDecoder.git"
1717
},
18-
"version": "0.2.0",
18+
"version": "0.2.1",
1919
"license": "MIT",
2020
"frameworks": "*",
2121
"platforms": "*",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=rotaryDecoder
2-
version=0.2.0
2+
version=0.2.1
33
author=Rob Tillaart <[email protected]>
44
maintainer=Rob Tillaart <[email protected]>
55
sentence=Arduino library to rotary decoder with a PCF8574

rotaryDecoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// FILE: rotaryDecoder.cpp
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.2.0
4+
// VERSION: 0.2.1
55
// DATE: 2021-05-08
66
// PURPOSE: rotary decoder library for Arduino
77
// URL: https://github.com/RobTillaart/rotaryDecoder

0 commit comments

Comments
 (0)