The labs are step-by-step exercises to demonstrate the techniques covered in the Lessons. There are also videos that go along with these labs. The videos and topic pages related to each lab are linked within each lab page for further reading or viewing.
There is a lab activity for nearly every class in the first half of the semester. The labs contain the basic steps you need to go through to understand the technical concepts covered in class that week. You should complete the steps outlined in the lab activity before class each week, so that you understand practically what it is we’re talking about. Document your lab work on your blog. Include any insights or problems, and details not covered in the class or the lab that you think will be useful for your fellow students and future students in this class.
There are also many labs for topics not covered in the syllabus. Think of all the labs as recipes for techniques that you might need in your projects.
Electronics
- Lab: ComponentsIn this lab you will learn about some of the components you’ll use frequently when making electronic circuits.
- Lab: ElectronicsThis lab will introduce you to a few basic electronic principles by trying them in action. You’ll learn how to measure voltage, amperage, and resistance using a multimeter. You will also learn about components in series vs. parallel and be introduced to Ohm’s Law in practice.
- Lab: Setting Up A BreadboardThis lab shows how to set up a breadboard with an independent power supply (9-12V) through a 5V Voltage Regulator (7805).
- Lab: SolderingIn this tutorial you’ll learn the basics of soldering for electronics.
- Lab: Switches and PushbuttonsIn this lab you will learn about different types of switches and their terminology
- Lab: Level ShiftingIn this lab you’ll learn about converting voltage levels to make components communicate better.
Arduino Fundamentals
- Labs: Arduino Digital and AnalogThe following labs introduce Digital and Analog Inputs and Outputs to and from the Arduino.
- Lab: Digital Input and Output with an ArduinoIn this lab, you’ll connect a digital input circuit and a digital output circuit to a microcontroller. Though this is written for the Arduino microcontroller module, the principles apply to any microcontroller.
- Lab: Analog In with an ArduinoIn this lab, you’ll learn how to connect a variable resistor to a microcontroller and read it as an analog input. You’ll be able to read changing conditions from the physical world and convert them to changing variables in a program.
- Lab: Tone Output Using An ArduinoIn this tutorial you’ll learn how to generate simple tones on an Arduino
- Lab: Servo Motor Control with an ArduinoIn this tutorial, you’ll learn how to control a servomotor’s position from a microcontroller using the value returned from an analog sensor.
- Lab: Sensor Change DetectionIn this lab you’ll learn some methods for determining when a sensor’s reading changes significantly.
Arduino not-so-Fundamentals
- Lab: OLED Screen Display using I2CMany common electronic devices feature small screens for status updates, control feedback, and so forth. These displays feature many different technologies. Lately, one of the most common is the OLED display. These displays are matrices of organic LEDs, each pixel being comprised of one to three LEDS. Small displays typically use either the SPI ...
- Lab: Controlling a Stepper Motor With a Step and Direction DriverIntroduction In the stepper motor and H-bridge lab, you learned how to control a stepper motor with a dual H-bridge driver, specifically the TB6612FNG. This is not the only driver for controlling a stepper. Step & direction stepper drivers offer a simpler approach, from the microcontroller side. They have just two control pins, one for step ...
- Lab: Using a Real-Time ClockIn this lab, you’ll learn how to use a real-time clock on a microcontroller.
Sensors
- Lab: ComponentsIn this lab you will learn about some of the components you’ll use frequently when making electronic circuits.
- Lab: Analog In with an ArduinoIn this lab, you’ll learn how to connect a variable resistor to a microcontroller and read it as an analog input. You’ll be able to read changing conditions from the physical world and convert them to changing variables in a program.
- Lab: Sensor Change DetectionIn this lab you’ll learn some methods for determining when a sensor’s reading changes significantly.
- Lab: I2C Communication With An Infrared Temperature SensorIn this lab, you’ll see synchronous serial communication in action using the Inter-integrated Circuit (I2C) protocol. You’ll communicate with an infrared temperature sensor chip from a microcontroller in order to read the temperature of an object in front of the sensor.
- Lab: I2C Communication With a Color, Gesture, and Proximity sensorIn this lab, you’ll see synchronous serial communication in action using the Inter-integrated Circuit (I2C) protocol. You’ll communicate with a color, gesture, and proximity sensor from a microcontroller.
- Lab: I2C Communication with a Time-of-Flight Distance SensorIntroduction In this lab, you’ll see synchronous serial communication in action using the Inter-integrated Circuit (I2C) protocol with a time-of-flight distance sensor and a microcontroller. Many different sensors on the market use the I2C protocol to communicate with microcontrollers. It is the most common way to connect to advanced sensors these days. The VL53L0X used in this lab ...
- Lab: Serial IMU Output to p5.js Using p5.webserialIn this exercise you’ll read the built-in Inertial Motion Unit on the Arduino Nano 33 IoT, then feed its output into a Madgwick filter to determine heading, pitch, and roll of the board. Then you’ll send the output of that serially to p5.js and use it to move a virtual version of the Nano onscreen.
- Lab: Ultrasonic Distance SensorThe HC-SR04 distance sensor is an inexpensive and ubiquitous distance sensor that gives reasonably reliable distance readings in the 2cm – 4m range. In this lab, you’ll learn how to use this sensor with an Arduino microcontroller.
- Lab: Using a Rotary EncoderIn this lab, you’ll learn how to use a rotary encoder as an input to a microcontroller.
Serial Communication
Asynchronous Serial
- Lab: Intro to Asynchronous Serial CommunicationsIn this lab, you’ll get to know serial communication from a microcontroller to your personal computer a bit more in depth, so that you’re ready to start writing programs in other languages on your computer to interact with our microcontroller.
p5.js webserial library
- Lab: Serial Input to p5.js Using the p5.webserial LibraryThis lab uses a p5.js library called p5.WebSerial to make it easy in p5.js. In this lab, you’ll generate an analog output value from a potentiometer, then send that value via asynchronous serial communication to P5.js. You’ll use that value in P5.js to draw a graph. Web browsers have traditionally been designed to be separate from the ...
- Lab: Serial Output From p5.js Using the p5.webserial LibraryIn this lab you’ll learn how to send data from p5.js to a microcontroller using asynchronous serial communication. Overview When you use the p5.webserial library for P5.js, it uses the W3C’s WebSerial API to allow your browser to communicate with serial ports on your computer. This lab shows you how to use P5 to control ...
- Lab: Two-Way (Duplex) Serial Communication Using An Arduino and the p5.webserial LibraryIntroduction In the Introduction to Asynchronous Serial Communication lab, you learned about various methods for managing the communications between computers via asynchronous serial communication. These included formatting your data as ASCII-encoded strings or raw serial bytes and managing the flow of data using handshaking. In the P5.js WebSerial Input Lab, you sent data from one sensor to ...
- Lab: Serial IMU Output to p5.js Using p5.webserialIn this exercise you’ll read the built-in Inertial Motion Unit on the Arduino Nano 33 IoT, then feed its output into a Madgwick filter to determine heading, pitch, and roll of the board. Then you’ll send the output of that serially to p5.js and use it to move a virtual version of the Nano onscreen.
p5.js serialport library
- Lab: Serial Input to P5.js Using the p5.serialport libraryn this lab, you’ll generate an analog output value from a potentiometer, then send that value via asynchronous serial communication to P5.js. You’ll use that value in P5.js to draw a graph.
- Lab: Serial output from P5.js Using the p5.serialport LibraryIn this lab you’ll learn how to send data from p5.js to a microcontroller using asynchronous serial communication.
- Lab: Two-Way (Duplex) Serial Communication Using An Arduino and the p5.serialport LibraryIn this tutorial you’ll learn how to send data using asynchronous serial between an Arduino and p5.js in both directions.
Processing
- Lab: Serial Output from an Arduino to ProcessingIn this lab, you’ll send data using asynchronous serial communication from a single sensor to a Processing sketch on a personal computer that will then graph the sensor’s value onscreen.
- Lab: Two-way (Duplex) Serial Communication using an Arduino and ProcessingIn this tutorial you’ll learn how to send data using asynchronous serial between an Arduino and Processing in both directions.
node.js
- Lab: Serial Input to an Arduino from Node.jsIn this lab, you’ll send asynchronous serial data from your personal computer to an Arduino microcontroller in order to control a digital output of the microcontroller. Once you’ve done that, you’ll also learn how to interpret ASCII-encoded numeric strings on the Arduino.
- Lab: Serial Communication with Node.jsIn this lab you’ll connect a microcontroller to a web browser using the node.js programming environment, HTML, and JavaScript.
- Lab: Arduino and p5.js using a Raspberry PiFor some applications, you only need a computer with an operating system in order to connect a serial device like an Arduino or other microcontroller with a browser-based multimedia application like p5.js. This page introduces how to do it using node.js, p5.serialserver, and a Raspberry Pi.
Synchronous Serial
I2C
- Lab: I2C Communication With An Infrared Temperature SensorIn this lab, you’ll see synchronous serial communication in action using the Inter-integrated Circuit (I2C) protocol. You’ll communicate with an infrared temperature sensor chip from a microcontroller in order to read the temperature of an object in front of the sensor.
- Lab: I2C Communication With a Color, Gesture, and Proximity sensorIn this lab, you’ll see synchronous serial communication in action using the Inter-integrated Circuit (I2C) protocol. You’ll communicate with a color, gesture, and proximity sensor from a microcontroller.
- Lab: I2C Communication with a Time-of-Flight Distance SensorIntroduction In this lab, you’ll see synchronous serial communication in action using the Inter-integrated Circuit (I2C) protocol with a time-of-flight distance sensor and a microcontroller. Many different sensors on the market use the I2C protocol to communicate with microcontrollers. It is the most common way to connect to advanced sensors these days. The VL53L0X used in this lab ...
- Lab: OLED Screen Display using I2CMany common electronic devices feature small screens for status updates, control feedback, and so forth. These displays feature many different technologies. Lately, one of the most common is the OLED display. These displays are matrices of organic LEDs, each pixel being comprised of one to three LEDS. Small displays typically use either the SPI ...
SPI
- Lab: Data Logging With an SD Card Reader using SPI CommunicationIn this lab you’ll learn about sensor data logging and use SPI communication to write data to a microSD card from an Arduino.
- Lab: Playing .WAV Files from an Arduino using I2S and SPIIntroduction Playback of digital sound files is a popular use of microcontrollers. The Inter-IC Sound (I2S) protocol makes this possible. In this lab, you’ll learn how to use the I2S bus on the Arduino Nano 33 IoT in combination with the SPI bus to read a .wav sound file from a microSD card and play ...
- Lab: SPI Communication With A Digital PotentiometerIn this lab, you’ll see synchronous serial communication in action using the Serial Peripheral Interface (SPI) protocol. You’ll communicate with a digital potentiometer chip from a microcontroller.
MIDI
- Lab: MIDI Output using an ArduinoThis lab covers only the details of MIDI communication on the Arduino module.
- Lab: Arduino to Digital Audio WorkstationThis lab covers the process of taking MIDI messages sent from the Arduino and creating sound with them via a Digital Audio Workstation (DAW) such as Ableton LIVE, Logic or Garageband.
Motors
- Lab: Servo Motor Control with an ArduinoIn this tutorial, you’ll learn how to control a servomotor’s position from a microcontroller using the value returned from an analog sensor.
- Labs: Motors and TransistorsThe following labs are about controlling DC motors and other high-current loads with transistor and H-Bridges.
- Lab: Using a Transistor to Control a High Current LoadIn this tutorial, you’ll learn how to control a high-current load with a transistor.
- Lab: DC Motor Control Using an H-BridgeIn this tutorial, you’ll learn how to control a DC motor’s direction using a DC Motor Driver.
- Lab: Using a Transistor to Control High Current Loads with an ArduinoIn this tutorial, you’ll learn how to control a high-current DC load such as a DC motor or an incandescent light from a microcontroller.
- Lab: Controlling a Stepper Motor With an H-BridgeThis lab shows you how to set up a unipolar stepper motor using an H-Bridge.
- Lab: Controlling a Stepper Motor With a Step and Direction DriverIntroduction In the stepper motor and H-bridge lab, you learned how to control a stepper motor with a dual H-bridge driver, specifically the TB6612FNG. This is not the only driver for controlling a stepper. Step & direction stepper drivers offer a simpler approach, from the microcontroller side. They have just two control pins, one for step ...
USB
Mouse
- Lab: Mouse ControlIn this lab, you’ll build an alternative computer mouse using any of the USB-native boards. You’ll also learn some techniques for determining when a user takes a physical action.
- Lab: Mouse Control With PushbuttonsIn this lab, you’ll build an alternative computer mouse using an Arduino Leonardo using pushbuttons to move the mouse left, right, up and down. You’ll see the difference between reading a digital input continually and reading for a change of state.
- Lab: Mouse Control With JoystickIn this lab, you’ll build an alternative computer mouse using an Arduino Leonardo using a joystick to move the mouse left, right, up and down. You’ll use the joystick’s select button to replace the mouse button as well.
Keyboard
- Lab: Keyboard ControlIn this lab, you’ll build an alternative computer keyboard using any of the USB-native boards
Bluetooth
- Lab: Bluetooth LE and p5.bleThis exercise introduces you to how to communicate between a Bluetooth LE-equipped microcontroller and p5.js using the p5.ble library.