Hello,
I have setup a particle function in my code. When I trigger particle function call like
particle function call lampname myfunc hello
The data I get on particle is hell. The last byte is missing always. I am printing the value received in the particle function directly. Any ideas?
Thanks
Dheeraj
cermak
August 15, 2017, 2:18am
2
Rather curious…it works for me.
Code:
int myfunc(String infoRcvd) {
Serial.println(infoRcvd);
return 1;
}
void setup() {
Serial.begin(9600);
Particle.function("myfunc", myfunc);
}
void loop() {
}
Result from particle function
:
$ particle function call testPhoton myfunc hello
1
Result from Serial:
$ particle serial monitor --follow
Polling for available serial device...
Opening serial monitor for com port: "/dev/cu.usbmodem1411"
Serial monitor opened successfully:
hello
1 Like
Showing your firmware code (at least the function) may be good
My bad. I should have posted the code,
Here is my particle function
int setValue(
const char * value )
{
Serial.printf("value: %s\n", value);
return 0;
}
Prints with last byte missing