Hello there and welcome back! Faster code Fridays is our weekly series that doesn’t ever fall on a Friday, unless our laziness becomes so strong that it interferes with our disregard for naming conventions. We figure we’ll forgetfully publish one of these things on a Friday at some point. Even a broken clock is right twice a day, eh?
If you’re a first-time visitor, Faster code Fridays highlights code optimization techniques that are useful for embedded systems. Embedded applications often deal with time critical applications that require maximum performance and minimum execution time. In fact, good coding practice is often more apparent when working with microcontrollers, because you don’t have four 4GHz cores and 8Gb of RAM to get you out of trouble. We’ll use Arduino-compatible code for most of our examples, though these techniques are applicable to AVR, PIC, or any number of platforms.
Embedded systems have never been more important. With the growth of trends such as Arduino, the “internet of things”, and inexpensive wireless connectivity, even seemingly simple devices can process data and communicate with the outside world.
Whether you are looking to gain a basic knowledge of circuits and electrical engineering or build on an established career, it’s important to learn from the right resources. The following books have been selected by the EngBlaze editorial team as some of the best guides to embedded systems development. These are only a taste of what’s available, but they provide a good introduction for various skill levels and backgrounds.
This article explains, step-by-step, how to set up the AVR Studio 5 IDE for use with Arduino projects. It also includes some background on the pros and cons of working with AVR Studio, notes on general setup for working with Atmel devices, and a few other tips we’ve picked up along the way. Feel free to skip around to the sections that interest you.
Frustrated at not knowing why your Arduino code is doing something funky? Or perhaps you’re a battle-hardened veteran of the “sprinkle Serial.println() every other line” school of coding. We at EngBlaze have had our own bad days with tracking down obscure code problems, and Steve is here to help.
Straight outta Compton the official Arduino labs, the GPRS/GSM shield and associated library have been developed for your communications pleasure. There is a lot of scattered work out there on cellular communications, but this project was developed by a three-person team that includes two Arduino co-founders, so you know you’re getting a level of professionalism. Like some of our other cellular posts, the library relies on standard AT commands, so you may be able to adapt it to a range of other hardware. Check out their detailed documentation and see if it will work for your project.
Ah yes… the wonderful and oft-misunderstood world of microcontroller interrupts. Are you looking to build a project that relies on very precise timing or needs to react quickly to an input? Then don’t change that channel, my friend. In this tutorial we’ll cover what interrupts are, what they do, and how to use them.
Sleep and power saving modes are popular topics in the various AVR and Arduino communities. How do I put my device to sleep? How can I wake it up? How can I control what does or doesn’t get turned off? It took me a while to round up answers to all of these questions during my own hacking journey, so this post is an attempt to compile the basics in one place.
What do I need to know before putting my precious Arduino to sleep?
Putting your Arduino to sleep is not as drastic as, say, doing the same to the family pet, but there are a few things you should be aware of before you start.