Skip to content

Commit

Permalink
Update tuyav_example.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
velbn committed Jan 29, 2020
1 parent e323c7c commit 91842dd
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions examples/tuyav_example/tuyav_example.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
#include "global.h"


#if defined(ARDUINO_AVR_UNO)
//User can choose SoftwareSerial
//you can choose your own pins
//SoftwareSerial mySerial(2,3);

//User can choose HardwareSerial: Serial1/Serial2/Serial3
// Serial1 is pin 18/19 on a Arduino Mega
Tuyav tuyav(&Serial1);

SoftwareSerial mySerial(2,3);
Tuyav tuyav(&mySerial);
#else // Mega
//User can choose HardwareSerial: Serial1/Serial2/Serial3
// Serial1 is pin 18/19 on a Arduino Mega
Tuyav tuyav(&Serial1);
#endif
//Initialize Time for updating Arbitrary Values
unsigned long previousTime = 0;
bool isLampOn = false;
Expand Down Expand Up @@ -61,4 +63,4 @@ void loop() {
tuyav.setUserValue(AV8, "Elepsed Time: "); //User send string value "Bedroom" to the cloud*/
tuyav.setUserValue(AV9, String(millis())); //User send string value "Bedroom" to the cloud*/

}
}

0 comments on commit 91842dd

Please sign in to comment.