• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
Maker Hacks

Maker Hacks

Ideas, news & tutorials for makers and hackers – Arduino/Raspberry Pi, 3D printing, robotics, laser cutting, and more

  • Home
  • About
  • 3D Printing
  • Laser Cutting
  • YouTube
  • Free Arduino Course
  • Recommendations
  • Contact

Day 6: Lessons – Reading Inputs

You are here: Home / 30 Days to Arduino Programming Course / 30 Days to Arduino Lessons / Day 6: Lessons – Reading Inputs

Today’s examples are all about reading values from the input pins.

The simplest is, of course, the digital button, which is binary (on/off). To get an accurate reading we use a 220 ohm resistor to stop the reading from floating somewhere in the range of 0 to 1.

Digital Button with Pulldown Resistor

Analog

The more interesting sensors and readings tend to be more than on/off. This is also where the Arduino can stand apart from some of its rivals that do not have as many (or any) analog inputs.

Analog readings are a number between 0 and 1023 (1024 values total), so quite fine readings can be taken. We can demonstrate this using a Potentiometer (Pot).

LED Dimmer Switch

Dial an RGB LED Color with 3 Pots

AA (1.5v) Battery Tester

  • 3D Printing
  • CNC
  • Hardware
  • Laser Cutting
  • News
  • Retro Computing
  • Software

amiga amos arduino basic programming budget buying cad cnc commodore corexy c programming creality crypto doctor who emulation esp32 esp8266 filament fpga glowforge Hacks Ideas kids lighting linux Makes making Monoprice Parts pc props prusa python raspberry pi ratrig resin Reviews robots software sounds technology tips upgrades wanhao xtool

.

Maker Hacks Blog Copyright © 2023 · All Rights Reserved · Powered by Mai Theme