# Electronics Basics: Sensors, Inputs, and Outputs Guide
> Learn electronics essentials: the difference between analog and digital sensors, using microcontrollers, transistors for high power, and PWM for motion.

Tags: electronics, sensors, microcontroller, arduino-basics, robotics, digital-analog, stemeducation
## Basics of Electronics: Sensors & I/O
* Overview of the robotic cycle: SENSE (Input), THINK (Process), and ACT (Output).
* Understanding Inputs as signals sent TO the microcontroller and Outputs as signals FROM it.

## Analog vs. Digital Signals
* Digital: Discrete states (HIGH/LOW, 1 or 0).
* Analog: Continuous range of values.
* ADC (Analog to Digital Converter): Translates 0-5V into digital values (0-1023).

## Sensors (Inputs)
* Digital: Examples include push buttons and reed switches.
* Analog: Sensors like LDRs (light), Thermistors (temp), and Potentiometers (rotation) that change resistance.

## Actuators (Outputs)
* LEDs: Require resistors to limit current; controlled via HIGH/LOW signals.
* High Power: Microcontrollers only provide 20-40mA; Transistors/MOSFETs are used to control high-current devices like motors (500mA+).
* PWM (Pulse Width Modulation): Simulates varying analog voltages on digital pins.

## Motion and Logic
* DC Motors: Speed and direction controlled via H-Bridges.
* Ultrasonic Sensors (HC-SR04): Calculate distance based on speed of sound.
* Programming Logic: Using IF/ELSE statements to create autonomous behavior.
* Best Practices: Creating flowcharts to map decision logic before coding.
---
This presentation was created with [Bobr AI](https://bobr.ai) — an AI presentation generator.