MadCatz Nunchuk solution

Are there any features that you would like to add to the VESC?
barney
Posts: 22
Joined: 23 Dec 2015, 08:21
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

MadCatz Nunchuk solution

Postby barney » 27 Dec 2015, 17:55


benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

Re: MadCatz Nunchuk solution

Postby benjamin » 28 Dec 2015, 03:14

Thanks, I will have a look at adding that. Will this cause any trouble with the kama?

barney
Posts: 22
Joined: 23 Dec 2015, 08:21
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: MadCatz Nunchuk solution

Postby barney » 28 Dec 2015, 07:47


barney
Posts: 22
Joined: 23 Dec 2015, 08:21
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: MadCatz Nunchuk solution

Postby barney » 28 Dec 2015, 09:57

http://www.arduinoforum.de/arduino-Thre ... k-auslesen

To communicate with the Nunchuk, we must send a handshake signal.
If you are using a black Wii Nunchuk, send 2 bytes
0xF0, 0x55
to initialize the first register and
0xFB, 0x00
to initialize the second register of the Nunchuk.

On a white Wii Nunchuk, send
0x40, 0x00
followed by
0x00

The I2C address of both Wii Nunchuks is
0x52
The frequency used to communicate with the Wii Nunchuk is 100K


Byte 0x00 : X-axis data of the joystick
Byte 0x01 : Y-axis data of the joystick
Byte 0x02 : X-axis data of the accellerometer sensor
Byte 0x03 : Y-axis data of the accellerometer sensor
Byte 0x04 : Z-axis data of the accellerometer sensor
Byte 0x05 :
bit 0 as Z button status - 0 = pressed and 1 = release
bit 1 as C button status - 0 = pressed and 1 = release
bit 2 and 3 as 2 lower bit of X-axis data of the accellerometer sensor
bit 4 and 5 as 2 lower bit of Y-axis data of the accellerometer sensor
bit 6 and 7 as 2 lower bit of Z-axis data of the accellerometer sensor

barney
Posts: 22
Joined: 23 Dec 2015, 08:21
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: MadCatz Nunchuk solution

Postby barney » 02 Jan 2016, 16:54

Hi Benjamin,

i have added 0x40, 0x00 in your source code but with no luck.
Normally, the Nunchuk is initialized only once and then only read.
But you seem at each query to do this and this seems to bring the MadCatz out of step. I must do some test with the Teensy 3.1 Board to look for the right Timing.

Barney

benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

Re: MadCatz Nunchuk solution

Postby benjamin » 12 Jan 2016, 09:36

Hi Barney,

I ordered a used madcatz wireless nunchuk from ebay and experimented a bit with it based on the code you posted, but I could not get it running. It looks like the nunchuk does not even connect to the receiver and switches itself off after a minute or so. Maybe the one that I got is broken...

barney
Posts: 22
Joined: 23 Dec 2015, 08:21
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: MadCatz Nunchuk solution

Postby barney » 12 Jan 2016, 10:30

The batteries last five MadCatz were defective. There are no LiPos.


DeathCookies
Posts: 4
Joined: 06 Feb 2016, 18:25
Location: germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: MadCatz Nunchuk solution

Postby DeathCookies » 06 Feb 2016, 18:30

Hey Barney,
can you tell me where to add this line? Is it the correct command because the source code on github seems really different from yours!

I do not think that vedder has completly reengineered the nunchuk code. Would be nice if you can explain me the big difference and where to add the code.

Thanks in advance!

barney
Posts: 22
Joined: 23 Dec 2015, 08:21
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: MadCatz Nunchuk solution

Postby barney » 06 Feb 2016, 20:29


DeathCookies
Posts: 4
Joined: 06 Feb 2016, 18:25
Location: germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: MadCatz Nunchuk solution

Postby DeathCookies » 07 Feb 2016, 00:19

I am sorry, is this code a complete file or do i need to add it in any specific file?
Does it work with the MadCatz Nunchuk?


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest