PSP 1000 Analog Stick to Teensy LC
- Robots86
- Posts: 268
- Joined: Thu May 05, 2016 1:18 am
- Location: Birmingham, UK
- Has thanked: 39 times
- Been thanked: 28 times
PSP 1000 Analog Stick to Teensy LC
Hi sudomod.
I have a couple of psp 1000 analogs that i wanted to test. I haven't got a clue how to wire this up to the teensy apart from that they should go to the analog pins.... First of all I'm not sure what the solder points are on the back of the psp stick. Theres 4 solder points, i understand 1 is for ground, 5v and the other 2 are the axis. Anybody know of any guides i can refer to or have any guidance they can offer? Any help appreciated.
Thanks
I have a couple of psp 1000 analogs that i wanted to test. I haven't got a clue how to wire this up to the teensy apart from that they should go to the analog pins.... First of all I'm not sure what the solder points are on the back of the psp stick. Theres 4 solder points, i understand 1 is for ground, 5v and the other 2 are the axis. Anybody know of any guides i can refer to or have any guidance they can offer? Any help appreciated.
Thanks
Re: PSP 1000 Analog Stick to Teensy LC
I understood that the complete version here: http://sudomod.com/forum/viewtopic.php? ... &start=450
will support that from hw point of view and maybe even sw if they will manage to get the code on the atmega35 as well..
will support that from hw point of view and maybe even sw if they will manage to get the code on the atmega35 as well..
tent:wq
- tronicgr
- Posts: 143
- Joined: Tue Jun 07, 2016 4:26 pm
- Has thanked: 95 times
- Been thanked: 67 times
- Contact:
Re: PSP 1000 Analog Stick to Teensy LC
You can see the code I use for my Teensy with joystick and d-pad here:
http://sudomod.com/forum/viewtopic.php? ... 1&start=10
Actually I use two extra buttons to emulate keyboard ESC and ENTER as well
Thanks
Thanos
http://sudomod.com/forum/viewtopic.php? ... 1&start=10
Actually I use two extra buttons to emulate keyboard ESC and ENTER as well
Thanks
Thanos
- Robots86
- Posts: 268
- Joined: Thu May 05, 2016 1:18 am
- Location: Birmingham, UK
- Has thanked: 39 times
- Been thanked: 28 times
Re: PSP 1000 Analog Stick to Teensy LC
Thanks mate that code should be a great help.tronicgr wrote:You can see the code I use for my Teensy with joystick and d-pad here:
http://sudomod.com/forum/viewtopic.php? ... 1&start=10
Actually I use two extra buttons to emulate keyboard ESC and ENTER as well
Thanks
Thanos
Can you help me identify what to solder where on psp stick? The solder points arnt labeled and i cant seem to find any info...
Thanks
- tronicgr
- Posts: 143
- Joined: Tue Jun 07, 2016 4:26 pm
- Has thanked: 95 times
- Been thanked: 67 times
- Contact:
Re: PSP 1000 Analog Stick to Teensy LC
Scroll more down on the page on the link I gave you, you will see a photo. And always you can check with a multimeter if you can read the max ohms value between the Vcc and Gnd pins of the potentiometer.
Thanks
Thanos
Thanks
Thanos
- fdeluxe
- Posts: 71
- Joined: Tue Aug 23, 2016 10:16 am
- Has thanked: 12 times
- Been thanked: 27 times
- Contact:
Re: PSP 1000 Analog Stick to Teensy LC
Hi, can you please tell me how you calibrated your Analogstick? The axis are not recognized probably. In Windows I was able to calibrate the stick using the driver properties in printers and devices. Is there any way to hardcode this onto the teensy? I noticed you added some calibration values, but those dont work for me. How did you obtain them?tronicgr wrote:You can see the code I use for my Teensy with joystick and d-pad here:
http://sudomod.com/forum/viewtopic.php? ... 1&start=10
Actually I use two extra buttons to emulate keyboard ESC and ENTER as well
Thanks
Thanos
- tronicgr
- Posts: 143
- Joined: Tue Jun 07, 2016 4:26 pm
- Has thanked: 95 times
- Been thanked: 67 times
- Contact:
Re: PSP 1000 Analog Stick to Teensy LC
I got through max values by printing out to serial terminal the values as I was moving the pots to the max positions.fdeluxe wrote:Hi, can you please tell me how you calibrated your Analogstick? The axis are not recognized probably. In Windows I was able to calibrate the stick using the driver properties in printers and devices. Is there any way to hardcode this onto the teensy? I noticed you added some calibration values, but those dont work for me. How did you obtain them?tronicgr wrote:You can see the code I use for my Teensy with joystick and d-pad here:
http://sudomod.com/forum/viewtopic.php? ... 1&start=10
Actually I use two extra buttons to emulate keyboard ESC and ENTER as well
Thanks
Thanos
But there is another way to automatically scale them. You can read the center position while powering up, then double that number and use it as max. It's easy change to do if you want autocalibration on power up.
Thanks
Thanos
- fdeluxe
- Posts: 71
- Joined: Tue Aug 23, 2016 10:16 am
- Has thanked: 12 times
- Been thanked: 27 times
- Contact:
Re: PSP 1000 Analog Stick to Teensy LC
[mention]tronicgr[/mention]
the map function only seems to remap the upper and lower bounds. But to calibrate my joystic I also net to remap the center postion. That means the mapping must not be linear. Here's what I mean:
the map function only seems to remap the upper and lower bounds. But to calibrate my joystic I also net to remap the center postion. That means the mapping must not be linear. Here's what I mean:
- tronicgr
- Posts: 143
- Joined: Tue Jun 07, 2016 4:26 pm
- Has thanked: 95 times
- Been thanked: 67 times
- Contact:
Re: PSP 1000 Analog Stick to Teensy LC
The potentiometers are not completely linear, that's true but the travel distance is too small to make much difference.
You can see the piece of code I used to scale the values I read
Joystick.X(map(analogRead(0),170, 853, 1023, 0));
Joystick.Y(map(analogRead(1),170, 853, 0, 1023));
The lower value I use is 170 which is same as 853 (low and high position of that axis). This is then scaled to full range on the output 0-1023 that the Joystick needs.
Thanks
Thanos
You can see the piece of code I used to scale the values I read
Joystick.X(map(analogRead(0),170, 853, 1023, 0));
Joystick.Y(map(analogRead(1),170, 853, 0, 1023));
The lower value I use is 170 which is same as 853 (low and high position of that axis). This is then scaled to full range on the output 0-1023 that the Joystick needs.
Thanks
Thanos
- fdeluxe
- Posts: 71
- Joined: Tue Aug 23, 2016 10:16 am
- Has thanked: 12 times
- Been thanked: 27 times
- Contact:
Re: PSP 1000 Analog Stick to Teensy LC
@tronicgr
My problem is that the max raw value of my stick for both axes is 1023, while the lower values lie somewhere near 200. When I remap like this
map(analogRead(pinX), 200, 1023, 0, 1023 )
the Stick is way of center. My thought was to add 1 maxValue to the low value and use it as fromHigh
map(analogRead (pinX), 200, 200+1023, 0, 1023)
Now the stick is centered, but it doesnt move over its full range.
Did you have a look at the screenshot I posted? The high and low values are noted in dxtweak
My problem is that the max raw value of my stick for both axes is 1023, while the lower values lie somewhere near 200. When I remap like this
map(analogRead(pinX), 200, 1023, 0, 1023 )
the Stick is way of center. My thought was to add 1 maxValue to the low value and use it as fromHigh
map(analogRead (pinX), 200, 200+1023, 0, 1023)
Now the stick is centered, but it doesnt move over its full range.
Did you have a look at the screenshot I posted? The high and low values are noted in dxtweak
Who is online
Users browsing this forum: No registered users and 1 guest