Go Down

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

kowalski

Feb 22, 2013, 10:45 pm Last Edit: Jul 22, 2013, 03:11 pm by kowalski Reason: 1
The Cosa project is slowly approaching beta test level. Time to let friends have a look.

https://github.com/mikaelpatel/Cosa

A blog is available at http://cosa-arduino.blogspot.se/. Hope to get time to write about the design principles and how it can be used. Or at least explain the examples and demo code in some more detail :-). The documentation is on-line.

http://dl.dropboxusercontent.com/u/993383/Cosa/doc/html/index.html

To install Cosa download from github and unzip in your Sketchbook hardware directory.

https://github.com/mikaelpatel/Cosa/archive/master.zip

Restart the Arduino IDE and the Cosa example sketches and board support will be available in the File>Sketchbook> and Tools>Boards> menus.

Advanced users should git clone instead to allow faster update.

Use the issue handling at github for trouble reports and improvement suggestions. Do not forget "Watch/Star" the repo in github.

Cheers!

pito

#1
Feb 23, 2013, 02:31 am Last Edit: Feb 23, 2013, 02:42 am by pito Reason: 1
Great! I've tried with my ST7735R and IDE 1.5.2. Works fine..  :)
Changed /cs and a0 pins to 7 and 8 with:
Code: [Select]
ST7735R tft(Board::D7, Board::D8);
PS: I want to use it with 1284p - is the board.hh the only place to enhance?

fat16lib

Wow!  Costa is amazing, it beats other object-oriented event-driven systems for Arduino.

I hope people invest some time trying it.

If you are an experienced C++ programmer browse the code implementing Cosa, it has great style.

kowalski


Great! I've tried with my ST7735R and IDE 1.5.2. Works fine..  :)
Changed /cs and a0 pins to 7 and 8 with:
Code: [Select]
ST7735R tft(Board::D7, Board::D8);
PS: I want to use it with 1284p - is the board.hh the only place to enhance?


There are some ifdef's in the different classes so Board.hh is only where you start and then you have to check adapt these classes. But if you wait a few hours or a day or so ;-) I will check more in detail whats special with the 1284p. If it is similar to 328P this is a piece of cake. Right now adding a new Board class is only part of the work.

Only boards based on ATmega328P, Atmega2560 and the ATtiny85 family are supported out of the box. Basically what I have to play with at home.

Thanks for your support with this project and taking the time to test Cosa.

Cheers

kowalski


Great! I've tried with my ST7735R and IDE 1.5.2. Works fine..  :)
Changed /cs and a0 pins to 7 and 8 with:
Code: [Select]
ST7735R tft(Board::D7, Board::D8);
PS: I want to use it with 1284p - is the board.hh the only place to enhance?


BW: Did you test more of the ST7735 driver and the Canvas class? Would be nice to hear more about this and especially the graphics script engine I have put in there. There are some examples on this.

There is also a simple off-screen canvas to help drawing to LCD devices such as the very cheap PCD8544 (Nokia 84x48). The driver is actually defined as an IOStream to allow direct printing with all the IOStream functions and operators (<<).

I put a lot of work into making the Trace support really easy to use on different devices. You can for instance trace directly to the ST7735 by just changing the trace.begin() parameter. The support macros follow the Linux syslog format and will include the function and line in the output. This helps debugging without a debugger ;-)

Cheers.

Go Up