usb joystick

For general discussion related FlowStone
Post Reply
jac224
Posts: 1
Joined: Wed Mar 13, 2013 5:00 am

usb joystick

Post by jac224 »

Hi, I'm new flowstone, a few days ago I started to program, and I have a problem.
I want to control servos with Phidget interface and a USB joystick. until there ok, but connecting the joystick and reading data with ps2 module, this returns me readings from -1 to 1. the problem is that I need to have values ​​from 0 to 180 to control the servos and therein lies the problem, I do not know how.
I would greatly appreciate if someone could help me.
User avatar
nix
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: usb joystick

Post by nix »

heya,
add 1, and multiply by 90
Hope works
Post Reply