AVR C++ Modules

C++ in an embedded environment has always been a bit of a challenge. Limited resources especially with RAM can mean sacrificing code readability and portability.

Having developed C++ on both an ARM CortexM and AVR, I can say that C++ on the AVR is much simpler.

With CortexM, it’s a case of disabling every RTTI, exception, C++ feature that you don’t need and being cautious on what C++ features you use for fear of code bloat.

With AVRs on the other hand it’s the case of the C++ features simply aren’t there so there’s nothing to disable. So much C++ is unsupported, you don’t have to worry too much about it.

I’m currently in the process of developing a set of modules for the 8bit AVR to interface with a set of modules in the hope of creating some home automation.

You can find the git hub repository here. So far there is the NRF24L01+, DHT22/AM2302 modules setup for use with a ATMEGA328P. More to come, including current sensors, light sensors, barometers etc.