Shop OBEX P1 Docs P2 Docs Learn Events
PENGUIN ROBOT Virtual Screen Compass - the Code — Parallax Forums

PENGUIN ROBOT Virtual Screen Compass - the Code

HumanoidoHumanoido Posts: 5,770
edited 2007-12-06 07:32 in Robotics
Title: Penguin Virtual Screen Compass
Code Name: penguin_screen_compass.bpx
Purpose: Turns Penguin into a Virtual Screen Compass (VSC)
with Real Time Graphics


Get ready for a new kind of compass! This one is amazing!
This is VSC - Virtual Screen Compass. Just turn Penguin in
any direction and watch the changing virtual compass band (VCB)
on the Debug screen in real time. No special add-on hardware or
software needed.

humanoido

' Penguin senses compass direction and plots a detailed virtual
' display on the debug screen. This happens with six functions.

' 1) The actual numerical compass value is displayed
' 2) The value is scaled
' 3) A rounding routine increases the scaled numerical accuracy
' 4) The scaled value is reported
' 5) Virtual compass graphics are created
' 6) The value is plotted

' Penguin uses "Real Time Data Plotter" to handle the data stream
' and plots the most current value on the Debug screen in a virtual
' compass readout. The data point is displayed 16 milliseconds,
' then erased and a new data point follows.


penguin_vsc.JPG

Post Edited (humanoido) : 12/6/2007 7:38:05 AM GMT
Sign In or Register to comment.