Analog I/O

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

  1. What you’ll learn in this lecture
  2. What you’ll make in this lecture
  3. Code examples
  4. Recommended parts
  5. Additional references
    1. Working with electronic circuits
    2. Sensors for audio and music

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

Code examples

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:

Additional references

Working with electronic circuits

Sensors for audio and music