Go Down

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

majenko


Quote
Actually the fat16lib is a very nicely written and stable library.

fat16lib library does not exist - fat16lib is the name of the author of the SdFat library you probably ported to Cosa :)
Therefore my remark above :)

No, he has been ported - all the way to Cosa, in Teruel, Spain.  A porter carried him there on his back.

One day they'll find him and deport him.

pito

Quote
The Arduino fat16lib has been ported and refactored into the Matrix class structure

:)

majenko


Quote
The Arduino fat16lib has been ported and refactored into the Matrix class structure

:)

OK, so he only believes he's in Cosa - in fact he's in a digital representation of it while his body is in a vat of warm goo and being used to power the machines?

Where's Neo when you need him?

kowalski


Quote
Actually the fat16lib is a very nicely written and stable library.

fat16lib library does not exist - fat16lib is the name of the author of the SdFat library you probably ported to Cosa :)
Therefore my remark above :)

Guess you missed the reference :) The library (the simpler version) has the same name.
http://code.google.com/p/fat16lib/

"Ingen ko på isen" as the Swedish saying goes.





majenko



Quote
Actually the fat16lib is a very nicely written and stable library.

fat16lib library does not exist - fat16lib is the name of the author of the SdFat library you probably ported to Cosa :)
Therefore my remark above :)

Guess you missed the reference :) The library (the simpler version) has the same name.
http://code.google.com/p/fat16lib/

"Ingen ko på isen" as the Swedish saying goes.

Not even on skates?

pito

@majenko: did you update the Cosa lib in uecide? I want have him in my machine.. :)

majenko


@majenko: did you update the Cosa lib in uecide? I want have him in my machine.. :)

Just done it now, yes.  Will he fit in your machine? He is quite fat...

majenko




@majenko: did you update the Cosa lib in uecide? I want have him in my machine.. :)

Just done it now, yes.  Will he fit in your machine? He is quite fat...


:D

No laptops need apply.

There's special clubs for those aren't there?

kowalski

#248
Dec 23, 2013, 10:06 am Last Edit: Dec 27, 2013, 12:37 am by kowalski Reason: 1
A short update before the Christmas holidays.

1. RS485
Support for master-slave message passing on RS485. Interrupt driven message completion handling (i.e. release of the bus, signal DE, without busy wait). The interface is an extension of the Cosa UART.:
Code: [Select]

 RS485(uint8_t port, Board::DigitalPin de, uint8_t addr = MASTER) ;
 int send(const void* buf, size_t len, uint8_t dest = MASTER);
 int broadcast(const void* buf, size_t len) ;
 int recv(void* buf, size_t len, uint32_t ms = 0L);

More details below.
Interface: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/IOStream/Driver/RS485.hh
Source: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/IOStream/Driver/RS485.cpp
Example: https://github.com/mikaelpatel/Cosa/tree/master/examples/RS485
Below is a snippet from the CosaRS485slave example:
Code: [Select]

void loop()
{
 signal_t msg;
 
 // Wait for a request message
 while (rs485.recv(&msg, sizeof(msg)) != sizeof(msg));

 // Decode function code and dispatch
 switch (msg.func) {
 case GET_MILLIS:
   msg.param[2] = RTC::millis();
   break;
 case GET_HUMIDITY:
   msg.param[2] = humidity.sample();
   break;
 case GET_TEMPERATURE:
   msg.param[2] = temperature.sample();
   break;
 default:
   return;
 }
 // Send the reply
 rs485.send(&msg, sizeof(msg));
}

The CosaRS485master example sketch requires an Arduino Mighty or Mega. The CosaRS485 may be run on standard Arduino (Uno,  Nano, Pro Mini, etc) and will use the UART for RS485 communication.

2. Project Information on Ohloh
https://www.ohloh.net/p/cosa

3. Issues handling on Github
Open issues; bugs, new features, etc: https://github.com/mikaelpatel/Cosa/issues?direction=desc&page=1&sort=created&state=open
Bug fixes, patches, implemented features: https://github.com/mikaelpatel/Cosa/issues?direction=desc&page=1&sort=created&state=closed

Merry Christmas!

kowalski


Will support for the Arduino Leonardo be added anytime soon?

@M00dless

Need to update my previous answer on this issue ;-). There is now support for ATmega32u4 boards (Micro, LilyPad USB and Leonardo) in Cosa. USB/CDC will be added later on. Upload is as normal but serial output goes over the UART. In some cases you will have to press the reset button on the board before the upload as the internal USB module is not active.

Cheers!

Ref. https://github.com/mikaelpatel/Cosa/commit/e638a30fa461b99be19f85811311948d5f9335fa

MarsWarrior

Kowalski,

Would you consider adding support to Cosa for the Hope RFM69W / RFM69HW trancievers as you did for the nRF24L01+ ?

Ther are some Arduino libraries already, but a real OO interface using all the (streaming, etc) goodies from Cosa would be very nice!

kowalski


Would you consider adding support to Cosa for the Hope RFM69W / RFM69HW trancievers as you did for the nRF24L01+ ?

@MarsWarrior

Yes, have been looking at a few other RF modules. The "problem" is more or less getting hold of a few modules and putting together a test environment. Also there is some extra "link level" code to be written to add the same level of support as the NRF24L01P (e.g. retransmission). I have to do this for the other devices anyway; VirtualWire (VWI) and CC1101. Both are "raw" send/receive right now. Also there is some work to be done to get a mesh with routing up and running on top of the Wireless interface.

Anyway I will have a look at the spec. So far it seems to be an interesting challenge with a lot in common with CC1101. And it has some extra features (encryption and crc support).

Cheers!

MarsWarrior



Would you consider adding support to Cosa for the Hope RFM69W / RFM69HW trancievers as you did for the nRF24L01+ ?

@MarsWarrior

Yes, have been looking at a few other RF modules. The "problem" is more or less getting hold of a few modules and putting together a test environment.

Thank you for looking into the possibilities!

And I could help you a bit - without obligations from your side - by solving your first problem in getting some modules if you want...

kowalski



Will support for the Arduino Leonardo be added anytime soon?

@M00dless
USB/CDC will be added later on.

Later became sooner than I first thought. An update is now available with basic USB support with CDC.

Cheers!

Interface CDC: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/IOStream/Driver/CDC.hh
Example sketch CDC: https://github.com/mikaelpatel/Cosa/blob/master/examples/Sandbox/CosaCDC/CosaCDC.ino

kowalski


And I could help you a bit - without obligations from your side - by solving your first problem in getting some modules if you want...

That would help ;-). The RFM69 was not (yet?) a very popular wireless module on ebay. Actually more or less a single US based seller.

Cheers!

Go Up