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() {
8080void handleMessage (AdafruitIO_Data *data) {
8181
8282 // convert the data to integer
83- int reading = data->toInt ();
83+ int angle = data->toInt ();
8484
8585 // make sure we don't exceed the limit
8686 // of the servo. the range is from 0
8787 // 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 ;
9292
93- servo.write (reading );
93+ servo.write (angle );
9494
9595}
Original file line number Diff line number Diff line change 11name =Adafruit IO Arduino
2- version =2.4.2
2+ version =2.4.3
33author =Adafruit
44maintainer =Adafruit <info@adafruit.com>
55sentence =Arduino library to access Adafruit IO.
Original file line number Diff line number Diff line change 1414
1515#define ADAFRUITIO_VERSION_MAJOR 2
1616#define ADAFRUITIO_VERSION_MINOR 4
17- #define ADAFRUITIO_VERSION_PATCH 2
17+ #define ADAFRUITIO_VERSION_PATCH 3
1818
1919// forward declaration
2020class AdafruitIO_Data ;
You can’t perform that action at this time.
0 commit comments