Skip to content
kerber edited this page Dec 8, 2014 · 3 revisions

panStamp provides the classic Arduino API, consisting in a set of instructions to control timings and read/write ports and pins. This makes panStamp compatible with most Arduino libraries already developed.

For detailed explanations about this API please refer to Arduino's Playground

The following is a basic example of an Arduino sketch running on a panStamp:

#define LED   4  // LED connected to digital pin 4

void setup()
{
  pinMode(LED, OUTPUT);    // Configure pin as output
  digitalWrite(LED, LOW);  // Turn LED off
}

void loop()
{
  digitalWrite(LED, !digitalRead(LED));  // Toogle LED
  delay(1000);                           // Wait 1 second
}