Skip to content

Instantly share code, notes, and snippets.

# Siteswap state machine by Daniel Simu, 2022
# Inspired by my notation research project: http://danielsimu.nl/research/
#
# Long press to change amount of balls (default is 3)
# Short press to change state. The system only responds if a valid move is made.
#
# Hardware setup on the Pi Pico:
#
# Leds on GP pins 16-23, 25 & 26.
# Buttons on pin ADC2 (GP28)
// Arduino code by Daniel Simu
// for https://www.youtube.com/watch?v=D7hkFh4uhMo&t=1250s
// pins
#define POTENTIOMETER A0 // to middle pin of potentionmeter, the other two go to GND and VCC (5v)
#define PWM_R 3 // to BTS7960
#define PWM_L 5 // to BTS7960
void setup() {
}