Books

The tutorials are free. The books are the same content reorganized into a path that actually makes sense if you read it in order, plus the parts that only make sense once you have read the ones before them.

(e.g. you do not need to wire up a DHT22 three different ways across three different tutorials, you need to wire it up once and understand why the other two ways exist.)

ctrlaltbrian

Home Automation with Raspberry Pi

Turn a Raspberry Pi into the brain of your home network. Pi-hole, Mosquitto, Node-RED, Samba, and the dozen small services that turn a Pi into a home server.

In progress (14 chapters) 14 chapters ready

Home Automation with Raspberry Pi

Turn a Raspberry Pi into the brain of your home network. Pi-hole, Mosquitto, Node-RED, Samba, and the dozen small services that turn a Pi into a home server.

$24 · target: 5+ chapters to ship

Table of contents (14)
  1. 01 Raspberry Pi: headless setup without a monitor 25 min · raspberry-pi
  2. 02 Raspberry Pi: read a DHT22 with Python and the GPIO pins 20 min · raspberry-pi
  3. 03 Raspberry Pi: install and configure Mosquitto MQTT broker 30 min · raspberry-pi
  4. 04 Raspberry Pi: run Node-RED for visual automations 30 min · raspberry-pi
  5. 05 Raspberry Pi: serve files on your network with Samba 30 min · raspberry-pi
  6. 06 Raspberry Pi: run Pi-hole to block ads network-wide 30 min · raspberry-pi
  7. 07 Raspberry Pi: use the Camera Module v3 with libcamera and Picamera2 30 min · raspberry-pi
  8. 08 Raspberry Pi: GPIO with Python and gpiozero, the right way 30 min · raspberry-pi
  9. 09 Raspberry Pi: WireGuard VPN with PiVPN, your own private tunnel 30 min · raspberry-pi
  10. 10 Raspberry Pi: install Home Assistant the right way, with backups and automations 30 min · raspberry-pi
  11. 11 Raspberry Pi: install Docker the right way and run multi-service stacks 30 min · raspberry-pi
  12. 12 Raspberry Pi: build a sensor REST API with Flask 35 min · raspberry-pi
  13. 13 Raspberry Pi: send email alerts from shell scripts with msmtp 20 min · raspberry-pi
  14. 14 Raspberry Pi: internet anywhere with a 4G/LTE HAT 60 min · raspberry-pi
Buy the book — $24

Buy URL placeholder. Drop your Gumroad or Lemon Squeezy link in the book's frontmatter when you are ready.

ctrlaltbrian

Arduino Robotics: servos, steppers, and sensors

Build small robots with Arduino. Servo arms, stepper motor control, ultrasonic distance, and the math that ties it all together.

In progress (29 chapters) 29 chapters ready

Arduino Robotics: servos, steppers, and sensors

Build small robots with Arduino. Servo arms, stepper motor control, ultrasonic distance, and the math that ties it all together.

$19 · target: 5+ chapters to ship

