DX  » Community » Forums
«See all threads (in Product Forum)
Product Forum

Accelerometer KXSC4

  • 00008 Friday, July 29, 2011 10:30 AM Reply
    For those considering to buy this nunchuck for its accelerometer: It seems to contain a Kionix KXSC4.
  • CarlosGC Wednesday, August 31, 2011 3:54 PM Reply
    did you succeed in using the acerelometer?
  • 00008 Thursday, September 01, 2011 2:22 PM Reply
    Yes I did. It is quite small so I did not desolder the accelerometer for use on my own board, but desoldered everything else (joystick, buttons) and used the board from the nunchcuk.

    You can either solder wires to the analogue outputs directly, or, what I did: connect to the nunchuk with I2C. SDA, scl, vcc and vdd are labelled on the board so it is not to hard. The nunchuk needs 3,3V, if your microconroller runs on 5V make sure the pins you use for I2C are inputs and there is no pullup on the line. There are pullups in the nunchuk already. I2C is an open collector bus so you won't need level converters as long as you never ever set the microcontrollers pins high to 5V. (Nunchuk seems to be somewhat 5V tolerant, but not guaranteed)

    There is a good tutorial online somewhere on using the nunchuk with arduino. It contains a link to an even better wiki.

    To initialize the nunchuk, send 0xf0h, then 0x55h to it's I2C adress 0xA4h. This differs from the "real" nintendo nunchuk but works with the dealextreme one. After this initialization you can read the data without need to decode it.

    Request data from the nunchuk by sending 0x00h to I2C adress 0xA5h. Yes, thats different from the previous adress.

    Then read six bytes from I2C adress 0xA5h. You will get this data:

    Byte Description
    0 Analog stick x-axis value
    1 Analog stick y-axis value
    2 X-axis acceleration bits 9:2
    3 Y-axis acceleration bits 9:2
    4 Z-axis acceleration bits 9:2
    5 Bit 0 Z button (0=pressed)
    Bit 1 C button (0=pressed)
    Bits 3:2 X-axis acceleration bits 1:0
    Bits 5:4 Y-axis acceleration bits 1:0
    Bits 7:6 Z-axis acceleration bits 1:0


    Happy Hacking :)
  • Rixxx Tuesday, January 17, 2012 2:05 AM Reply
    Seems working in my 3wiicopter 1.9 with WM+ premium, arduino pro mini clone and BT module, all from DX. I run it at 3.3V, 100kHz, pullups disabled. Survived short run with pullups at 5V, while I realized to disable them. At 400kHz WM+ freaks out. I got different SKU nunchuk a while ago but it either didn't work at all, or fried at 5V :). I'm getting more of those black ones for some other arduino projects.
  • sanbernar Tuesday, November 06, 2012 8:48 AM Reply
    Hi guys
    if you managed to connect it with arduino, could you please share some details.
    Thanks
«Reply to this thread (in Product Forum)
Product Forum

Reply

Subject:

* 50 characters max

Message:

* 5000 characters max
Please note: HTML codes are not allowed anywhere on this page (otherwise you will see an error).

Please note that DealExtreme Forums are not a sales or product support board. While we do constantly participate in this forum, please contact us via support ticket for a guaranteed fast response. We make every effort to make the quickest replies.

WHY CHOOSE DX.COM?

Get great weekly deals and offers like: Collections