test2.zip (123 KB)
Hi, I really hope someone can help me. I have a project that I would like to control via joypad,It consists of using only 4 of the 6 available channels on the maestro .I have got this working perfect when connected throught usb using the maestro control center or roborealm but as I will be using 2x xbee pros then I realised a bit of vb programming was required.As I have never done any programming before I downloaded some sample code but none of it really came close to what I was in need of. So I bought the visual basic programming for dummies! I started writing my program and have got as far as retrieving values from both joys and all 12 buttons on my joypad, This was a bit unnecessary as I only needed the values from joy1 and joy2(x,y,rx,ry.The values I get range from 0 to 32767(neutral) to 65534. I understand I then need to convert those figures into the PWM required for each channel(range being 950(low) 1450(Neutral) 1950(high))and then multiplied by four to convert into bytes to send to my xbee(com9),Now I can do the math, I just don’t know how to do it in vb and this book doesn’t cover this area.Some guidance would be much appreciated,I have attached my effort so far.