Table of contents (29)
  1. 01 Arduino: blink an LED (the classic first project) 10 min · arduino
  2. 02 Arduino: read a potentiometer and print the value 15 min · arduino
  3. 03 Arduino: control a servo motor 20 min · arduino
  4. 04 Arduino: use I2C to talk to sensors and displays 30 min · arduino
  5. 05 Arduino: read temperature with a DS18B20 one-wire sensor 25 min · arduino
  6. 06 Arduino: drive a 16x2 LCD display (with I2C backpack) 25 min · arduino
  7. 07 Arduino: control relays for home automation 30 min · arduino
  8. 08 Arduino: drive a 28BYJ-48 stepper motor with a ULN2003 driver 30 min · arduino
  9. 09 Arduino: persist data with EEPROM, the right way 25 min · arduino
  10. 10 Arduino: read a rotary encoder, position and direction 30 min · arduino
  11. 11 Arduino: drive a DC motor with the L298N H-bridge 30 min · arduino
  12. 12 Arduino: hardware interrupts, the right way to react to events 30 min · arduino
  13. 13 Arduino: read an HC-SR04 ultrasonic distance sensor 25 min · arduino
  14. 14 Arduino: the watchdog timer, recover from hangs automatically 30 min · arduino
  15. 15 Arduino: read a 4x4 membrane keypad with 8 pins 30 min · arduino
  16. 16 Arduino: animations on an 8x8 LED matrix (MAX7219) 40 min · arduino
  17. 17 Arduino: real timekeeping and alarms with the DS3231 RTC 30 min · arduino
  18. 18 Arduino: control it from an Android app with MIT App Inventor 50 min · arduino
  19. 19 Arduino: long-range 2.4 GHz radio links with nRF24L01 45 min · arduino
  20. 20 Arduino: Ethernet web server when Wi-Fi is not an option 45 min · arduino
  21. 21 Arduino: location and time from a NEO-6M GPS module 30 min · arduino
  22. 22 Arduino: build a digital scale with a load cell and HX711 40 min · arduino
  23. 23 Arduino: decode any IR remote with the IRremote library 20 min · arduino
  24. 24 Arduino: read high temperatures with a K-type thermocouple and MAX6675 30 min · arduino
  25. 25 Arduino: read water quality with the TDS module 30 min · arduino
  26. 26 Arduino: build a gas alarm with the MQ-2 30 min · arduino
  27. 27 Arduino: microwave radar motion detection with the RCWL-0516 35 min · arduino
  28. 28 Arduino: receive 433 MHz RF remote signals and replay them 45 min · arduino
  29. 29 Arduino: drive a 4-digit display with the TM1637 30 min · arduino
Buy the book — $19

Buy URL placeholder. Drop your Gumroad or Lemon Squeezy link in the book's frontmatter when you are ready.

ctrlaltbrian

IoT with ESP32: from sensor to dashboard

The complete path from a wired-up sensor to a web dashboard you can check from your phone.

Ready to publish 79 chapters ready

IoT with ESP32: from sensor to dashboard

The complete path from a wired-up sensor to a web dashboard you can check from your phone.

$29 · target: 5+ chapters to ship

