Collecting and showing data through serial port

Before going any further, let's discuss how we can print something using Arduino IDE. We already printed Hello Arduino in the previous chapter. If you don't know how to print something using serial monitor, please go to the previous chapter and then come back here.

Let's recap the print program we used.

We took two functions, setup() and loop(). Inside the setup function, we declared our baud rate as follows:

Serial.begin(9600); //default baud for serial communication 

Right after the baud was defined, we added a special function to print our text on the serial monitor. The function was Serial.print(). Inside the print()function, we wrote (in C we call it passed ) what we wanted to be seen on the serial ...

Get Learning C for Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.