Connecting sensors to control your code
This lecture explains how to work with analog input and output on Bela. This is the first lecture in the series to build external circuits, and it introduces the basics of working with solderless breadboards. After connecting the circuit, it shows how to create a voltage-controlled oscillator (VCO) and a simple musical instrument using a force-sensing resistor (FSR).
Table of contents
- What you’ll learn in this lecture
- What you’ll make in this lecture
- Code examples
- Recommended parts
- Additional references
Lecture 6: Analog I/O
What you’ll learn in this lecture
- Analog inputs and outputs on Bela
- Working with breadboards
- Control voltages and VCOs
What you’ll make in this lecture
- A voltage-controlled oscillator and a simple instrument
vco: Voltage-controlled oscillator example. During the lecture this is converted from using the GUI sliders to using the analog inputs.
vco-analog-out: Extension of the vco project which includes a pulsating LED showing the beats between oscillators.
Running the examples in this course assumes that you have a Bela Starter Kit or Bela Mini Starter Kit. Note that the analog outputs are only available on the original Bela board, and not on Bela Mini.
This lecture also uses several electronic components:
- Solderless breadboard (Rapid, Adafruit)
- 3x 10k potentiometers (Rapid, Adafruit)
- 1x force-sensing resistor (Rapid, Adafruit)
- 1x LED (any colour) (Rapid, Adafruit)
- 1x 10k resistor (Rapid, Adafruit)
- 1x 220 ohm resistor (Rapid, Adafruit)
- Jumper wires (Rapid, Adafruit)
Working with electronic circuits
Sensors for audio and music
- Introduction to potentiometers by Rod Elliott. Contains a deeper dive into the how and why of potentiometers, especially for audio.
- SensorWiki by the Input Devices and Musical Interaction Laboratory at McGill University. Surveys the sensors used in digital musical instruments.