/* Program 5-2: Use delayMicroseconds() function to toggle a pin. Use a Scope to see the wave generated on the output pin*/ const int outpin = 12; /* pin */ void setup() { pinMode(outpin, OUTPUT); /* set pin as output */ } void loop() { static int onOff = LOW; onOff = !onOff; /* toggle the value of the variable */ digitalWrite(outpin, onOff); /* set outpin on/off by the variable */ delayMicroseconds(16000); /* delay 16000 microseconds */ }