Skip to content

Instantly share code, notes, and snippets.

@krisives
Created October 16, 2016 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisives/e33b11f477ae20ea7c9ff34755341797 to your computer and use it in GitHub Desktop.
Save krisives/e33b11f477ae20ea7c9ff34755341797 to your computer and use it in GitHub Desktop.
push8 #20
push8 #IO_OVERCLOCK
io
start:
; Read beam sensor
push8 #IO_SENSOR
io
popf beam
; Closer we get to things slow down
pushf 256
pushf beam
divf
push8 #IO_MOTOR
io
; Turn when we get closer to things
pushf 256
pushf 256
pushf beam
subf
divf
push8 #IO_STEER
io
jmp start
beam: dbf 0.0
wander: dbf 0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment