SPI, Faster and More Wires

The other bus. I2C connects many devices with two wires and addresses; SPI connects them with four wires and no addresses at all, and is many times faster.

UART and Serial Links

The third bus, and the oldest. I2C and SPI were designed for chips on one board; a UART link is two wires between two independent devices, each with its own idea of the time.

Measure Distance with HC-SR04

The HC-SR04 measures distance by timing an echo. It sends a short burst of ultrasound, too high to hear, and reports how long the reflection took to come back. Sound travels at a known speed, so that time converts directly...

Read Temperature and Humidity with DHT11

The DHT11 measures air temperature and relative humidity and reports both as digital values. It does its own measuring and converting, so you receive numbers rather than a voltage to interpret.

DHT22, Better Accuracy Than the DHT11

The same job as the DHT11, done properly. Temperature and humidity, read over one wire, in a white plastic housing that is noticeably larger than its blue cousin.

Waterproof Temperature with DS18B20

A DS18B20 in a stainless steel probe on the end of a cable. It reads from about -55 to +125 degrees Celsius to a tenth of a degree, and the sealed tip means it can go into soil, a tank,...

Pressure and Altitude with a BMP280

A barometer on a chip. It measures atmospheric pressure to a fraction of a hectopascal, and temperature alongside it, over I2C or SPI.

Detecting People with a PIR Sensor

A passive infrared sensor watches for changes in the infrared light falling on it. Everything warm glows in the infrared, and when a person moves across the sensor's view the pattern shifts, which the module reports as a single digital...

Reading Soil Moisture

Two exposed metal tracks on a fork-shaped probe, pushed into soil. Wet soil conducts better than dry soil, so the resistance between the tracks falls as the soil gets wetter, and a small comparator board turns that into something an...

Water Level and Rain Detection

A red board with a comb of interleaved copper tracks. Water bridging the tracks lowers the resistance between them, and the further up the comb the water reaches, the more tracks are bridged and the lower the resistance goes.

Flame Detection with an Infrared Sensor

The black teardrop on the end of the board is a photodiode filtered to respond to infrared, roughly in the band a flame emits most strongly. Point it at a fire and an LM393 comparator on the board pulls its...

Touch Input Without a Button

A TTP223 is a capacitive touch switch. The pad on the board holds a tiny electrical charge, your finger changes it, and the chip notices and drives its output pin.

Reacting to Sound

An electret microphone, an amplifier and a comparator on one small board. It gives you a digital pin that goes active when a sound is loud enough, and an analog pin carrying the amplified microphone signal.

Smoke and Gas Sensing with MQ-2

Inside the steel mesh cap is a small bead of tin dioxide and a heater. Heated to a few hundred degrees, the bead's surface resistance changes when certain gases touch it: LPG, propane, butane, methane, hydrogen, alcohol vapour and smoke...

Weighing with an HX711 and a Load Cell

A load cell is a piece of metal that bends very slightly under weight, with strain gauges bonded to it that change resistance as it bends. The change is tiny: a few microvolts per gram.

Measuring Current with an ACS712

Every current flowing in a wire creates a magnetic field around it. An ACS712 has a short copper bar inside it and a Hall-effect sensor beside that bar, so it senses the field and reports the current as a voltage,...

Reading Colour with a TCS3200

An array of tiny light sensors behind coloured filters, with four white LEDs around them to illuminate whatever you point it at. Select a filter, and the chip outputs a square wave whose frequency is proportional to how much light...

A Four-Way Line Tracking Sensor

Four infrared reflectance sensors, each looking straight down at the floor. A white surface reflects the infrared back; black tape absorbs it. So each sensor answers one question: is the floor under me light or dark?

A 16×2 LCD over I2C

A 16x2 character LCD shows two lines of sixteen characters. It is the display to reach for when a project needs to say something to a person standing next to it, rather than to a serial monitor on a laptop.

Wiring a 16×2 LCD Directly

This is the same 16x2 character display as the I2C one, without the backpack. Sixteen pins, wired by hand, driven by the LiquidCrystal library that already ships with the Arduino IDE.

A 0.96 inch OLED Display

A small graphic display, 128 by 64 pixels, driven over the same two I2C wires as the LCD. Unlike a character display it can draw anything: text in several sizes, lines, shapes, a scrolling graph of a sensor reading.

More Outputs with a Shift Register

A 74HC595 turns three Arduino pins into eight outputs. Chain two and three pins give you sixteen. Chain four and you have thirty-two, still on three pins.

Driving a 4-Digit 7-Segment Display

Four digits, each made of seven bar-shaped LEDs plus a decimal point. It shows numbers, brightly, readable across a room, and it costs almost nothing.
Shop
Sidebar
0 Wishlist
0 Cart