File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed
examples/adafruitio_09_analog_out Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 19
19
20
20
/* *********************** Example Starts Here *******************************/
21
21
22
- // digital pin 5
23
22
// this should correspond to a pin with PWM capability
24
23
#define LED_PIN 5
25
24
@@ -71,10 +70,8 @@ void loop() {
71
70
// the analog feed in the setup() function above.
72
71
void handleMessage (AdafruitIO_Data *data) {
73
72
74
- // LED gets brighter the darker it is at the sensor
75
- // that means we have to invert the reading
76
- // from 0-1023 back to 1023-0
77
- int reading = 1023 - data->toInt ();
73
+ // convert the data to integer
74
+ int reading = data->toInt ();
78
75
79
76
Serial.print (" received <- " );
80
77
Serial.println (reading);
Original file line number Diff line number Diff line change 1
1
name =Adafruit IO Arduino
2
- version =2.3.0
2
+ version =2.3.1
3
3
author =Adafruit
4
4
maintainer =Adafruit <info@adafruit.com>
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 3
17
- #define ADAFRUITIO_VERSION_PATCH 0
17
+ #define ADAFRUITIO_VERSION_PATCH 1
18
18
19
19
// forward declaration
20
20
class AdafruitIO_Data ;
You can’t perform that action at this time.
0 commit comments