Permalink
Browse files

added code for Wii Nunchuck and Arduino control

  • Loading branch information...
1 parent e816156 commit 6a225e99c98833a79fd6232c82d5cd10f693871c @conoro committed Mar 5, 2013
View
@@ -1,74 +1,22 @@
-i-Racer + MaKey MaKey + Raspberry Pi
+i-Racer Controllers
------------------------------------
-Simple code to control Arexx Dagu i-racer using MaKey MaKey, Raspberry Pi and Bluetooth.
+Various snippets of code to control the Arexx Dagu i-racer over Bluetooth using Arduino and Raspberry Pi.
Description
-----------
-This code enables you to use any vaguely conductive materials connected to a MaKey MaKey to send keystrokes to a Raspberry Pi and onwards over Bluetooth to the Arexx Dagu i-Racer Bluetooth RC car. The code should run unmodified on most recent versions of Ubuntu and Debian.
-
-Lots more details on http://conoroneill.net/makey-makey-raspberry-pi-iracer-bluetooth-cheese-controlled-car-ccc/
+This code enables you to use either an Arduino or Raspberry Pi to control an i-racer over Bluetooth with different input devices. So far we've used a MakeyMakey and Wii Nunchuck, with more coming over time.
Pre-Requisites
--------------
-
-```bash
-sudo apt-get update
-sudo apt-get upgrade
-sudo apt-get install python-pip python-dev build-essential
-sudo apt-get install bluetooth bluez python-bluez bluez-hcidump
-sudo pip install evdev
-```
-
-Now you need to work around a nasty bug in Debian and Ubuntu.
-```bash
-sudo nano /etc/bluetooth/main.conf
-```
-
-add this line to it:
-```bash
-DisablePlugins = pnat
-```
-
-Setup
------
-Power up Raspberry Pi with MaKey MaKey on powered USB hub but with Bluetooth dongle not plugged in.
-
-Now plug in the Bluetooth dongle into one of the Raspberry Pi's USB ports, not on the USB Hub. Power up the i-racer and run:
-
-```bash
-hcitool dev
-```
-
-It should detect your dongle and report its MAC address. If it does, then run:
-
-```bash
-hcitool scan
-```
-
-This should find the i-racer as a Dagu Car. Note its MAC address and then pair to it by running:
-
-```bash
-sudo bluez-simple-agent hci0 00:12:05:09:94:26
-```
-
-where you replace 00:12:05:09:94:26 with the MAC address of your car. The PIN is either 1234 or 0000. Note it must be run as sudo or you'll get bluez errors.
-
-Running
--------
-run the code with:
-
-```bash
-sudo iracer_makeymakey_rpi.py <bluetooth_addr_of_iracer>
-```
-
-What Next?
-----------
-Next up is probably Wiimote control and then a slight chance of doing a PhoneGap mobile app. I will probably try direct Arduino control using a serial bluetooth add-on too at some stage.
+See each sub-directory for detailed README
Changelog
=========
2013/01/03
----------
-First rough version. Not very responsive but more controllable than the Android App.
+First rough version of MakeMakey Raspberry Pi code. Not very responsive but more controllable than the Android App.
+2013/03/05
+----------
+Added Nunchuck+Arduino code
@@ -0,0 +1,74 @@
+i-Racer + MaKey MaKey + Raspberry Pi
+------------------------------------
+Simple code to control Arexx Dagu i-racer using MaKey MaKey, Raspberry Pi and Bluetooth.
+
+Description
+-----------
+This code enables you to use any vaguely conductive materials connected to a MaKey MaKey to send keystrokes to a Raspberry Pi and onwards over Bluetooth to the Arexx Dagu i-Racer Bluetooth RC car. The code should run unmodified on most recent versions of Ubuntu and Debian.
+
+Lots more details on http://conoroneill.net/makey-makey-raspberry-pi-iracer-bluetooth-cheese-controlled-car-ccc/
+
+Pre-Requisites
+--------------
+
+```bash
+sudo apt-get update
+sudo apt-get upgrade
+sudo apt-get install python-pip python-dev build-essential
+sudo apt-get install bluetooth bluez python-bluez bluez-hcidump
+sudo pip install evdev
+```
+
+Now you need to work around a nasty bug in Debian and Ubuntu.
+```bash
+sudo nano /etc/bluetooth/main.conf
+```
+
+add this line to it:
+```bash
+DisablePlugins = pnat
+```
+
+Setup
+-----
+Power up Raspberry Pi with MaKey MaKey on powered USB hub but with Bluetooth dongle not plugged in.
+
+Now plug in the Bluetooth dongle into one of the Raspberry Pi's USB ports, not on the USB Hub. Power up the i-racer and run:
+
+```bash
+hcitool dev
+```
+
+It should detect your dongle and report its MAC address. If it does, then run:
+
+```bash
+hcitool scan
+```
+
+This should find the i-racer as a Dagu Car. Note its MAC address and then pair to it by running:
+
+```bash
+bluez-simple-agent hci0 00:12:05:09:94:26
+```
+
+where you replace 00:12:05:09:94:26 with the MAC address of your car. The PIN is either 1234 or 0000
+
+Running
+-------
+run the code with:
+
+```bash
+sudo iracer_makeymakey_rpi.py <bluetooth_addr_of_iracer>
+```
+
+What Next?
+----------
+Next up is probably Wiimote control and then a slight chance of doing a PhoneGap mobile app. I will probably try direct Arduino control using a serial bluetooth add-on too at some stage.
+
+Changelog
+=========
+
+2013/01/03
+----------
+First rough version. Not very responsive but more controllable than the Android App.
+
@@ -0,0 +1,43 @@
+i-Racer + MaKey MaKey + Raspberry Pi
+------------------------------------
+Simple code to control Arexx Dagu i-racer over Bluetooth using Arduino Nano, HC-05 Bluetooth module and Wii Nunchuck
+
+Description
+-----------
+This code enables you to use the HC-05 Bluetooth Master Mode serial module with an Arduino to communicate with an Arexx Dagu i-Racer Bluetooth RC car and direct it with a Wii Nunchuck.
+
+Lots more details on http://conoroneill.net/using-a-wii-nunchuck-instead-of-cheese-to-control-i-racer-rc-car-raspberry_pi-and-arduino including test code to do the same with a Raspberry Pi and Python.
+
+Pre-Requisites
+--------------
+* Arexx Dagu i-racer
+* Arduino (I used both Nano and Uno)
+* HC-05 Bluetooth Module
+* Wii Nunchuck
+* Wii Nunchuck connection adapter (Optional)
+
+Setup
+-----
+* On Arduino Nano, connect Nunchuck wires as follows:
+ * Red = 5V POWER = Nano Pin 5V
+ * White = GND = Nano Pin GND
+ * Green = SDA = Nano Analogue Pin A4
+ * Yellow = SCL = Nano Analogue Pin A5
+* On Arduino Nano, connect HC-05 pins as follows:
+ * Connect Digital Pin 5 of Nano to VCC on HC-05
+ * Digital Pin 6 of Nano to TXD on HC-05
+ * Connect Digital Pin 7 of Nano to RXD on HC-05
+ * Connect Digital Pin 8 of Nano to KEY on HC-05
+* Find out the Bluetooth MAC address of your i-racer using a phone or PC. Edit the code and change the MAC address there.
+
+Running
+-------
+Just select Nano with ATMega328 in the Arduino IDE and send the code to the Nano.
+
+Changelog
+=========
+
+2013/03/05
+----------
+First version. Works extremely well but tuned specifically for the old Wii Nunchuck I tested with and which seems to have reduced range of motion.
+
Oops, something went wrong.

0 comments on commit 6a225e9

Please sign in to comment.