Hi Everyone,
I’m new to the use of Cayenne for IoT applications, and trying to get a simple communication between an ESP8266 and a TI MSP432 up and running. I’m receiving data from the MSP432 but the variables are being updated very slowly on the My Devices Console side of things.
My test button works with no lag however, I was wondering if using USART slows down the variables being updated.
Thanks for any help you can provide.
My Code:
#include <CayenneMQTTESP8266.h>
char ssid = “Gator”;
char password = “gators123”;
// Values Removed
char username = “”;
char mqtt_password = “”;
char client_id = “”;
int8_t L, R;
void setup() {
// put your setup code here, to run once:
Cayenne.begin(username, mqtt_password, client_id, ssid, password);
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
Cayenne.loop();
L = Serial.read();
R = Serial.read();
Cayenne.virtualWrite(1, L, “Random”, “% Left”);
Cayenne.virtualWrite(2, R, “Random”, “% Right”);
}
CAYENNE_IN(0){
digitalWrite(2, !getValue.asInt());
}