Embedded systems and IoT

Stage 2 · Lesson 5 of 7

Pull-ups, pull-downs and buttons

Electronics you need

An input pin connected to nothing floats: it picks up noise and reads random values. A resistor ties it weakly to the supply so it reads high until something pulls it low; a pull-down does the opposite. A button between the pin and ground with a pull-up reads high when released and low when pressed.

Most have internal pull-ups you can enable in code, and lines need pull-ups as well, which you will meet in the protocols stage. Typical external values are a few kilohms to tens of kilohms.

Common trapwiring a button with no pull resistor at all, then chasing an input that changes when you move your hand near it, which feels like a software bug but is physics.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with

  • BookFree
    All About Circuits Textbook

    All About Circuits · Beginner

    Free: read the DC volume chapters on Ohm's law, series and parallel circuits and dividers

Keep handy

Also worth your time

Mark this stage as not done?