Stepper motor bluetooth serial driver


First Test using an Arduino (clone) board

First Test using an Arduino (clone) board

Above is the image of my very first attempt of driving this nice little bi-polar stepper motor (M35SP-11HPK) that I had salvaged from a broken Canon printer a while ago.

I have quickly put together a L293D H-bridge with an Arduino board and using the Stepper library was quite straight forward

For the impatient you can see a (probably boring) video right after the break…

Read more of this post

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(){
Serial.begin(115200);
Wire.begin();

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

delay(100);
}

void loop(){
readData();
Serial.print(x); Serial.print(" / "); Serial.print(y); Serial.print(" / "); Serial.println(s);
delay(300);
}

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){
Wire.beginTransmission(ADDR_SENSOR);
Wire.send(val);
Wire.endTransmission();
delay(10);
}

void send(byte val1, byte val2){
Wire.beginTransmission(ADDR_SENSOR);
buff[0] = val1; buff[1] = val2;
Wire.send(buff, 2);
Wire.endTransmission();
delay(10);
}

Tiger 1 BB airsoft RC Tank – V2


It’s all about the same project as here, BUT with a different technology: instead of using the FEZ Domino (.NET micro framework based) board, I’ll be using the Lego NXT controller and an Arduino board for low level interaction with the electronics.

NXT + Arduino internals

Read more of this post

Wii motion plus and Arduino


The Wii Motion Plus and a Solarbotics adapter for easy connection

As you might know from one of my previous posts, I’ve burned (I only now start to have an idea of a possible cause…) part of my Razor 9DOF IMU board. I can still use the accelerometer and magnetometer on it, BUT the gyroscopes (though I’m sure they are both fine) can’t be accessed simply because they are not on the I2C buss and it’s impossible for me to solder wires onto them…

So I’ve decided to explore the idea of using the Wii motion plus gyroscopes instead, especially that there are several people out there that have quadcopters flying with them !  (combined or not with nunchuck accelerometers…)

Read more of this post

Razor 9DOF IMU – I2C to Arduino


 

I2C bus "hijack" - glued with epoxy - one of them uses a via through whole, another is soldered on the back

This is obviously related to my endless post about the home made quadcopter

But it’s a much more generic problem, so here I am, talking about it in a post of its own…

The default way of interacting with Sparkfun’s 9DOF Razor IMU , as per its documentation, is through its serial interface.

Read more of this post

Lego NXT – Arduino Truck


New & improved NXT truck and LeJOS running brick !

The beast after the lifting...

Read more of this post

Lightweight software UART -> custom serial


Software UART to custom serial on an AtTiny45, and then going to the Peggy2 board

7 months ago, in the middle of the winter, it all started with this…

Read more of this post

IR Remote (Syma s026) dedicated board


Syma s026 Remote IR protocol decryptor

I’ve talked in at least 1 other post about how to use the Infra Red remote control of a toy helicopter (Syma s026) for other projects : once the protocol reverse engineered, it’s very easy to program a micro controller to listen to it and I find it very useful to integrate this into any project that needs some wireless remote controlling.

It’s also quite cheap, all you need is an IR receiver and the microcontroller that you alreay use in the given project…

BUT, the more I used it the more I hit one problem : it uses far too much of the MCU ressources, because the remote keeps sending 29 bytes signals all the time and you have to try to intercep them all to check if anything has changed in the commands sent !

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.

Electric remote controlled Tiger 1 Tank toy + arduino


It all started when I found this ex-display toy in a store, for “only” 30£ (rather than the initial 90£), because it was missing its remote…

Wow, something cheap and “not working” is the perfect excuse to open and hack it straight away…

Read more of this post

Follow

Get every new post delivered to your Inbox.

Join 88 other followers

%d bloggers like this: