Part 1: Hardware

Understanding Analog and Digital Signals

Electronic components communicate using two primary types of signals: digital and analog. A digital signal has only two possible values, typically represented as HIGH (on) or LOW (off). An analog signal, however, can vary continuously across a range of values. Think of a light switch versus a dimmer; the switch is digital (on/off), while the dimmer is analog, allowing for varying levels of brightness. Many sensors in the real world, such as those measuring light, sound, or temperature, provide analog information.
Picture
Digital signals have only two discrete states (HIGH/LOW), while analog signals can represent a continuous range of values.
Analog Devices Examples:
  • Light Dependent Resistor (LDR) - measures light intensity
  • Potentiometer - variable resistor for manual input
  • Thermistor - measures temperature
  • Flex sensor - measures bending amount
  • Force-sensitive resistor - measures pressure or weight
  • Joystick (X and Y axes) - provides positional input
  • Microphone module - detects sound levels
  • Analog temperature sensor (e.g., TMP36)
  • Soil moisture sensor
  • Ultrasonic sensor (distance measurement)
  • Analog gas sensors
  • pH sensor
  • Heart rate sensor
​Digital Sensors Examples:
  • Push buttons and switches
  • Digital temperature and humidity sensor (DHT11/DHT22)
  • PIR motion sensor
  • Magnetic reed switch
  • Tilt sensor
  • Vibration sensor
  • IR obstacle detector
  • Color sensor
  • Digital compass
​Digital Output Examples:
  • LEDs (single color)
  • Buzzers (active)
  • Relays
  • Servo motors
  • LCD displays
  • 7-segment displays
  • Neopixel LEDs (addressable)
  • Solenoids