### Agenda: Make sure you can talk to your microcontroller! If you want to use ESP32, follow [these instructions](https://randomnerdtutorials.com/installing-esp32-arduino-ide-2-0/). 1. Open Arduino IDE (install v. 1.8 and/or 2.0) 2. Plug in your microcontroller (ask if you need a cable) 3. Go to Tools > Board > *Uno/ESP32/etc.* 4. Find Tools > Port > *your microcontroller* 5. Open File > Examples > Basics > Blink 6. Upload the file 12:00: Website Review <br> 12:30: Overview of <a href='../../lab/electronics/electronics.html' target="_self"> Electronics basics</a> <br> 1:00: Workshop on <a href='../../lab/arduino/arduino.html' target="_self">microcontroller programming</a>, (conditional statements, loops, pullup resistors).<br> 1:45: Break<br> 2:00: <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. <!-- Review <a href='../../lab/arduino/micro.html'>Introduction to microcontrollers</a>, <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><br> 4:00: <a href='./mechanisms.html'>Mechanism design</a> <br> 4:15: <a href='./foundations'>Arduino Foundations</a>, <a href='./documentation'>Documenting code</a> <br> --> ### Labs: Use the <a href='../../lab/electronics/electronics.html' target="_self"> Electronics basics</a> page and its links. - 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, [Flastad](https://www.falstad.com/circuit/), [circuit-diagram.org](https://www.circuit-diagram.org/), Fusion 360 (Eagle), 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>. - Draw a schematic of your circuit. Use a hand sketch, [Flastad](https://www.falstad.com/circuit/), Fusion 360 (Eagle), or other. - Bring your circuit to class Tuesday 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) <!-- Some good precedents include <a href='https://sophiecwebster.github.io/PHYSCI-70/03_kinetic/index.html'>Sophie's flock of birds</a>, <a href='http://www.seansullivan.ai/physci-70/post/week3/'>Sean's drawing machine</a>, <a href='https://kassialove.github.io/PS70-assignments/week3.html'>Kassia's dancers</a>, <a href='https://tomkinsc.github.io/harvard-ps70/2020-02-13/'>Chris's Geneva drive</a>, and <a href='https://mturner6300.github.io/PHYSCI-70/simple-demo/01_intro/week3.html'>Megan's bird</a>. Some examples of kinetic sculptures made with common household supplies can be seen from last summer's course, <a href='https://silviafesta.github.io/PHYS_S-12/Assignments/assignment3.html'>especially Silvia's clever use of string</a>, <a href='https://michelleyl78.github.io/PHYS_S-12/04_class/04_class.html'>Michelle's method of making circular cams</a>, <a href='https://samjo4788.github.io/PHYSCI-70/Week03/index03.html'>Sam's cardboard gears</a>, <a href='https://azswartz.github.io/PS-70/week3/week3.html'>Avi's highlighter machine</a>, and <a href='https://wujibi123.github.io/PHYS_S-12/04_RapidPrototyping/index.html'>Dan's mechanism</a>. --> ### 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>