Remote GPS tracking system – the one location platform to rule them all?

GPS trackers are always interesting because they’re so versatile. Location-based services have exploded in the last couple of years, and are poised for more growth as we get further into the 2010’s. At the heart of all of these services is a GPS tracker, and a method of transmitting position data to a server, where a provider (or hacker) can do something useful with it.

Continue reading

Tutorial: Using Atmel Studio 6 with Arduino projects

The Atmel Studio 6 start screen.

In our previous Atmel tutorial, we talked about how to set up the powerful AVR Studio 5 IDE to incorporate Arduino libraries and projects. As flexible as AVR Studio 5 is, it had a few issues, and Atmel has been hard at work hustling the next major version out the door. Now, rebranded as Atmel Studio 6 (no longer just for AVRs!), the new version promises to be better, faster, and easier to use. Here, we’ll show you the quickest way to get up and running if you want to use Arduino code with all of the new features.

Note: This article explains how to set up the Atmel Studio 6 IDE for use with Arduino projects, step-by-step.  It also notes on general setup for working with Atmel devices, background on the pros/cons of working with AVR Studio, and a few other tips.  A table of contents is below; feel free to skip to any section that interests you.

Continue reading

AVR math optimization

Following up on our previous post on understanding floating point math and speed of operations on 8-bit AVRs, we ran across an excellent article today on Arduino math optimization. Alan walks through his implementation of an exponential moving average algorithm. An exponential moving average normally requires floating point arithmetic, but due to the lack of native support on 8-bit AVRs, Alan worked out a way to do it with fixed point math.

After some experimentation, he was able to get his version running quite a bit faster than the floating point version, and offers a detailed writeup and tips along the way. Just as we found in our brief testing, the easiest AVR math optimization is to avoid division, since these processors don’t have a native divide instruction. If you’re looking to squeeze every last drop of performance out of your 8-bit chip and can’t (or won’t) upgrade to something more powerful, check this out for some good ideas.

Link: Sensor smoothing and optimised maths on the arduino

Original source: Hackaday

Faster code Fridays: Understand division and speed of operations

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.

Continue reading

Microcontroller tutorial series: AVR and Arduino timer interrupts

Tick tock goes the Arduino clock.

Does your program seem like it’s trying to do too much at once? Are you using a lot of delay() or while() loops that are holding other things up? If so, your project is a good candidate to use timers. In this tutorial, we’ll discuss AVR and Arduino timers and how to use them to write better code.

Continue reading

Mfile: Generate proper Makefiles for your AVR-GCC projects

GNU Make - A program for direction compilation book cover.When you start programming AVRs, you already have your hands full with learning the C language, I/O registers on your chip, and how to manipulate the hardware.  However,  you also have to worry about your development environment.  Figuring out how to compile code, get it on your device, and debug it can seem overwhelming when you’re trying to tackle one thing at a time.

Continue reading

Project setup to develop and debug for AVR

Atmel AVR ATMega 1284 in a DIP socket.

Pete Brown, the lead of the Developer Guidance Community Team at Microsoft, has written a great post on how to properly prepare for a new AVR project. He covers how to choose a microcontroller, collecting necessary datasheets and information, setting up your hardware development environment and software IDE, and how to properly test and debug your code.

If you’re looking to make the jump from Arduino or another processor family but aren’t sure where to start, this should help get you off the ground. You can also cross-reference our tutorial on using AVR Studio 5 with Arduino projects if you want to mix and match environments.

Tutorial: Using AVR Studio 5 with Arduino projects

AVR Studio Welcome Page

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.

Continue reading

Extreme AVR power savings – the quest continues

At Engblaze, we’re somewhat obsessed with squeezing every possible bit of performance out of our circuits.  Ok, really obsessed.  Like beyond Facebook-stalking and into restraining-order-territory obsessed.  To that end, we consider it our duty to bring news of other intrepid performance squeezing pioneers in the DIY electronics world.

Continue reading