Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "thingProperties.h"
- const int buttonPin = 7;
- void setup() {
- Serial.begin(9600);
- delay(1500);
- initProperties();
- ArduinoCloud.begin(ArduinoIoTPreferredConnection);
- setDebugMessageLevel(2);
- ArduinoCloud.printDebugInfo();
- pinMode(LED_BUILTIN, OUTPUT);
- pinMode(buttonPin, INPUT);
- }
- void loop() {
- ArduinoCloud.update();
- buttonState = digitalRead(buttonPin);
- digitalWrite(LED_BUILTIN, ledState);
- }
- void onButtonStateChange() {
- // Add your code here to act upon ButtonState change
- }
- void onLedStateChange() {
- // Add your code here to act upon LedState change
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement