To output some logging your program you need to initialise the serial connection in the setup:
void setup()
{
Serial.begin(9600);
}
The 'Serial' object is the connection over USB to your computer. There are other Serial objects you can use to communicate over different channels.
then you are ready to output some logging:
...
Serial.println("Hello World!");
...
In order to listen to the serial connection, use the following CLI command:
> sudo particle serial monitorYou should start seeing your messages output on the console.
No comments:
Post a Comment