Table of Contents
Example Description
Discover the fundamentals of Arduino Serial Communication using Pictoblox and the importance of setting the correct baud rate for proper data exchange.
Introduction

If you are here willingly, it means you already possess knowledge about programming and project-making. In various programming languages, data from users is often required, and useful information needs to be displayed for users. Similarly, when writing Arduino codes and creating projects, dealing with valuable information is a common requirement. This information is termed serial data, and the process of sending or receiving data to/from the user is known as serial communication. Arduino’s Serial monitor is the interface used to display or receive data from the user.

In this example, we will delve into Serial communication for Arduino using the Pictoblox communication extension.

Extension Setup:

go to extension and add communication extension.

after adding the extension change the mode from stage to upload mode

code

  1. Add the “when Arduino starts up” block from the Arduino palette.
  2. From the communication palette, enable Serial communication using the “Set Serial() baud rate()” block. Set the baud rate to 9600 from the drop-down menu.
  3. After configuring the baud rate, data can be sent or received from the user easily. To send data to the Serial monitor, go to the communication extension and add the “write () on Serial  ()” block.

Output

When observing the output, you may notice that it is not as expected. This issue is due to the change in the baud rate. It is crucial to set the same baud rate for the Serial monitor to ensure proper data exchange. From the highlighted space below, set the baud rate to 9600.

After adjusting the baud rate, observe the output again to ensure proper data display and transmission.

Here is the result after changing the baud rate.

Troubleshooting:

If you encounter any unexpected output or issues with the Serial monitor, verify that the baud rate is correctly configured to avoid data discrepancies. In this comprehensive introduction, you have learned about Arduino Serial Communication with Pictoblox, including baud rate configuration and troubleshooting. Master the art of seamless data exchange between Arduino and the user, further enhancing your programming knowledge and project-making capabilities.