I used the following code in Arduino IDE which is also posted in instructabels.
void setup() { // put your setup code here, to run once:
Serial.begin(9600); //Begin Serial at 9600
Serial.setTimeout(50); //Timeout serial if readString is unavailable
}
void loop() {
// put your main code here, to run repeatedly: String inString = “”; if (Serial.available() > 0) {
// get incoming String
inString = Serial.readString(); //Read input string from bolt
Serial.print(inString); //Send same string back to bolt
}
}
Unfortunately , I am getting error as - br and inString command not declared in this scope. !!
The code compiles for me.
try to shift the inString declaration outside the loop function like this.
void setup() {
// put your setup code here, to run once:
Serial.begin(9600); //Begin Serial at 9600
Serial.setTimeout(50); //Timeout serial if readString is unavailable
}
String inString="";
void loop() {
// put your main code here, to run repeatedly:
if (Serial.available() > 0) {
// get incoming String
inString = Serial.readString(); //Read input string from bolt
Serial.print(inString); //Send same string back to bolt
}
}
Hi @sayakbhar
To create a new product, Go to developer console -> Click on Add product (+ Icon) -> Choose Default Image and default page -> Click on Yes for hardware configuration -> Select UART and the number of Common Separated Value and choose the time interval -> Click on Deploy Configuration