Pages

Thursday, 24 October 2013

Today we are going to showing our first project with Bus Pirate. That's WiiBP, a simple BP software controller for Wii Nunchuk.
This is the first version, even now in development, but with two cute features:
- check the communications with your Wii Nunchuk (not genuine in our example),
- use your Nunchuk like a mouse.

How you known, the same Bus Pirate V4 is in development, therefore in future the software here showed could be changed to fix or adjust something. If you find any problems, please tell us everything and we'll do our best to help you.

If you still don't know Bus Pirate V4, it's the upgraded hardware version of a previous communication interface (in poor words), now based on microchip PIC 24J256 with 256K of space. This version has available several resources on the bigger chip:
- Integrated, on-board USB (faster)
- Data storage EEPROM to hold settings
- Pull-up voltage selections: 3.3volt, 5volt, or external supply
- 2 extra I/O pins
- Multipurpose buttons
- all older features of Bus Pirate V3 (references on dangerousprototypes)

V4 will continue to improve, therefore lots of this integrated functions might change, but what concerns us most is the protocol IIC for our application which will, presumably, remain the same!

Look us the application to know as work.

At first time, it's important to cut out all other serial devices connected to PC, because the application (by default) sets the first serial port available as its communication port.
Oh, I almost forgot! It's supported by all os... WIN, LINUX, MAC (...touch wood!).

After that, we can select the Nunchuk as we like, choosing between options:
- GENUINE ( setting with IIC sequence [0xA4 0x40 0x00] )
- NOT GENUINE ( setting with IIC sequence [0xA4 0xF0 0x55] )
I didn't test the first one, but I got all informations from this article and I wish they will always work. If not let me know!

If all in configuration stage has went well, you have to see a lists of datas on the left and the selected option on the right with one add-on option!

At the center you can see our logo (I hope that you got a good GPU for it) that you can move as you want with the analogic pad.

This is the final check, if the logo doesn't move with the electronic pad there are two possibilities:
- you have selected a wrong Nunchuk;
- your Nunchuk has a different speed communication for IIC bus.

At first you can close the program, disconnect the BP4 and repeat the configuration selecting an other option. If it doesn't still work, your Nunchuk mightn't be compatible with this version of the application. Into development step we have found a genuine Nunchuk that didn't work, even changing one by one and trying every kind of bus speed. This mean that it might repeat.

If the Nunchuk has been recognized, then you can enable the last option into program, that is the mouse emulation.

This create a robot cursor that you can command with the analog and moreover with the x accelerometer, bending your hand on the left (or right) in the direction established with the pad and given at cursor on the screen. Easier done than said!

When you want to exit from the application, simply press ESC on keyboard. The program will switch off all pull-up resistors and any power supply line BP V4.That's all for now, see you next time with some new feature.