Guide

Copyright © Parallax Inc. 4-Directional Tilt Sensor (#28036) v1.0 12/20/2010 Page 4 of 4
PUB Main
dira[0..1]~ ' Set pins 0-1 to input
pst.Start(115_200) ' Set Parallax Serial Terminal to 115,200 baud
repeat
pst.Home
pst.str(string("Phototransistor 1: "))
pst.bin(ina[0], 1)
pst.NewLine
pst.str(string("Phototransistor 2: "))
pst.bin(ina[1], 1)
waitcnt(clkfreq/10 + cnt)