### Agenda:
_Make sure you can talk to your ESP32 microcontroller! After downloading Arduino IDE, follow [these instructions](https://randomnerdtutorials.com/installing-esp32-arduino-ide-2-0/). However, select either the XIAO C3 or the ESP32 Dev Board (not the DOIT Devkit). And instead of wiring up an LED, just upload the code at File -> Examples -> Examples for ESP32 -> WiFi -> SimpleWiFiServer to verify that it works._
12:00: Introductions / Assignment Review
12:30: Overview of Electronics basics
1:00: Use the L9110 H Bridge Power Driver to drive a motor. Write a new function to give the motor commands.
1:45: Break
2:00: Workshop on microcontroller programming, (conditional statements, loops, pullup resistors).
### Labs:
Use the Electronics basics page and its links.
See Lab slides on programming fundamentals.
- Use the multimeter in voltage, resistance, and continuity modes.
- Build a voltage divider circuit. Build a potentiometer circuit.
- Build and measure circuits with resistors in parallel and series.
- Practice drawing schematics. Use a hand sketch, [circuit-diagram.org](https://www.circuit-diagram.org/), [EasyEDA](https://easyeda.com/), or other.
Programming Fundamentals Workshop, conditional statements and loops, help with assignments.
### Assignment:
Program an Arduino board to do something. The examples in the Arduino Projects Book provide good starting points. You may also wish to use this assignment to build on the previous assignment.
- Include code snippets in your documentation.
- Use a hand sketch, [circuit-diagram.org](https://www.circuit-diagram.org/), [EasyEDA](https://easyeda.com/), or other.
- Bring your circuit to class and be ready to do a brief live demo.
Next week we will talk about 3D printing, and a bit more about 3D modeling. Take a moment to think about your final project proposal. Will it require 3D printed parts?
### Examples:
- [Mohammed's Butterfly](https://mohammed-mutaher.github.io/PHYSCI-70/04/index4.html)
- [Michael's Mechanism](https://mezhang2000.github.io/PHYSCI70/04/week_4.html)
- [Isa's Carousel](https://isaberliner.github.io/PHYSCI-70/04/index4.html)
- [PK's LEDs + Potentiometer](https://laurenbhr.github.io/PHYSCI-70/04_micro/index.html)
- [Kalos' Winch](https://ingenuitive.github.io/PHYSCI-70/week4.html)
### Reading:
Introduction to microcontrollers, conditional statements and loops, Arduino Foundations. Arduino: Digital Pins, Analog Input Pins, PWM, and Memory
Arduino Projects Book Chapters 1-3.
Resources:
Arduino Foundations
Language Reference: Discover the what each term of the Arduino code language means.
Variables: Understand how to define and use variables in a Sketch.
Functions: Learn how to define and use functions in a Sketch.