Esempio n. 1
0
	# 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
		for i in xrange(width):
			# record
			time.sleep(0.1)