perkbrian
Joined: 15 Dec 2006 Posts: 10
Digg It |
Posted: Thu Jan 18, 2007 4:49 am Post subject: enabling IR/getting IR data |
|
|
ok, another question....
ive built my wiimote library in C#, and i cant quite figure out how to enable the IR sensor stuff...
right now i have:
| Code: |
public void StartIR()
{
Wiimotes[DevNum].Write(new byte[] { 0x12, 0x33 });
Wiimotes[DevNum].Write(new byte[] { 0x13, 0x04 });
Wiimotes[DevNum].Write(new byte[] { 0x1a, 0x04 });
Wiimotes[DevNum].Write(new byte[]{
0x16, 0x04, 0xB0, 0x00,
0x30, 0x01, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
Wiimotes[DevNum].Write(new byte[]{
0x16, 0x04, 0xB0, 0x00,
0x06, 0x01, 0x90, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
Wiimotes[DevNum].Write(new byte[]{
0x16, 0x04, 0xB0, 0x00,
0x08, 0x01, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
Wiimotes[DevNum].Write(new byte[]{
0x16, 0x04, 0xB0, 0x00,
0x1A, 0x01, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
Wiimotes[DevNum].Write(new byte[]{
0x16, 0x04, 0xB0, 0x00,
0x33, 0x01, 0x33, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
}
|
and ive tried sending them as reports also....
is this correct?
i used marcan's info on what to send to get it to work.... but i dont know if im doing it right, and if i am, im not wuite sure what im supposed to do to get the data... I can already get accelerometer data, and button press data... |
|