Sample Arduino Code¶
We will be using an Arduino microcontroller to control physical hardware. Arduino programs are called ‘sketches’. The following examples will be used in the Arduino tutorials to introduce basic embedded programming techniques.
- Blink Arduino Sketch
- Fade Arduino Sketch
- SoftBlink1 Arduino Sketch
- SoftBlink2 Arduino Sketch
- ReadSwitchInput Arduino Sketch
- ReadAccelerometer Arduino Sketch
- SensorFade Arduino Sketch
- ReadSonar Arduino Sketch
- ServoSweep Arduino Sketch
- SoundDemo Arduino Sketch
- WheelDrive Arduino Sketch
- StepperSweep Arduino Sketch
- EventLoopDemo Arduino Sketch
- MusicSequenceDemo Arduino Sketch
- InputHysteresis Arduino Sketch
- InputMatcher1 Arduino Sketch
- InputMatcher2 Arduino Sketch
- InputMatcher3 Arduino Sketch
- OneInOneOutASCII Arduino Sketch
- WS2801LED Arduino Sketch
- Adafruit_PWM Arduino Sketch
- MPU6050_DMP6 Arduino Sketch
- PinballGame Arduino Sketch
- EventBusyBox Arduino Sketch
- CKS-Shield-1-Test Arduino Sketch
- RemoteStation Arduino Sketch
- RemoteUserInterface Arduino Sketch
- RockPaperScissors Arduino Sketch
- FilterDemos Arduino Sketch
- ClassifierDemo Arduino Sketch
- Lecture Sample Code
Sample Python Code¶
Most of our projects will use standalone Arduino sketches, but it possible to extend the systems using communication between an Arduino and a host computer over the USB serial port. The following Python programs run on the host computer in conjunction with an Arduino sketch to provide broader capabilities.