CS341 Lab PDF
Document Details
Uploaded by SmoothestSunstone
UMass Boston
Praveendhra Rajkumar
Tags
Summary
This document provides a detailed description of a CS341 lab, covering topics such as lab structure, lab reports, introduction to Arduino, components, and other electronics-based hardware. It includes examples and instructions for the lab.
Full Transcript
CS341 Lab Welcome to the CS341 Lab! ▸ TA: Praveendhra Rajkumar ▸ Email: [email protected] ▸ Sub: CS341_student_interaction_<your_name> ▸ Materials will be uploaded in blackboard soon after each session. Feel free to email me or message me on discord with questions. I don’t have set office hour...
CS341 Lab Welcome to the CS341 Lab! ▸ TA: Praveendhra Rajkumar ▸ Email: [email protected] ▸ Sub: CS341_student_interaction_<your_name> ▸ Materials will be uploaded in blackboard soon after each session. Feel free to email me or message me on discord with questions. I don’t have set office hours just email me and we can setup a time in person or over zoom. Structure of Labs: ▸ Meet once per week in your assigned sections. ▸ We will split up into groups of two and each group will have one package of hardware, as well as 1 or 2 computers ▸ In some cases we will have groups of 3. ▸ Groups will submit one lab report per group due one week after the lab date. ▸ Include the name(s) of your teammate(s) ! Lab Reports: ▸ Reports are concise, 2-3 pages typically, 4 at most ▸ Reports will be structured as follows: ▸ ▸ ▸ ▸ Word document, single spaced (available on blackboard) Components: with some detailed specifics Summary: what was the objective? Results: What happened? Did you accomplish the objective? Explain what challenges you had if any. ▸ Conclusions: what did you take away from this? ▸ Code: copy the code and paste it to the end if a legible way. Don’t screenshot it or I can’t easily test it. ▸ Graded out of 10 points Introduction to Lab 1 ▸ Hardware: ▸ Arduino Uno R3 ▸ Resistors, Wires, LED ▸ Breadboard ▸ Computer ▸ Software: ▸ Programs for Arduino are called Sketches ▸ C with extensions ▸ Description: ▸ Using the Arduinos and some sample code make the board’s built-in LED blink ▸ Change the rate of blinking ▸ Wire an LED to the board correctly and alter the code so your new LED now blinks instead ▸ Serial output “hello world…” Arduino Explained: ▸ Open-source hardware and software ▸ Interface with Shields (expansion boards) Breadboards, analog and digital I/O devices ▸ On the Board: ▸ ▸ ▸ ▸ ▸ ▸ ▸ ▸ ▸ ▸ ▸ ▸ ATmega328P microcontroller 16MHz Oscillators Digital and analog pins USB controller USB Port Buttons LEDs Barrel Jack Voltage regulator Capacitors Resistors Fuse Other Hardware in Lab 1 ▸ Resistors: alter resistance through an electrical circuit. ▸ LED: Light Emitting Diode. Diodes are semiconductors which allow current to flow in one direction only. LEDs are diodes with light-emitting semiconductors ▸ Breadboard: a prototyping board for creating and testing electronics easily without soldering ▸ Wires: Width of a wire largely determines its use cases. It’s important that you don’t exceed the max current rating of a wire and consider the resistance of the wire. Resistance across a wire is related to both the gauge (width) and length being used. Reading Resistors: How does a breadboard work? Rail (enlarged) Front Back Sketches and the Arduino IDE Verify (compile) code Upload code to Arduino ▸ Based on C ▸ ▸ ▸ With extensions setup() and loop() ▸ core functions of a sketch ▸ See example (highlighted with arrows) and try to understand how these functions are used practically Arduinos are good at performing tasks with hardware and can be used for prototyping electronics that require a microcontroller. Debugging Terminal Some cool things you can do with Arduino This robot on the left aims and shoots at the dartboards. This robot on the right is programmed to perform some movements related to certain emotions. Thank You!