Capturing Sensor Data
The interface we’ll be working with is Inter Integrated Circuit Protocol, or I2C for short. It’s a protocol used to connect two integrated circuits. The standard is a communications bus, meaning you can use it to attach multiple devices connected together. You can have one controller connected to multiple peripherals, as we will, or even multiple controllers connected to multiple peripherals, which comes in handy when you’re building more complex circuits.
Broadly, the protocol uses a system clock and voltages to send values between devices. Each I2C device has an address, and we’ll typically send a request and receive a response. We’ll read the spec sheet to find out exactly which values you’ll need to interact with the ...
Get Build a Weather Station with Elixir and Nerves 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.