Serial Communication Notes (for personal reference):
- Electrical agreement between laptop and Arduino needs to have:
- Voltage level
- Speed (Ex: 9600 bps; needs to know how frequently to sample)
- Logic (what do the pulses of high and low mean) The laptop and Arduino need to agree on whether the binary representation is inverted or non-inverted
- When 2 programs are communicating serially, they aren’t reading each other’s programs, instead they are only reading each other’s logic. So, it’s important that they are using the same communications protocol: what the bytes being sent mean and what order they are being sent.
- So the Arduino includes a USB with a CDC that supports the asynchronous serial communication, which is what allows there to be a serial port when we plug it into our laptops. Is this correct? Is it the CDC that converts then sends the data to the laptop and serial? Just want to be sure if the CDC is considered to be a USB-to-serial converter.
Interpreting Serial Data Notes & Serial 4 (Devices & Bytes) Video
- Serial Data is passed byte by byte from one device to another.
- Only 1 program on your computer can control your serial at a time. Ex: Coolterms and Arduino can’t both have their serial data open.
- You need punctuation bytes if you have 2 or more sensor readings
- Does this mean that all the values we read in the Arduino’s serial port is ASCII values, and we always have to translate it to a decimal.
- Duplex Serial Lab is showing “Nothing Found”. Should we be trying this lab out?