1 of 31

Embedded Part 2

2025

2 of 31

Overview

Part 1 - Recap

  • Microcontrollers
  • Hardware Basics & Wiring
  • Sensors

Part 2 - More Sensors & Actuators

  • Buzzer
  • Ultrasonic Sensor

Part 3 - Wireless Connectivity

  • Wifi & BLE basics

Part 4 - Challenge Yourself

3 of 31

Recap - What is a Microcontroller?

  • Basically a tiny computer on a single circuit

  • ESP32, STM32, Atmega328P

  • GPIO pins interact with other hardware

4 of 31

Recap - The ESP32

We must know pin numbers to access them in code.

Search up “pinout diagram” for

whichever microcontroller you use.

5 of 31

Recap - GPIO pins

6 of 31

Recap - Resistors

Control voltage levels and prevent components from burning out

7 of 31

Recap - Breadboard

8 of 31

Recap - Wiring

use a resistor between 200 - 5000 Ohms

9 of 31

Recap - PWM

10 of 31

Recap - Push Button

11 of 31

Recap - Potentiometer

12 of 31

Recap- Potentiometer

13 of 31

Recap

14 of 31

Buzzer

positive terminal

15 of 31

Buzzer

16 of 31

WiFi - Setup

Wifi Modes

Wifi.mode(WIFI_STA): ESP32 connects to an access point

Wifi.mode(WIFI_AP): Other devices can connect to the ESP32

17 of 31

WiFi - Setup

18 of 31

WiFi - Station Mode

19 of 31

WiFi - Access Point Mode

https://randomnerdtutorials.com/esp32-useful-wi-fi-functions-arduino/

20 of 31

WiFi - Scanning Networks

number of networks found

21 of 31

WiFi - Scanning Networks

SSID: Name of the WiFi network

RSSI: Strength of the WiFi signal (negative number)

22 of 31

WiFi - Scanning Networks

SSID: Name of the WiFi network

RSSI: Strength of the WiFi signal (negative number)

d = 10^((TxPower - RSSI) / (10 * N))

23 of 31

WiFi - Connect to a Network

24 of 31

Web Servers!

25 of 31

Ultrasonic Sensor

speed of sound in air at 20ºC = 343m/s

distance = (speed of sound * time) / 2

26 of 31

Ultrasonic Sensor

27 of 31

Ultrasonic Sensor

28 of 31

Ultrasonic Sensor

29 of 31

Ultrasonic Sensor

30 of 31

Build your own clanker

31 of 31

Thank You