Some news on the latest development in Cosa.
1. ThingSpeak Channel and TalkBack example sketchhttps://github.com/mikaelpatel/Cosa/tree/master/examples/IoT/ThingSpeak/CosaThingSpeakClient
An example sketch that allows the TalkBack commands LED_ON/OFF, SENSOR_ON/OFF, PING/PONG together with post of sensor data to a channel. The command SENSOR_ON will enable post of sensor data (DHT11) to a channel. The command LED_ON/OFF controls a led. Last the command PING demonstrates issuing commands back to the server (PONG).
2. Alarm class
Scheduling functions with seconds level resolution. The callback member function may be called once or periodic. Typical usage is "call function at given time", "call function every hour", etc. https://github.com/mikaelpatel/Cosa/blob/master/examples/Time/CosaAlarm/CosaAlarm.inohttps://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/Alarm.hh
3. Activity class
High level scheduling of functions with start time, duration and period on seconds and minutes level of resolution. The callback member function is periodically called throughout the activity duration. May be used to schedule activities such as "during 10:00 to 14:00 sample sensor every 5 seconds" or "every hour sample sensors every 10 seconds for two minutes", etc. https://github.com/mikaelpatel/Cosa/blob/master/examples/Time/CosaActivity/CosaActivity.inohttps://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/Activity.hh
4. Nucleo (multi-tasking) updates
a. Improved delay handing
The thread level delay function is now based on a delay queue.
b. Performance optimization
The context switch is 11 us, semaphore wait-signal pair is 41 us. https://github.com/mikaelpatel/Cosa/blob/master/examples/Benchmarks/CosaBenchmarkNucleo/CosaBenchmarkNucleo.ino
c. Message Passing (Actors)https://github.com/mikaelpatel/Cosa/blob/master/examples/Nucleo/CosaNucleoActor/CosaNucleoActor.ino
d. Blink example with threads
Three threads running on an ATtiny85 with 32 bytes stack and 33 byte context per thread. Demonstrates low power when using Cosa Nucleo. https://github.com/mikaelpatel/Cosa/blob/master/examples/Blink/CosaBlinkThread/CosaBlinkThread.ino
5. Sizeof Benchmark update
List of classes in Cosa and size of instances. Note: static data not included. https://github.com/mikaelpatel/Cosa/tree/master/examples/Benchmarks/CosaBenchmarkSizeOf
6. Cosa example sketches
The example sketch folders have been restructured. There are over 130 test, benchmarking and example sketches in total. https://github.com/mikaelpatel/Cosa/tree/master/examples
And most of them may be compiled for Tiny, Standard, USB, Mega, Mighty Arduino based boards.