### Agenda: Make sure you can talk to your MCU! Follow [these instructions](https://randomnerdtutorials.com/installing-esp32-arduino-ide-2-0/) - Open Arduino IDE - Plug in your microcontroller (ask if you need a cable) - Go to Tools > Board > ESP32 Arduino > select XIAO_ESP32C3 - Dropdown menu, "Select other board and port", select your MCU - Open File > Examples > Basics > AnalogReadSerial - Upload the file, touch pin A0, confirm it responds to touch - Bookmark the [pin mapping](https://forum.seeedstudio.com/uploads/default/original/2X/9/96d54945575d63e62df19a60f4c47e3048c6f5ce.png) 3:15: Introductions / Assignment Review <br> 3:40: Overview of <a href='../../lab/electronics/electronics.html' target="_self"> Electronics basics</a> <br> 4:15: <a href='../../lab/arduino/L9110.html' target="_self">Use the L9110 H Bridge Power Driver to drive a motor.</a> Write a new function to give the motor commands. <br> 4:45: Break<br> 5:00: Workshop on <a href='../../lab/arduino/arduino.html' target="_self">microcontroller programming</a>, (conditional statements, loops, pullup resistors).<br> ### Labs: Use the <a href='../../lab/electronics/electronics.html' target="_self"> Electronics basics</a> page and its links. See Lab <a href='../../lab/arduino/Arduino_Programming_Fundamentals_ESP32_2026.pdf' target="_self">slides</a> 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. <a href='../../lab/arduino/foundations.html' target="_self">Programming Fundamentals Workshop</a>, <a href='../../lab/arduino/arduino.html'>conditional statements and loops</a>, help with assignments. ### Assignment: Program an Arduino board to do something. The examples in the <a href="https://www.eitkw.com/wp-content/uploads/2020/03/Arduino_Projects_Book.pdf">Arduino Projects Book</a> provide good starting points. You may also wish to use this assignment to build on the previous assignment. - Include <a href='../../lab/website/codetags.html' target="_self">code snippets in your documentation</a>. - 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: <p> <a href='../../lab/arduino/micro.html' target="_self">Introduction to microcontrollers</a>, <a href='../../lab/arduino/arduino.html' target="_self">conditional statements and loops</a>, <a href='../../lab/arduino/foundations.html' target="_self">Arduino Foundations</a>. Arduino: <a href='https://www.arduino.cc/en/Tutorial/DigitalPins'> Digital Pins</a>, <a href='https://www.arduino.cc/en/Tutorial/AnalogInputPins'> Analog Input Pins</a>, <a href='https://www.arduino.cc/en/Tutorial/PWM'> PWM</a>, and <a href='https://www.arduino.cc/en/Tutorial/Memory'>Memory</a><p> <p><a href="https://www.eitkw.com/wp-content/uploads/2020/03/Arduino_Projects_Book.pdf">Arduino Projects Book</a> Chapters 1-3. </p> <h3> Resources: </h3> <p> <a href='https://www.arduino.cc/en/Tutorial/Foundations'>Arduino Foundations</a> <br> <a href='https://www.arduino.cc/reference/en/'>Language Reference:</a> Discover the what each term of the Arduino code language means. <br> <a href='https://www.arduino.cc/en/Tutorial/Variables'>Variables:</a> Understand how to define and use variables in a Sketch. <br> <a href='https://www.arduino.cc/en/Reference/FunctionDeclaration'>Functions:</a> Learn how to define and use functions in a Sketch. <br> </p>