Go Down

Topic: Cosa: An Object-Oriented Platform for Arduino programming (Read 117613 times) previous topic - next topic


In the latest update of Cosa the project takes a quantum leap forward by adding UML style components aka Capsules, Ports and Connectors. A model is defined by a set of Capsule wired together with Connectors. Each Capsule has a behavior that transforms data on input Connectors to results on output Connectors. Internally the Connectors are know to the Capsule as Ports. With C++ template classes and operator overloading a lot of the details can be hidden resulting in a simple component language.

Currently there are the following components:

1. Capsule with the abstract behavior i.e. the component function when activated on signal change.

2. Template Connector with value and access operators. Allows very simple syntax on port/connector change.

3. Controller that executes the model.

4. Timed Capsule with periodic execution pattern.

5. Template Probe that traces the activity on a connector.

6. Template Timed Probe that periodically traces the value of a connector.

7. Clock Capsule to generate periodic signals.

8. Button Capsule to sample an input pin (debounce).

9. Trigger Capsule to generate signals on external interrupt pins.

10. Sensor Capsule periodically sample an analog pin.

12. And LED Capsule.

There are a number of example sketches to get started.



The latest update of the Cosa project includes;

1. A Canvas driver for the TFT LCD ILI9163 (128x128 pixels, 1.44").

2. Low level driver for the TI CC3000 WiFi module. Cosa high level Socket class for the device is on the backlog.

3. Bug fixes of the SNMP OID handling and improved MIB walk (Thanks to Daniel Sutcliffe).

4. Map file generation with the Cosa command line support (Thanks to Jedi Tek'Unum).

5. Improved startup handling of SD cards (Also thanks to Jedi Tek'Unum).

6. Corrected and improved installation guide (Thanks to Patrick Fasano).



Cosa build support and benchmark results for Arduino 1.6.0 are now available. Please see latest commit.


I can't find the ICMP protocol being implemented in Cosa. Any suggestions on where to start if I should implement that protocol in order to write a ping function so I can ping a given IP adress.



Thanks for your interest in the Cosa project. Please file this as an issue on github. Do not forget to add a motivation and what devices that should be supported. I guess that you are considering the W5100 and Ethernet Shield?

BW: Am I correct in assuming that you are requesting support on how to write a ping function for the above device? In that case I must inform that I do not give support without commitment on contributing to the project.


Issue filed!

I will gladly contribute as much as I can.



The latest update of the Cosa project includes;

1. Support for ITEAD Studio IBoard
Initial support for the IBoard with Ethernet Controller (W5100), SD card, XBee and NRF24L01P.

Support for ping (echo request) from sketch/board to other network address. For further details see interface and example sketch.

3. INET checksum
Internet protocol checksum calculation (header, etc).

4. Soft SPI
Updated Soft SPI class to align with SPI interface and functions.


The latest update of the Cosa project includes;

1. Hamming (8,4) and (7,4) Codec for the VWI (Virtual Wire Interface) implementation of the Cosa Wireless Interface.
The new codec is constructed to give good DC balance with error correction. The codec will detect up to 2-bit errors (in 4-bit data) and automatically correct 1-bit errors. This reduces RF433 modules frame error rate from 1-5% down to less than 1% (typical 0.1-0.3%). The coding and decoding are table driven and requires less than 150 bytes program memory (8,4) and 80 bytes for (7,4).

2. Major refactoring of member functions with program memory string parameters.
The new string data type (str_P) introduced with the String class allows overloading and the _P suffix may be dropped on a number of member functions. The type "const char*" is used for literal strings in the new compiler.

3. Update to the UML runtime.
a. Renaming of Sensor to Voltmeter.
b. Added a Thermometer Capsule for DS18B20. This allows simple periodic reading of DS18B20. See example sketch.
c. Display Capsule to probe signal directly to an LCD. See the Thermometer example sketch.
d. Performance improvement of the Capsule scheduling.
e. New Relay Capsule.

4. Improved Math functions.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131