Table of contents (79)
  1. 01 ESP32: read a DHT22 temperature and humidity sensor 20 min · esp32
  2. 02 ESP32: serve a sensor dashboard from the chip itself 45 min · esp32
  3. 03 ESP32: deep sleep and battery life, the honest numbers 40 min · esp32
  4. 04 ESP32: publish MQTT messages to a broker 30 min · esp32
  5. 05 ESP32: connect to Wi-Fi and stay connected 15 min · esp32
  6. 06 ESP32: read an HC-SR04 ultrasonic distance sensor 20 min · esp32
  7. 07 ESP32: use the onboard touch pins as buttons 20 min · esp32
  8. 08 ESP32: OTA (over-the-air) firmware updates 30 min · esp32
  9. 09 ESP32: read buttons and debounce them in software 20 min · esp32
  10. 10 ESP32: install the toolchain the right way 15 min · esp32
  11. 11 ESP32: the boot button and boot pins, what they actually do 15 min · esp32
  12. 12 ESP32: analog read with the ADC, and why ADC2 is broken on Wi-Fi 25 min · esp32
  13. 13 ESP32: advertise as a BLE peripheral with the GATT server pattern 35 min · esp32
  14. 14 ESP32: PWM on every pin with the LEDC peripheral 30 min · esp32
  15. 15 ESP32: connect to BLE peripherals with the GATT client pattern 35 min · esp32
  16. 16 ESP32: send HTTPS requests with root CA validation 30 min · esp32
  17. 17 ESP32: wire a 18650 battery with a TP4056 charge controller 20 min · esp32
  18. 18 ESP32: dev boards vs bare modules, the right pick for battery projects 15 min · esp32
  19. 19 ESP32: read an MQ-2 gas sensor (the honest reading) 20 min · esp32
  20. 20 ESP32: receive IR remote signals with the VS1838B 20 min · esp32
  21. 21 ESP32: detect motion with a PIR motion sensor 20 min · esp32
  22. 22 ESP32: read a soil moisture sensor (capacitive, not resistive) 20 min · esp32
  23. 23 ESP32: measure DC current with the ACS712 current sensor 25 min · esp32
  24. 24 ESP32: measure ambient light in lux with the BH1750 20 min · esp32
  25. 25 ESP32: read a BME280 temperature, humidity, and pressure sensor 25 min · esp32
  26. 26 ESP32: read a DS18B20 temperature sensor with OneWire 25 min · esp32
  27. 27 ESP32: read an MPU6050 accelerometer and gyroscope over I2C 30 min · esp32
  28. 28 ESP32: GPIO basics, digital read, digital write, and the pull-up trick 20 min · esp32
  29. 29 ESP32: ESP-MESH, a self-healing Wi-Fi network 45 min · esp32
  30. 30 ESP32: ESP-NOW, peer-to-peer messages without a router 30 min · esp32
  31. 31 ESP32: use mDNS so the chip responds to a friendly name 25 min · esp32
  32. 32 ESP32: set up a captive portal for Wi-Fi configuration 30 min · esp32
  33. 33 ESP32: mains power with the HLK-PM01 isolated supply 30 min · esp32
  34. 34 ESP32: run from a USB battery bank (and why most of them break) 20 min · esp32
  35. 35 ESP32: supercapacitor backup for graceful power-off 25 min · esp32
  36. 36 ESP32: solar + 18650 battery for perpetual projects 30 min · esp32
  37. 37 ESP32: negotiate USB-C PD voltages with a trigger board 25 min · esp32
  38. 38 ESP32: power with a LiPo battery and TP4056 or MCP73831 charger 25 min · esp32
  39. 39 ESP32: HTTP server in depth, routing, JSON APIs, and async handlers 45 min · esp32
  40. 40 ESP32: NVS (Non-Volatile Storage), the right way to persist settings 25 min · esp32
  41. 41 ESP32: sign OTA firmware updates so attackers cannot push their own 30 min · esp32
  42. 42 ESP32: RTC memory, the fast persistent storage that survives deep sleep 20 min · esp32
  43. 43 ESP32: secure boot and flash encryption, the real product build 30 min · esp32
  44. 44 ESP32: TLS in depth, root CAs, and validating real certificates 30 min · esp32
  45. 45 ESP32: TCP sockets in depth, the protocol your MQTT rides on 40 min · esp32
  46. 46 ESP32: WebSocket server, the right protocol for live dashboards 45 min · esp32
  47. 47 ESP32: LoRa to MQTT gateway, one-channel bridge from off-grid to Wi-Fi 40 min · esp32
  48. 48 ESP32 + LoRa: Meshtastic, the off-grid mesh firmware 45 min · esp32
  49. 49 ESP32: LoRa peer-to-peer, two boards talking without Wi-Fi 40 min · esp32
  50. 50 ESP32: measure ambient light with the BH1750 lux sensor 20 min · esp32
  51. 51 ESP32: add precision analog inputs with the ADS1115 30 min · esp32
  52. 52 ESP32: environmental sensing with the BME680 25 min · esp32
  53. 53 ESP32: build a digital scale with a load cell and HX711 30 min · esp32
  54. 54 ESP32: push notifications with ntfy.sh, self-hosted 25 min · esp32
  55. 55 ESP32: send email alerts over SMTP, no cloud service 35 min · esp32
  56. 56 ESP32: record audio with an INMP441 I2S microphone 35 min · esp32
  57. 57 ESP32: read RFID tags with the RC522 30 min · esp32
  58. 58 ESP32: read bridge sensors with the ADS1115 in differential mode 45 min · esp32
  59. 59 ESP32: gesture, proximity, and color sensing with the APDS9960 40 min · esp32
  60. 60 ESP32: hosted MQTT brokers vs self-hosting 30 min · esp32
  61. 61 ESP32: measure whole-house AC current with an SCT-013 35 min · esp32
  62. 62 ESP32: long-term air quality with the BME680 (baseline tracking over MQTT) 45 min · esp32
  63. 63 ESP32: location and time from a NEO-M8N GPS module 30 min · esp32
  64. 64 ESP32: connect to Home Assistant two ways (ESPHome and MQTT) 45 min · esp32
  65. 65 ESP32-CAM: photo delivery patterns over ntfy (attach, caption, thumbnail) 35 min · esp32
  66. 66 ESP32: push readings into InfluxDB over HTTP 30 min · esp32
  67. 67 ESP32: detect motion through walls with the RCWL-0516 radar 30 min · esp32
  68. 68 ESP32: read high temperatures with a K-type thermocouple and MAX6675 30 min · esp32
  69. 69 ESP32: read battery voltage and fuel gauge (MAX17048) instead of guessing 30 min · esp32
  70. 70 ESP32: read sound level with an analog microphone module 25 min · esp32
  71. 71 ESP32: add 8 analog inputs over SPI with the MCP3008 35 min · esp32
  72. 72 ESP32: read temperature with a $1 NTC thermistor (Steinhart-Hart done simply) 30 min · esp32
  73. 73 ESP32: sync time over NTP and handle timezones + DST correctly 30 min · esp32
  74. 74 ESP32: talk to GPS, GSM, or another MCU over UART2 30 min · esp32
  75. 75 ESP32: add login auth to your web server (session cookies, the right way) 40 min · esp32
  76. 76 ESP32: assign a static IP and reserve it in the router 20 min · esp32
  77. 77 ESP32: timer interrupts and why loop() timing drifts 40 min · esp32
  78. 78 ESP32: measure water quality (TDS) with the analog TDS sensor 35 min · esp32
  79. 79 ESP32: serve a real web app from LittleFS instead of string-built HTML 45 min · esp32
