// fab12_disp_data.ino // // receive data on serial port // #define BLYNK_PRINT Serial #include #include char str[10]; // Get auth token from Blynk app char auth[] = "d79215fe92c241f882cfb4f275d534f9"; char ssid[] = "@AIRPORT_FREE_WIFI"; char pass[] = "boots798busta"; BlynkTimer timer; // This function will run once every second void timerEvent() { // You can send any value at any time. // Please don't send more that 10 values per second. if (Serial.available() > 0) { Serial.readBytes(str, 5); // read incoming bytes } else { itoa(-1, str, 10); // display -1 if no data available } Blynk.virtualWrite(V5, str); // Write to virtual pin 5 Serial.println(str); // Send to serial monitor for debugging } void setup() { Serial.begin(9600); // Debug console Blynk.begin(auth, ssid, pass); timer.setInterval(1000L, timerEvent); // Call every second } void loop() { Blynk.run(); timer.run(); // Initiate BlynkTimer }