Labs

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: Components
    In this lab you will learn about some of the components you’ll use frequently when making electronic circuits.
  • Lab: Electronics
    This 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 Breadboard
    This lab shows how to set up a breadboard with an independent power supply (9-12V) through a 5V Voltage Regulator (7805).
  • Lab: Soldering
    In this tutorial you’ll learn the basics of soldering for electronics.
  • Lab: Switches and Pushbuttons
    In this lab you will learn about different types of switches and their terminology
  • Lab: Level Shifting
    In this lab you’ll learn about converting voltage levels to make components communicate better.

Arduino Fundamentals

  • Labs: Arduino Digital and Analog
    The following labs introduce Digital and Analog Inputs and Outputs to and from the Arduino.
  • Lab: Digital Input and Output with an Arduino
    In 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 Arduino
    In 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 Arduino
    In this tutorial you’ll learn how to generate simple tones on an Arduino
  • Lab: Servo Motor Control with an Arduino
    In 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 Detection
    In this lab you’ll learn some methods for determining when a sensor’s reading changes significantly.

Arduino not-so-Fundamentals

Sensors

  • Lab: Components
    In this lab you will learn about some of the components you’ll use frequently when making electronic circuits.
  • Lab: Analog In with an Arduino
    In 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 Detection
    In this lab you’ll learn some methods for determining when a sensor’s reading changes significantly.
  • Lab: I2C Communication With An Infrared Temperature Sensor
    In 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: Serial IMU Output to p5.js
    In 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 Sensor
    The 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 Encoder
    In this lab, you’ll learn how to use a rotary encoder as an input to a microcontroller.

Serial Communication

Asynchronous Serial

p5.js

  • Lab: Intro to Asynchronous Serial Communications
    In 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.
  • Lab: Serial Input to P5.js
    n 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
    In 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 P5.js
    In this tutorial you’ll learn how to send data using asynchronous serial between an Arduino and p5.js in both directions.
  • Lab: Bluetooth LE and p5.ble
    This exercise introduces you to how to communicate between a Bluetooth LE-equipped microcontroller and p5.js using the p5.ble library.
  • Lab: Serial IMU Output to p5.js
    In 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: Arduino and p5.js using a Raspberry Pi
    For 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.

Processing

node.js

  • Lab: Serial Input to an Arduino from Node.js
    In 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.js
    In 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 Pi
    For 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 Sensor
    In 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.
  • I2C Communication With a Color, Gesture, and Proximity sensor
    In 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.

SPI

MIDI

Motors

USB

Mouse

  • Lab: Mouse Control
    In 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 Pushbuttons
    In 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 Joystick
    In 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 Control
    In this lab, you’ll build an alternative computer keyboard using any of the USB-native boards

Bluetooth

  • Lab: Bluetooth LE and p5.ble
    This exercise introduces you to how to communicate between a Bluetooth LE-equipped microcontroller and p5.js using the p5.ble library.