File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
examples/adafruitio_16_servo Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -80,16 +80,16 @@ void loop() {
80
80
void handleMessage (AdafruitIO_Data *data) {
81
81
82
82
// convert the data to integer
83
- int reading = data->toInt ();
83
+ int angle = data->toInt ();
84
84
85
85
// make sure we don't exceed the limit
86
86
// of the servo. the range is from 0
87
87
// to 180.
88
- if (reading < 0 )
89
- reading = 0 ;
90
- else if (reading > 180 )
91
- reading = 180 ;
88
+ if (angle < 0 )
89
+ angle = 0 ;
90
+ else if (angle > 180 )
91
+ angle = 180 ;
92
92
93
- servo.write (reading );
93
+ servo.write (angle );
94
94
95
95
}
Original file line number Diff line number Diff line change 1
1
name =Adafruit IO Arduino
2
- version =2.4.2
2
+ version =2.4.3
3
3
author =Adafruit
4
4
maintainer =Adafruit <
[email protected] >
5
5
sentence =Arduino library to access Adafruit IO.
Original file line number Diff line number Diff line change 14
14
15
15
#define ADAFRUITIO_VERSION_MAJOR 2
16
16
#define ADAFRUITIO_VERSION_MINOR 4
17
- #define ADAFRUITIO_VERSION_PATCH 2
17
+ #define ADAFRUITIO_VERSION_PATCH 3
18
18
19
19
// forward declaration
20
20
class AdafruitIO_Data ;
You can’t perform that action at this time.
0 commit comments