Cosa: An Object-Oriented Platform for Arduino programming

Hi! The focus these last weeks in the Cosa project has been low power mode and additional example sketches for the Wireless interface and device drivers (CC1101, NRF24L01+ and RF433 modules).

  1. Low Power Mode
    Out of the box Cosa will turn off analog converter and comparator until needed or explicitly powered up. There are two new member function for AnalogPin; powerup() and powerdown(). The Analog Comparator is powered up resp down on enable() and disable() of the interrupt handler.

  2. Wireless Interface
    There are a number of new sketches to show how to use the Wireless interface and device drivers. These also show how to swap device with only minor changes to the sketch. There is a general sender and receiver sketch, a simple message stream debugger, an example sketch that samples a DHT11 and broadcasts the temperature and humidity reading, and also a sketch to demonstrate low power mode.

  3. Low Power Wireless on ATtiny85
    To verify the low power handling for ATtiny an additional example Wireless sketch has been added. This sketch will power down and wait for a button to be pressed. During the wait only a minimum of the internal hardware modules are used. When the button is pressed the internal hardware is enabled and a message with a timestamp and three analog readings is send. After the transmission is completed the device goes back into power down mode. This allows the power down current to be a low as 5 uA for an ATtiny85-20PU with the Watchdog enabled.
    Cosa/CosaWirelessButton.ino at master · mikaelpatel/Cosa · GitHub

  4. Registry
    The Registry handler has been improved and will now allow mapping from the directory to data stored in SRAM, PROGMEM and EEMEM. There is also a full example sketch to show how application data can be stored in the directory.
    https://github.com/mikaelpatel/Cosa/blob/master/examples/Sandbox/CosaRegistry/CosaRegistry.ino

The Registry and the Wireless interface will become the basis for a small scale variant of SMNP and have many features in common with panstamp/SWAP.

Cheers!