Flying a helicopter with the N900 – the story so far…
LATEST: It flies! Video footage and overview.
So an enquiry from Riccardo at WOMWorld has prompted me to write a quick update on my progress regards flying a remote control helicopter with my N900. Specifically, this helicopter:
As you may have seen, I recorded a proof of concept video. That allowed me to test that the IR transmitter on the N900 can speak to the helicopter.
The next step was to create a control program to allow me to send different control signals to the helicopter to have some control over it. I’ve written this (BASH scripting FTW!), and it works. Basically you use the keyboard to control it. Press a key for more thrust, press another to decrease thrust then a couple of keys for left and right.
Then it was more testing, on the range and angle of control I have over the helicopter. I’ve done this, I can control the chopper up to ~40cm. Which isn’t a great range, but should be good enough if I have decent control.
The final piece of the puzzle is the control resolution. At the moment I can’t hover the chopper (making it hard to fly, as it flies out of range or crash lands). The problem is although I can control the level of thrust, my choices are none, just too little to hover, too much to hover or waaaaay too much power. So I need finer control. To get the control signals, I record output from the remote using an IR receiver hooked to a PC then use this for a LIRC config file I can use on the N900*. So I need to record another range of control signals and try again. I’ve not done this yet, as the helicopter’s in the office and the necessary IR receiver is at home. I hope to get onto this tonight.
If I can persuade someone to act as a cameraman, I might record a test flight later if the office isn’t too busy.
UPDATE: An officemate will help me film it, and there’s more info on the control problems in the comments below.
*the particularly observant/bright amongst you will have realised there’s a much better way to do this, where my program generates the IR codes rather than merely plays them back. And indeed I do know the encoding used by the helicopter. However I’ve not had time to dig into the LIRC source and work out the encoding used there to control the IR device at a lower level. And as I’m writing up a PhD I don’t have the time for now, even although this would certainly work a lot better. So for now I’m stuck with recording/playing back signals.