Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: f7ee3a9bde
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (26 sloc) 725 Bytes
from mrbbio import *
def setup():
pinMode("P8.12", OUTPUT)
pinMode("P8.14", OUTPUT)
pinMode("P8.16", OUTPUT)
pinMode("P8.18", OUTPUT)
pinMode("P8.20", OUTPUT)
pinMode("P8.45", INPUT)
def loop():
if (digitalRead("P8.45") == HIGH):
print "Button Pressed at: %d" % millis()
digitalWrite("P8.12", HIGH)
digitalWrite("P8.14", HIGH)
digitalWrite("P8.16", HIGH)
digitalWrite("P8.18", HIGH)
digitalWrite("P8.20", HIGH)
digitalWrite("P8.12", LOW)
digitalWrite("P8.14", LOW)
digitalWrite("P8.16", LOW)
digitalWrite("P8.18", LOW)
digitalWrite("P8.20", LOW)
print "analog reading:" + analogRead("P9.33")
delay(10) # don't peg the processor checking pin
run(setup, loop)
Jump to Line
Something went wrong with that request. Please try again.