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 1919
2020/* *********************** Example Starts Here *******************************/
2121
22- // digital pin 5
2322// this should correspond to a pin with PWM capability
2423#define LED_PIN 5
2524
@@ -71,10 +70,8 @@ void loop() {
7170// the analog feed in the setup() function above.
7271void handleMessage (AdafruitIO_Data *data) {
7372
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 ();
7875
7976 Serial.print (" received <- " );
8077 Serial.println (reading);
Original file line number Diff line number Diff line change 11name =Adafruit IO Arduino
2- version =2.3.0
2+ version =2.3.1
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 3
17- #define ADAFRUITIO_VERSION_PATCH 0
17+ #define ADAFRUITIO_VERSION_PATCH 1
1818
1919// forward declaration
2020class AdafruitIO_Data ;
You can’t perform that action at this time.
0 commit comments