def monitorAnalog(self, pin=0, seconds=0): """ monitor and display the value of an analog pin for some nuber of seconds by default monitor analog pin 0 for 0 seconds """ grovepi.fourDigit_monitor(self.display, pin, seconds)
grovepi.fourDigit_score(display,1,2) time.sleep(.2) grovepi.fourDigit_score(display,1,3) time.sleep(.2) grovepi.fourDigit_score(display,1,4) time.sleep(.2) grovepi.fourDigit_score(display,1,5) time.sleep(.5) print ("Test 8) Set time") grovepi.fourDigit_score(display,12,59) time.sleep(.5) print ("Test 9) Monitor analog pin") seconds = 10 grovepi.fourDigit_monitor(display,sensor,seconds) time.sleep(.5) print ("Test 10) Switch all on") grovepi.fourDigit_on(display) time.sleep(.5) print ("Test 11) Switch all off") grovepi.fourDigit_off(display) time.sleep(.5) except KeyboardInterrupt: grovepi.fourDigit_off(display) break except IOError: print ("Error")
def monitorAnalogue(self, analoguePort, duration): print("monitor analogue port", analoguePort, "for ", duration, "seconds") grovepi.fourDigit_monitor(self.port, analoguePort, duration) return