View Single Post
  #5  
Old 01-08-2008, 01:42 PM
Atul Thakur Atul Thakur is offline
Member
 
Join Date: Oct 2007
Posts: 15
Quote:
Originally Posted by farshizzo View Post
According to Ascension, the Wanda is a standard plug-n-play joystick device. This means you should be able to use our joystick module to access the joystick/button data. There are a few example scripts that come with Vizard showing how to use the joystick module and they are also included in the documentation.
Hi:
I tried using the joystick code into my fob code as follows

PHP Code:
import viz
import sid

viz
.go()
BAUD_FOB 38400
PORT_FOB 
1
sensor 
viz.add('flockofbirds.dls')
viz.tracker()
pos = [0,0,0]
room viz.add("room.wrl")
room.translate(0,0,3)
table viz.add("table.wrl")
table.translate(0,0,3)
def onkeydown(key):
    if 
key == 'a':
        
pos sensor.get()
        print 
pos
viz
.callback(viz.KEYDOWN_EVENT,onkeydown)

##to see whether joystick works o not
def joydown(button):
    print 
"Joystick worked!!" 
Joystick action is not printing anything
Moreover, I don't have any idea, how to use the buttons on the wanda.
Also, for the information, when I run winbird.exe <Ascension's program> The position and orientations are registered properly but joystick or buttons don't do anything.
I am not sure if the joystick and buttons are working alright or not. Please let me know if there is any method to test that.
Thank you,

-Atul
Reply With Quote