Project 2 – serial connection, sending data

For this project, in order to see the data going from one device to the other, you will need two computers. One connected to the master device and one connected to the slave device. If you do not have two computers, it is still worth reading through this section to understand the protocol that we are creating because we will be using the same protocol for the third project as well.

When we are streaming data or sending large amounts of variable length data, we need some way to tell the receiving device where a new message starts and where it ends. Luckily for us, there are built-in ASCII codes that allow for this. The 0x01 SOH (Start Of Heading) and the 0x04 EOT (End Of Transmission) codes can be ...

Get Mastering 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.