WiiMote IR Camera with Arduino

This post shows how to extract the IR Camera from the WiiMote and connect it to a .NET micro framework board (FEZ Domino in my case).

The present blog is simply a porting of the C# code to Arduino code, in case anybody is interested…

It’s a very basic file, really showing just the minimum necessary to get it working.

#include <Wire.h>

const byte ADDR_SENSOR = 0xB0 >> 1;
byte buff[2];
byte recvBuff[13];

int x, y, s;

void setup(){

send(0x30, 0x01 );
send( 0x30, 0x08 );
send( 0x06, 0x90 );
send( 0x08, 0xC0 );
send( 0x1A, 0x40 );
send( 0x33, 0x03 );
send( 0x30, 0x08 );


void loop(){
Serial.print(x); Serial.print(" / "); Serial.print(y); Serial.print(" / "); Serial.println(s);

void readData()
send( 0x36 );
Wire.requestFrom(ADDR_SENSOR, (byte)13);
for(byte i=0; i<13; i++) recvBuff[i] = Wire.receive();

// have no idea why the 1st BLOB start at 1 not 0....
byte offset = 1;
x = recvBuff[offset];
y = recvBuff[offset + 1];
int extra = recvBuff[offset + 2];
x += (extra & 0x30) << 4;
y += (extra & 0xC0) << 2;
s = (extra & 0x0F);

void send(byte val){

void send(byte val1, byte val2){
buff[0] = val1; buff[1] = val2;
Wire.send(buff, 2);

Graupner R700 FM receiver – get the PPM signal

This must have already been discussed on plenty of other forums, but here I am, I want to use my Graupner FM transmitter / receiver with my quadcopter.

As Jordi from DIY Drones saysIntercept the PPM signal is the best way to obtain all the channels from any receiver, for a lot of reasons. The first one is performance, and the second is the simplicity (in code =P).

First of all, here’s a quite useful diagram that explains well how the PPM works, and the relationship between this signal and the individual channels:

RC Receiver Timing Diagram

The Graupner/JR R700 FM receiver is quite easy to hack.

Read more of this post

Quadcopter – home made

29 Mar 2011 – V2 is here !

Latest and greatest version, not that light but not too heavy either...

Quadcopter V2

Now I know it was all useless, but until 2 days ago, I still thought the only problem with my quad was the frame/motors and the huge vibrations they generated…

2 days ago, on Sunday night, I finally had the courage to face the truth : it could be my fault, it could be my code ! πŸ™‚

Actually while looking at theΒ http://www.multiwii.com/ site (huge thanks Alexandre, and really great stuff !!!) it occurred to me that their code should support my configuration out of the box.

To be honest, I’ve always though that it might be a problem with my code, but the only options to check this would have been:

  1. buy an ardupilot or some other verified system and install it
  2. modify the ardupilot or some other verified code to make it run on my configuration

None of the above options were easy and they could have introduced new problems by themselves…

But the multiwii code, looked like it should work with barely a few lines of change !!!

And indeed it WORKS ! Or at least it balances muuuuch more steadily on 1 axis !

This seems to prove that while I do have quite a lot of vibrations they don’t stop the quad from flying.

I still don’t know what the exact problem was with my code, I will have a look into the details once I manage to fly for real with the new code…

Read more of this post

FEZ Domino – .NET Micro Framework

Arduino is great !

But programming in high level languages like Java all day long at work, I was started to grow increasingly frustrated with having to worry about “details” like memory management, no multi threading, string manipulation, etc. ..

So I was really looking for a micro controller / board that could be programmed with “real” java, powerful enough so that one doesn’t have to spend 80% of the time optimising the code, etc. …

I don’t remember how, but I found this FEZ Domino board (from TinyCLR) on the internet and I IMMEDIATELY knew it was for me…

Quite pricey compared with Arduino, but I’ve had it for a month now, and it’s such a pleasure to work with it… you still have to worry about some optimisation (for example I’m having 3 IR receivers on my Toy Tank and they all use interrupts and I realised that if I’m not careful the delay introduced by each, can affect the correct timings of the others !).

FEZ Domino with the "Component Shield" on it (I don't like the JST cable, I much prefer the RC servos ones)

Now I’m upgrading the Toy Tank to use this much more powerful board.

%d bloggers like this: