7 USB Serial Communication
Parts You'll Need for This Chapter
- Arduino Uno or Adafruit METRO 328
- USB cable (Type A to B for Uno, Type A to Micro-B for METRO)
- Half-size or full-size breadboard
- Assorted jumper wires
- 220Ω resistors (×3)
- 10kΩ trim potentiometer
- 5 mm red LED
- 5 mm common-anode RGB LED
- CODE AND DIGITAL CONTENT FOR THIS CHAPTER
- Code downloads, videos, and other digital content for this chapter can be found at:
exploringarduino.com/content2/ch7
- Code for this chapter can also be obtained from the Downloads tab on this book's Wiley web page:
wiley.com/go/exploringarduino2e
Perhaps the most important part of any Arduino is its capability to be programmed directly via a USB serial port. This feature enables you to program the Arduino without any special hardware, such as an AVRISP mkII. Ordinarily, microcontrollers rely on a dedicated piece of external hardware (such as the mkII) to serve as a programmer that connects your computer to the microcontroller you are trying to program. In the case of the Arduino, this programmer is essentially built into the board, instead of being a piece of external hardware. What's more, this gives you a direct connection to the ATmega integrated Universal Synchronous/Asynchronous Receiver and Transmitter (USART). Using this interface, you can send information between your host computer and the Arduino, or between the Arduino and other serial-enabled components (including other Arduinos).
Both this chapter and the following chapter will cover ...
Get Exploring Arduino, 2nd Edition 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.