outf = open(sys.argv[1],"w") # Using 60,000 steps wide by 30,000 steps deep # Origin is at bottom left, but our scan starts top left stepby = 10 width = 1500 height = 1000 width /= stepby height /= stepby bot = Bot(speed=0.3) #bot = Bot(speed=6) print "Bot version:",bot.get_version(), bot.enable_analog_input() bot.set_stepper_divider(bot.STEP_DIV_1) relx = 0 rely = 0 print "scanning grid ",width,"x",height print >>outf, "P2" # PGM with ascii values print >>outf, width, height print >>outf, 1024 for j in xrange(height): # scan line print "LINE",j
#! /usr/bin/python from bot import Bot import time if __name__ == "__main__": b = Bot() print b.get_version() b.enable_analog_input() while True: print b.get_analog_input() time.sleep(.1)