eric gregori
unread,Sep 15, 2009, 2:13:32 AM9/15/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RobotSee Users, Anderle Kevin-RYLN40, Borras Rodrigo-TTT578, Steffen Michael-R80133, gnharg...@gmail.com, Snell Derek-B16659, Maggio Phil-RTNP40, Ackerson Mark-R11311
I wrote a bubble level graphics demo using the RobotSee Graphics library.
See code, below, the graphics library is extremely easy to use.
global( ax )
global( ay )
global( az )
global( levelimage1 )
global( bubbleimage1 )
global( level1 )
global( bubble1 )
global( bubblex )
wincreate( "RobotSee Graphics", 320, 240 ) // create 320 x 240 window
levelimage1 = winbmp( "Images\bubblelevel.bmp", "srccopy" ) // Load level bitmap image
bubbleimage1 = winbmp( "Images\bubble.bmp", "srccopy" ) // Load bubble bitmap image
level1 = winimg( levelimage1, 0,40, 0 ) // Add level image
bubble1 = winimg( bubbleimage1, 10,140, 1 ) // Add bubble image
winupdate() // update display
while( 1 )
readaccel( ax, ay, az )
if( ax & 0x80 ); ax = ax - 0x100; endif()
if( ay & 0x80 ); ay = ay - 0x100; endif()
if( az & 0x80 ); az = az - 0x100; endif()
print( "\n x = ", ax, " y = ", ay, " z = ", az )
bubblex = ay + 40 + 135 // center is ay = -40
wineditimg( bubble1, bubblex, 78, 1 ) // move bubble bitmap image according to ay
winupdate() // update display
delay( 100 )
wend()
--
www.EMGRobotics.comhttp://groups.google.com/group/robotsee-users?hl=en