Mini R2D2 build - remote control testing

Controlling the droid should be easy and it should be possible to do without anyone noticing. That in mind remote controller should be relatively small and button and joystick or direction button should be easily accessible.

Found my old Nintendo Wii from storage and there was few Nunchucks so I decided to test how these would do the job. I have seen few tutorials how to get Nintendo Wii Nunchuk work with arduino. I looked into this and it seems to be easy and the controller is perfect fit to hide in your pocket and easy to use. Little battery and wireless transceiver and we have a controller.

NRF24L01+ python and arduino

I found few different libraries and none of them seem to work. I followed Raspberry Pi forum post first problem was that I didint read that trough and I only did what first post said. I got NRF24L01+ to recognize themselves on raspberry. Nothing else. After a few days of testing I found from internet that there have been power problems with these and people has been going around them with 10uF capacitors.
NRF24L01 Capacitor
Pretty.

And after that I got two Raspberries to talk (They were dirty). But Arduino didn't want to talk to Raspberry. Back to the start. I found this tutorial and taught yei this will solve this. Nope and nope. With the new library (this can be also found in the first link but who likes to read forums) NRF24L01+ didn't get recognized properly. After few test runs addresses seemed to change and few runs I got false positive packets. Clearly there was something wrong how Raspberry treated poor little chip. Googled NRF24L01+ max SPI frequency gave the library self.spidev.max_speed_hz = 10000000 and chip got recognized properly.

Still I couldn't get packets from Arduino. Unplugged it and rewired just to be sure. Reconnection and packages were flying. Took me 4-5 nights to get it to work. Finally I can start to code Nunchuck to send data to Raspberry.

Coding Arduino

Nunchuk had very good examples and that was just wiring and example load. Example from the video for the Arduino was simple enough. So why not just throw them to one file and lets see. Well it worked simply enough. I used library from here. I made the Arduino just send raw values to Raspberry at this time. I will worry what to do with those values when there is something to to control with this.

I created GitHub-project for this and code can be found there. https://github.com/helkku/miniR2D2

What's next

I want to fit all this
Remotecontrol electronics
and battery with batteries control board into this

Wii Nunchuk opened

So there would be Arduino Pro Mini, NRF24L01+, LiPo battery (not in the first picture) and charger inside Nunchuck(not in the first picture). Battery and charger is still unknown but small enough to be fitted inside that small controller. I think it is possible. After that it comes to what will be controller with what. Will see.