Skip to content

Instantly share code, notes, and snippets.

@karplus
karplus / timer_test.pde
Created July 13, 2011 01:34
Simple timer code for Arduino
// Timer test
// Kevin Karplus
// 12 July 2011
// One of the simplest data acquisition tasks is
// to time the interval between two events.
// This program waits for pin 4 to go high,
// starts a timer, lights the on-board LED,
// then waits for pin 5 to go low,
@karplus
karplus / accelerometer_test.pde
Created June 29, 2011 19:12
Accelerometer test code
// Accelerometer (ADXL335) test
// Kevin Karplus
// 29 June 2011
void setup()
{
analogReference(EXTERNAL); // essential if you are going to connect to AREF
Serial.begin(115200);
Serial.println("setup");
}