Close

The Beginning of the Implementation

A project log for GloveCopter

Arduino-Powered Accelerometer Syma S107 controller

davishdavish 04/28/2014 at 20:510 Comments

11/10/12

Today, I began the actual implementation of the IR protocol. Using the links here and here as references, I wrote up an Arduino sketch that should have caused the helicopter to turn its throttle up to 50%. I scavenged an IR LED from an old A/C remote, and slapped it on a breadboard, hoping it would work. Unfortunately, it did not. I know it's blinking from my phone's camera, and putting it side by side with the controller, it seems as if they're blinking at the same speed. Odd.

I'm going to try just using kerry wong's sketch directly, and seeing if that works. If it doesn't, I'm just going to say that my LED isn't strong enough. I ordered a pack of 25 super-bright ones, so maybe that'll make a difference.

2 Hours later…

Tested it again, and it worked with Kerry Wong's sketch. It didn't have good range, but the super-bright LEDs should fix that. So at least I know that I have a working protocol. I think the problem was how I was producing the carrier frequency. I was using thetone() function, which is used for piezo buzzers to produce a certain, well, tone. I'd used it in the past for IR LEDs, but I guess it wasn't working properly. I used the pulseIR() function from this blog post, which was a pretty much manual solution, relying on the clock speed of the Arduino Uno. I better read up on PWM and exactly what it is (besides being used to make LEDs less bright). Turns out, the new code worked. I ordered the LEDs and accelerometer from Adafruit on Priority Mail, so they should be coming soon.

Discussions