' {$STAMP BS2} ' {$PBASIC 2.5} ' 2008 mlab.uiah.fi/paja ' Experience Digital out (HIGH/LOW and TOGGLE) ' PIN15 ---> 220½ resistor ---> LED ---> GND pLed PIN 15 DO ' The HIGH command sets the specified pin to 1 (a +5 volt level) ' and then sets its mode to output. HIGH pLed ' PAUSE delays the execution of the next program instruction for ' the specified number of milliseconds. PAUSE 500 ' The LOW command sets the specified pin to 0 (a 0 volt level) ' and tehen sets its mode to output. LOW pLed PAUSE 3000 ' After experiencing HIGH/LOW, try this code instead. ' TOGGLE sets a pin to output mode and inverts the output state ' of the pin, changing 0 to 1 and 1 to 0. '** TOGGLE pLed '** DEBUG "TOGGLE", CR '** PAUSE 1000 LOOP