Buy the book — $29

Buy URL placeholder. Drop your Gumroad or Lemon Squeezy link in the book's frontmatter when you are ready.

ctrlaltbrian

Pico and MicroPython: from setup to PIO

The fastest path from a Pico in a box to projects that use MicroPython, PIO, Wi-Fi, and sensors.

In progress (27 chapters) 27 chapters ready

Pico and MicroPython: from setup to PIO

The fastest path from a Pico in a box to projects that use MicroPython, PIO, Wi-Fi, and sensors.

$22 · target: 5+ chapters to ship

Table of contents (27)
  1. 01 Pico: get started with MicroPython on the Raspberry Pi Pico 15 min · pico
  2. 02 Pico W: serve a web page from the chip over Wi-Fi 30 min · pico
  3. 03 Pico: read a DHT22 with MicroPython 20 min · pico
  4. 04 Pico: drive a servo motor with MicroPython 20 min · pico
  5. 05 Pico: blink the onboard LED with MicroPython (the 5-minute start) 10 min · pico
  6. 06 Pico: use PIO to drive WS2812B LEDs (NeoPixels) 45 min · pico
  7. 07 Pico W: publish MQTT messages from MicroPython over Wi-Fi 30 min · pico
  8. 08 Pico W: serve a live sensor dashboard over Wi-Fi 30 min · pico
  9. 09 Pico: I2C in depth with MicroPython, scanners and bus recovery 30 min · pico
  10. 10 Pico: PWM in depth with MicroPython, frequencies and duty cycles 30 min · pico
  11. 11 Pico: UART serial with MicroPython, talking to other chips 30 min · pico
  12. 12 Pico W: async web server with uasyncio, the modern pattern 40 min · pico
  13. 13 Pico W: Bluetooth Low Energy peripheral with MicroPython and aioble 45 min · pico
  14. 14 Pico 2: getting started with the RP2350 and MicroPython 20 min · pico
  15. 15 Pico 2: drive a DVI display over HSTX, the new thing on RP2350 60 min · pico
  16. 16 Pico 2: PIO state machine improvements on RP2350 vs RP2040 30 min · pico
  17. 17 Pico 2: TrustZone on the RP2350, when the secure world matters 30 min · pico
  18. 18 Pico: run multiple tasks with asyncio 35 min · pico
  19. 19 Pico: log sensor data to microSD with timestamps 30 min · pico
  20. 20 Pico: drive DC motors with the L298N 30 min · pico
  21. 21 Pico W: send email alerts over SMTP 40 min · pico
  22. 22 Pico: measure wind speed with an anemometer 35 min · pico
  23. 23 Pico: GPS location and time with the NEO-6M 30 min · pico
  24. 24 Pico: read the RP2040's built-in temperature sensor 15 min · pico
  25. 25 Pico: program the Pico with the Arduino core (when C++ is the right tool) 30 min · pico
  26. 26 Pico: drive a 28BYJ-48 stepper motor with a ULN2003 driver 30 min · pico
  27. 27 Pico W: set a static IP for a reliable local device 20 min · pico
Buy the book — $22

Buy URL placeholder. Drop your Gumroad or Lemon Squeezy link in the book's frontmatter when you are ready.