Arduino Bugs

Author: Dave
Date: 12.21.15 - 4:19pm

Each different platform has its nuances and stuff to be aware of. As does every library that you use it's a fact of life of a programmer. Some platforms aren't even worth using until they mature. This reminds me of the days of the browser wars. Late 90s, browser super complex and new. JavaScript implementations were horrible and unique in their bugs per browser. Anyway enough nostalgia

Arduino is in it tricky spot, the base hardware is quite good as are the base libraries, but when you start adding new hardware from third-party vendors, and third-party libraries... And then combining them, some weird shit can happen.

Debugging on an embedded platform is tricky in its own right.. So fishing out and identifying these bugs is a not fun task. I'm going to share some that I have found.

Serial.print seems that it may cause system instability when no PC is hooked up to receive the messages. I found a couple other online posts that mention this, apparently always in conjunction with hardware that is using I2C. in my case I was also using I2C. the program ran fine when plugged into the PC, but had serious bugs when running stand alone off of the power supply. The only thing I could think of were the serial statements. Adding a flag to turn those off fixed the problem.

The next bug comes when using the Adafruit CC3000 library. The fastrprint function apparently will cause memory corruption and can lock up the Arduino if you send it more than 50+ characters in a single call. Try sending it a 150 byte string and you are guaranteed a lockup. It took me a long long and painful time to find this bug! I never would've suspected it.

Another bug that I found is when working with the Adafruit tft capacitive touchscreen, in conjunction with the CC3000 wifi breakout. If you use these two together, or probably any other device that uses interrupts with the tft, make sure you do not utilize interrupt pins 20 or 21 on the mega or you will get an instant lockup.

I will update this list as more gotchas show up.

Comments: (0)

Leave Comment:
Email: (not shown)
Message: (Required)
Math Question: 35 + 36 = ? followed by the letter: G 

About Me
More Blogs
Main Site
Electronic dividing head
Thoughts on next RC blower
Crawl Space Forklift
Remote Control Snowblower
Servo control for linear actuator
Arduino RC motor control
Keyboard Emulation
Arduino w/ win2k
Arduino Snowblower chute control
Attic Fan Remote Control
Robotic Arm
ATTiny Watchdog
IoT Humidor v2
Arduino Bugs
Arduino INI library
Arduino Yun
long watchdog
Arduino runtime config
CNC Rotary table
AutoWater humidifier
Humidor AutoWater
KeyPad Bruteforcer