Go Down

Topic: Need help troubleshooting variable not getting set by interrupt (Read 3493 times) previous topic - next topic


I must say this project has been a hugely important learning experience for me, it really helped me grasp some deeper concepts I hadn't really wrapped myself around yet, I am also starting to realize just how much is possible if you think outside of the arduino core :).

This project is far from done, I still have code to put in to make it work as an I2C slave as well, this way it will support either PWM input OR I2C, main reason is because I am also building a custom 433MHz bidirectional radio system for this airplane and once that is complete it will have an I2C bus, this way I can give very precise commands and also read some data back from the controller, but until that is complete I want to still be able to fall back on standard RC receiver PWM.  I also want to remove all use of delays in the code and use timers, it really isn't all that required per-say on this project, but I want my code to be as efficient as possible.

I will be sure to come back and post a video of the airplane working with all of the high powered lights once I have it installed on the plane :).


Basically it boiled down to variable decelerations!

It comes down to understanding what debugging is all about: trust nothing. You cannot presume the fault is with certain parts of your code and not others.

Chances are that whatever you think is working is actually causing you problems - that's why bugs are hard to find and often times firms  hire people not involved in writing the code to debug it - to bring in a different perspective and an open mind.

Understanding that is the first step to debugging.

I am also starting to realize just how much is possible if you think outside of the arduino core

You can think of arduino as a dumbed down avr: to present an easy solution for people who don't want to or are unable to read the datasheet. Fortunately, it allows you also some flexibility in coding directly to the core (not as efficiently as otherwise) so you can grow out of it.

Go Up