Page 9 of 10

Re: [NEW VERSION] Sota's 14 buttons + optional up to 2 analog sticks guide for a Leonardo Pro Micro (Teensy alternative)

Posted: Wed Nov 22, 2017 6:52 am
by goosewerks
salami738 wrote:
Tue Nov 21, 2017 11:37 pm
Baconbomb80 wrote:
Tue Nov 21, 2017 6:36 am
goosewerks wrote:
Thu Oct 19, 2017 9:21 am
Fun Fact: If you accidentally bought the 3.3v/8mHz version, the button presses work with NO lag at all, but the analog sticks will NOT work. I was arguing with mine for a solid week and realized I bought the wrong version. Hupps. I'd done this exact guide before on two Arduinos and it's worked perfectly, but y'know, I bought the right hardware that time.. Double check your stuff, pls don't be a goober like me.

Another round of thanks for this guide!
How do you know it's the wrong one? There is no marking on the board and im having issues with my analog sticks. I don't get full motion and there is a lot of jitter when not touching the stick.
According to sparkfun (https://www.sparkfun.com/products/12640, https://cdn.sparkfun.com/datasheets/Dev ... o_v13b.pdf) the connector SJ1 has to be open on 3,3V boards, and closed on 5,0V boards. BUT: The china boards have an open SJ1 and 16 MHz, so please check the chrystal instead.

Alternatively, you can check the chrystal on the board (the shiny thing on the bottom). If it has a label "16.000" you have a 16 MHz board.
This. Also, they're cheap enough on Aliexpress / eBay / Amazon that you can just buy more and try again.

Re: [NEW VERSION] Sota's 14 buttons + optional up to 2 analog sticks guide for a Leonardo Pro Micro (Teensy alternative)

Posted: Wed Dec 06, 2017 5:36 am
by Crashdummy
Hey There :)
I am following this Guide Point-by-Point.
I have the Following Setting:
13 x Buttons (from 0 to 16 ( Left out 8 ))
1 x PSP1000 ( A0 (up/down) and A2 (left/right) )

The Buttons are Working like they should but the PSP-Stick doesn't.
It only Recognizes One Axis ( changing A0 and A2 in the Code Changes the Axis ).
Now When I move the Stick the Values for Both axis are changing.

Meaning: When I push the stick upwards for example, I get xAxis --> 1 AND yAxis --> 1 ( Topleft in Windows Devicethingy) when I push it downards --> -1 AND -1 (Bottom Right )

Did someone maybe has the same Problems?

Re: [NEW VERSION] Sota's 14 buttons + optional up to 2 analog sticks guide for a Leonardo Pro Micro (Teensy alternative)

Posted: Sat Dec 09, 2017 4:15 pm
by goosewerks
I had to us A2 and A3 to get it to work.

Re: [NEW VERSION] Sota's 14 buttons + optional up to 2 analog sticks guide for a Leonardo Pro Micro (Teensy alternative)

Posted: Tue Dec 12, 2017 12:13 am
by Crashdummy
goosewerks wrote:
Sat Dec 09, 2017 4:15 pm
I had to us A2 and A3 to get it to work.
Thanks for the reply :-)
I ended up using A1 and A2 as well,
but the main problem was the code itself ( I guess something with my PSP stick went wrong )
I ended up rewriting the code

Re: [NEW VERSION] Sota's 14 buttons + optional up to 2 analog sticks guide for a Leonardo Pro Micro (Teensy alternative)

Posted: Sat Dec 30, 2017 1:00 pm
by Thesonofromeo
I keep killing the Leonardo pro micros. Any tips?

Re: [NEW VERSION] Sota's 14 buttons + optional up to 2 analog sticks guide for a Leonardo Pro Micro (Teensy alternative)

Posted: Sat Dec 30, 2017 8:42 pm
by goosewerks
Crashdummy wrote:
Tue Dec 12, 2017 12:13 am
goosewerks wrote:
Sat Dec 09, 2017 4:15 pm
I had to us A2 and A3 to get it to work.
Thanks for the reply :-)
I ended up using A1 and A2 as well,
but the main problem was the code itself ( I guess something with my PSP stick went wrong )
I ended up rewriting the code
Can you post what you changed? Might help someone else!

Re: [NEW VERSION] Sota's 14 buttons + optional up to 2 analog sticks guide for a Leonardo Pro Micro (Teensy alternative)

Posted: Mon Jan 01, 2018 11:52 pm
by Crashdummy
goosewerks wrote:
Sat Dec 30, 2017 8:42 pm
Crashdummy wrote:
Tue Dec 12, 2017 12:13 am
goosewerks wrote:
Sat Dec 09, 2017 4:15 pm
I had to us A2 and A3 to get it to work.
Thanks for the reply :-)
I ended up using A1 and A2 as well,
but the main problem was the code itself ( I guess something with my PSP stick went wrong )
I ended up rewriting the code
Can you post what you changed? Might help someone else!
I don't think it will be of any help. ( Really dirty fix )
I had to rewrite the code for my PSP Stick wasn't behaving like it should.
The Fix was merely to add an Offset to the Method Call and an increase of the Sticks Deadzone.

Re: [NEW VERSION] Sota's 14 buttons + optional up to 2 analog sticks guide for a Leonardo Pro Micro (Teensy alternative)

Posted: Mon Jan 15, 2018 6:05 am
by Thesonofromeo
I need help. I keep getting double sometimes triple presses of any of my buttons and my analogue stick only registers the y axis

Re: [NEW VERSION] Sota's 14 buttons + optional up to 2 analog sticks guide for a Leonardo Pro Micro (Teensy alternative)

Posted: Tue Jan 23, 2018 8:34 am
by Crashdummy
Thesonofromeo wrote:
Mon Jan 15, 2018 6:05 am
I need help. I keep getting double sometimes triple presses of any of my buttons and my analogue stick only registers the y axis
Are you sure your soldering is good enough ?

As for double/tripple presses:
Regarding Softwareproblems you can either use another joystick-Library ( more difficult ), but the easier Method would be to add a Delay at the end of your Method.

Code: Select all

Delay(100); // This will add a 100ms ( 1/10 second ) Delay
As for your Analog Stick:
You should measure your InputRanges. Mine were different as well, so I couldn't use Sota' s Code ( Using his Code both my Axes got updated simultaneously ).
Afterwards you can add the difference as an Offset.

Code: Select all

 
  Joystick.setXAxis(map);
  Joystick.setYAxis(map);
  Joystick.setRxAxis(map);
  Joystick.setRyAxis(map);
  
This Part Returns the measured Values to your Pi.

Re: [NEW VERSION] Sota's 14 buttons + optional up to 2 analog sticks guide for a Leonardo Pro Micro (Teensy alternative)

Posted: Wed Mar 14, 2018 12:54 am
by nobble
I'm trying to program a Pro Micro with Sota's code for dual joysticks. I bought the generic blue board version and added all the extra files needed, but it wont pick up in Arduino. If anyone has any direction, I would really appreciate it. I kept getting COM errors and the lovely 'JoyState_t' does not name a type Error. I'm on Arduino 1.0.5r2 like it says is needed..