Chapter 8. Communications

 

This chapter covers

  • Creating an Ethernet web server to query data from your Arduino
  • Tweeting messages from your Arduino to Twitter
  • Wi-Fi network and Bluetooth communication with the Arduino
  • Data logging onto an SD card and to the internet using the Cosm service
  • Communicating with other devices over the Serial Peripheral Interface (SPI) protocol

In the previous chapter, we investigated how you can receive visual feedback from the Arduino by communicating with LCD screens. Imagine if you could display information from the Arduino on an external screen, and also send it out over the internet for the world to see! What if you could control your Arduino remotely?

Getting your Arduino on the internet and remotely talking to your computer are two of the many communication channels possible with the Arduino. We’ll look at communicating with your Arduino via Ethernet, Wi-Fi, Bluetooth, and SPI.

As many of your projects will involve communicating over the internet, let’s dive right in and look at how to communicate with the Arduino over a computer network.

8.1. Ethernet

One of the most powerful communication channels available on the Arduino is Ethernet. Ethernet is a standardized networking facility that allows all kinds of devices to communicate with each other by sending and receiving streams of data (called packets or frames).

8.2. Arduino web server

8.3. Tweet tweet: talking to Twitter

8.4. Wi-Fi

8.5. Bluetooth wireless

8.6. Serial peripheral interface (SPI)

8.7. Data logging

8.8. Cosm

8.9. Summary