Your microcontroller has the ability to read variable voltages, but what about writing a variable voltage? Unfortunately, unless we’re using a high end microcontroller with a built in DAC (digital to analog converter), there’s no way to get a true analog voltage out of the microcontroller. However, we can fake it with a technique called Pulse Width Modification (PWM).
Notes on Switches
Switches
The switch is about as basic a sensor as you can get. As such, it’s easy to overlook their versatility, use, and gloss over the different kinds of switches that are out there. They are best for detecting presence. They provide the answer to the question “Is something there or not?”
Some basic thoughts on electricity and electronics
At the end of the day, all we’re doing with a circuit is wrangling electrons. These little buggers want to move from a place of higher potential energy (often referred to as power) to a place of lower potential energy (often called ground). Some analogies for how electricity works in a circuit involve water, rocks, or buses. Because we only learned that electrons are negatively charged after we gave the names positive and negative to these things, there’s a difference in how physicists and engineers (and most folks) describe this phenomena.
Continue reading Some basic thoughts on electricity and electronics
Adafruit Circuit Playground
by Sara & Diba

What is the Circuit Playground?
The Adafruit Circuit Playground is a beginner friendly development board that’s perfect for anyone curious about electronics and coding. Think of it like a tiny computer designed for creative projects. It’s packed with built-in sensors, lights, buttons, and more, so you can make cool, interactive things without needing a lot of extra parts.
- A microcontroller that is beginner-friendly
- Can use physical computing and code to create a multi-purpose platform
- Has built-in LEDs, sensors, and buttons/switches
- Small, portable, and easy to use!
- It is also sewable with holes on the perimeter – they act as pins
555 ICs

The 555 Timer
What is it?
“A highly stable controller capable of producing accurate time delays, or oscillation.”
-Philips Components and Semiconductors
The 555 is an 8-pin intergrated circuit with 3 modes of operation. The time delay (stable) mode is controlled by one capacitor and one resistor. The oscillation (astable) mode is controlled by a capacitor and two resistors. A bistable state is possible as well.
The chip can produce pulses at regular intervals, with changing frequencies, and triggered externally depending on how it is wired up.
LEDs
A diode is a kind of electronic component that only allows electricity to flow in one direction. An LED is a diode that lights up when there is a voltage difference across its anode and cathode pins. Continue reading LEDs
Bluetooth communication with BLE
Bluetooth is great for local wireless communication. It has an idealized range of 10 meters, but real world conditions can reduce that significantly (size and placement of antenna, physical or other wireless interference, etc.).
Bluetooth 4.0, aka Bluetooth Low Energy (BLE), made some signifigant changes to how it works with the benefit of it needing less electrical consumption. Continue reading Bluetooth communication with BLE
Serial communication
So far we have touched on the physical side of the world of electronics, but what is even more exciting is that we can use computers to communicate with one another. A good starting point for that is sending information between a microcontroller and a multimedia computer.
We’ll send some information from the Arduino to a p5js sketch, then do the reverse. Eventually we’ll have the machines doing full fledged duplex communication with each other. Continue reading Serial communication
tone and servos
Related to PWM, but different, is frequency modulation. We can use this in conjunction with a small speaker or piezo element to generate a sound. In PWM, there’s a fixed frequency. With tone(), you can change the frequency of a duty cycle fixed at 50%. In this example, there are switches attached to pins 2, 3 & 4. Continue reading tone and servos
Analog Input
The physical world exists along a spectrum, and fortunately for us, there are a wide variety of sensors that can get information about the physical world. We’ll address a few of the many different types of sensors in a little bit. First, how do we trick a machine that sees the world in black and white nuance and greys?
On your Arduino, there’s a special circuit called an ADC (an analog to digital converter). This samples the voltage on the analog input pins (A0-A5 on an Uno, A0-A7 on a Nano BLE 33/ESP32) allowing us to translate voltage into a numeric representation. Different microcontrollers have different sampling resolutions. Arduinos typically use a 10-bit resolution for measuring input values. This means we can get a value between 0-1023 that represents the analog voltage on the pin (1024 total steps). 0 corresponds to 0 volts, 1023 corresponds to 3.3v, and everything else maps neatly in between (512 is 1.68V, 768 is 2.5V, etc). An int is the ideal data to to store this in. Continue reading Analog Input