Show Posts
Pages: 1 ... 10 11 [12] 13 14 ... 29
166  Development / Other Software Development / Re: Cannot find ATtiny45/85 cores for Arduino IDE on: December 21, 2013, 05:34:14 pm
Hi! If you are interested in a high-end solution you could test Cosa. It supports ATtiny (X4, X5, X61), Standard (Uno/Mini Pro/Nano/LilyPad) ATmega328P, Mighty ATmega1248 and Mega ATmega2560. The platform contains 50+ classes, 25+ device drivers, low-power and object-oriented event driven programming. All integrated and ready "out-of-the-box". Code can more or less be moved between the different targets by simply selecting the target board.

https://github.com/mikaelpatel/Cosa

Follow the link to the blog and on-line documentation.

Cheers!
167  Development / Other Software Development / Re: Using a arduino to reduce the number of pins needed for a LCD on: December 21, 2013, 05:17:45 pm
Hi! Here is a version that is available in Cosa. It implements the LCD interface over TWI. Both master and slave code.
https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/LCD/Driver/VLCD.hh
https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/LCD/Driver/VLCD.cpp
https://github.com/mikaelpatel/Cosa/blob/master/examples/LCD/CosaLCDslave/CosaLCDslave.ino

There are some benchmarking number in this blog:
http://cosa-arduino.blogspot.se/2013/07/object-oriented-lcd-management.html

It is possible to get at least an X2 performance increase compared to standard TWI.

Cheers!
168  Using Arduino / Storage / Re: How to read an SD card faster on: December 19, 2013, 03:06:02 am
Try reducing the number of read calls by reading a block. For instance 100 pixels, 300 byte, at a time. Cheers!
169  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 17, 2013, 12:01:43 pm
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 smiley
Therefore my remark above smiley
Guess you missed the reference smiley The library (the simpler version) has the same name.
http://code.google.com/p/fat16lib/

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




170  Using Arduino / Displays / Re: 1.8" SPI TFT LCD ILI9163C on: December 17, 2013, 08:37:55 am
You can also use my OOP framework for Arduino. It support this module. Both TFT and SD with FAT16 FS.

https://github.com/mikaelpatel/Cosa

Cheers!
171  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 16, 2013, 12:28:56 pm
Quote
The Arduino fat16lib has been ported and refactored into the Cosa class structure.
Is that even possible?  smiley-razz
@pito

Actually the fat16lib is a very nicely written and stable library. It was easy to import and restructure to become part of the first file system (FS) support in Cosa. Most of the SD libraries are not very easy to read and understand so here a new fresh class was needed for Cosa.

This is the first increment of the fat16lib import and there is more adapting to the Cosa IOStream::Device to be done to get the full input/output functionality for files. For instance, buffering will be needed to increase performance.

Cheers!
172  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 16, 2013, 06:58:44 am
Here is a short update on the latest development.

1. SD card support
A SD card/SPI driver has been added to Cosa. It uses the new SPI interface and works correctly with other SPI units such as ST7735. Please see example sketch in the Cosa sandbox; https://github.com/mikaelpatel/Cosa/blob/master/examples/Sandbox/CosaSD/CosaSD.ino
Interface: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/SPI/Driver/SD.hh

2. Port of fat16lib
The Arduino fat16lib has been ported and refactored into the Cosa class structure. It uses the new SD class above and the Cosa IOStream driver interface.  A FAT16::File class is added to improve structure. The example sketch contains some preliminary benchmarks.
Example: https://github.com/mikaelpatel/Cosa/blob/master/examples/Sandbox/CosaFAT16/CosaFAT16.ino
Interface: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/FS/FAT16.hh
Ref. http://code.google.com/p/fat16lib/

The test setup for the above development has been an Arduino Pro Mini and a HY-1.8 SPI TFT (128*160)/SD module. The TFT/ST7735 is support by the Cosa Canvas class.

3. UART Transmit complete interrupt handler
The UART class is extended with a callback when the output iobuffer is empty and the last byte has been transmitted. This may be used for implementing RS485 DE pin handling. New virtual member function on_transmit_completed() called from the ISR.
Interface: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/IOStream/Driver/UART.hh#L248
Example: https://github.com/mikaelpatel/Cosa/blob/master/examples/Sandbox/CosaRS485/CosaRS485.ino

Cheers!

Output from CosaFAT16 example sketch:
Code:
CosaFAT16: started
NISSE.TXT     2013-12-13 10:32:48 13

Open file:6 ms
NISSE.TXT     2013-12-13 10:32:48 13
TMP.TXT       2000-01-01 01:00:00 0

Write file (8 KByte):135 ms

Close file:18 ms
NISSE.TXT     2013-12-13 10:32:48 13
TMP.TXT       2000-01-01 01:00:00 8192

Read file (8 KByte):58 ms

Remove file:31 ms
NISSE.TXT     2013-12-13 10:32:48 13

Open/Write/Close file:66 ms
Nisse badar.
Open/Read/Close file:4 ms

125:loop:assert:true == false
173  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 15, 2013, 05:53:33 am
Will support for the Arduino Leonardo be added anytime soon?
@MOOdless

No! I haven't had many requests for that. The question is actually "larger" as this implies support for ATmega32u4, USB, CDC and other USB devices (e.g Mouse, Keyboard). The intermediate solution could be to "import" some of the Arduino code base and adjust the Cosa UART class for CDC.

Right now the focus is adding support for SD/FAT and continuing the work on Wireless devices and protocols (CC1101, NRF24L01+ and RF433 modules/VirtualWire).

Cheers!


174  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 09, 2013, 06:39:13 pm
How about using a TWI LCD adapter for 3X4 keypad decoding? Here is a sketch from the Cosa Sandbox.
https://github.com/mikaelpatel/Cosa/blob/master/examples/Sandbox/CosaTWIKeyPad/CosaTWIKeyPad.ino
Below is an Arduino Mini Pro with a MJKDZ LCD adapter connected to a 4X4 keypad running the demo sketch.

This is a really cheap and easy way to add a keypad to a sketch and if used together with other TWI devices does not require any additional pins. By using the TWI LCD adapter sub-addresses (0..7) it is possible to have several adapters on the same TWI bus and have both keypad and LCD.

Cheers!
175  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 05, 2013, 05:06:22 pm
Here is a short update on the latest development in the Cosa project.

1. Base64
Great discussion on Base64 inspired to adding this to the Cosa encoders. Could be implemented as a Cosa IOStream::Filter which is basically a decorator pattern for output streams.
Interface:  https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/Cipher/Base64.hh
Source: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/Cipher/Base64.cpp
Example: https://github.com/mikaelpatel/Cosa/blob/master/examples/Cipher/CosaBase64/CosaBase64.ino
Performance: 4 us/byte

2. AVR ISP
Moving towards a Wireless bootloader it is time to add support for device programming. In Cosa style two new support classes have been added; AVR/Programmer with implementation of the AVR serial programming instruction set. AVR/STK500, an implementation of the full protocol for the AVR starterkit. These bring together CosaISP in the Tools library.
Interfaces: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/AVR/Programmer.hh
https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/AVR/STK500.hh
The example tools sketch CosaISP is simply:
Code:
#include "Cosa/Watchdog.hh"
#include "Cosa/IOStream/Driver/UART.hh"
#include "Cosa/AVR/Programmer.hh"
#include "Cosa/AVR/STK500.hh"

Programmer isp;
STK500 stk(&uart, &isp);

void setup()
{
  uart.begin(19200);
  Watchdog::begin();
}

void loop()
{
  stk.run();
}
STK500 handles the parsing of commands issued from avrdude and Programmer the interaction with the device.

3. New Benchmark
A new benchmark has been added to measure IOStream, IOBuffer and UART performance. The benchmark gives a baseline for future improvements using some of the great discussions on this forum regarding number to string conversion (fast /10).
https://github.com/mikaelpatel/Cosa/blob/master/examples/Benchmarks/CosaBenchmarkUART/CosaBenchmarkUART.ino

4. Template class for BitSet
Compact and fast implementation of bitsets with operator support.
Interface: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/BitSet.hh
Example: https://github.com/mikaelpatel/Cosa/blob/master/examples/Sandbox/CosaBitSet/CosaBitSet.ino

5. Device Driver for DS1302 Trickle-Charge Timekeeping Chip.
Interface: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/Driver/DS1302.hh
Example: https://github.com/mikaelpatel/Cosa/blob/master/examples/Drivers/CosaDS1302/CosaDS1302.ino

See the Issues log for further changes; https://github.com/mikaelpatel/Cosa/issues?page=1&state=closed

Cheers!

 
176  Using Arduino / Networking, Protocols, and Devices / Re: SPI communication on MEGA2560 on: November 28, 2013, 05:38:54 pm
This might help answer your questions: https://github.com/freetronics/IRTemp

Cheers!
177  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: November 25, 2013, 06:38:04 pm
Here is a short update on the latest development in the Cosa project.

1. ATtiny861 (ATtinyX61)
Support for yet another of the ATtiny processors.

2. Basetta
Build support for breadboard version (ATmega328, internal clock 8 MHz). Contributed by hasse_bjork. Thanks!

3. Line and Token scanner
The Cosa IOStream will now support both Line and Token scanning. The device level function gets() is now fully supported for serial line input. This is based on a new member function, peekchar(c), which allows seaching an input buffer for a specific trigger character such as new-line. The iostream level function scan() may be used to read tokens from an input stream. The tokens are special characters, identifiers or numbers. See the example sketch and documentation for more details https://github.com/mikaelpatel/Cosa/blob/master/examples/Sandbox/CosaUART/CosaUART.ino
Code:
1,2,3[Send]
SCAN[Send]
1,2,3[Send]
----------------------------------------------------------------
CosaUART: started (LINE MODE)
7488:502:echo('1,2,3')
12000:811:echo('SCAN')
SCAN MODE
16224:1113:echo('1')
16224:1113:echo(',')
16224:1113:echo('2')
16224:1113:echo(',')
16240:1113:echo('3')

4.  Additional LCD I2C expansion port
The I2C based LCD expansion port GYIICLCD is now supported by HD44780 device driver and port adapter.

Cheers!
 
178  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: November 22, 2013, 03:04:36 pm
@sirhax

No problem. It looks like you have done something that I do over and over again. The SPI pins are for programming. The DO/DI are the USI pins so you need to reverse that. I dont understand why they made the chip this way. It is a very common mistake and I guess a lot of people just give up.
Code:
CC1101      UnoPin# MegaPin# Tiny84#
1:GND       GND     GND      14
2:3.3v      3.3v    3.3v     1
3:CE/GDO0   9       48       10
4:CSN       10      53       11
5:SCK       13      52       9
6:MOSI      11      51       8
7:MISO/GDO1 12      50       7
8:IRQ/GDO2  2/EXT0  2/EXT4   5/EXT0
Cheers!
179  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: November 21, 2013, 06:33:05 pm
I don't believe that the CC1101 has hardware message ACK and retransmission like the NRF24.  Do you have any plans to implement these features in the CC1101 driver? 
@sirhax
Thanks! You are right about the CC1101 not having the same ACK support as NRF24L01. The plan is actually to add an implementation of the Wireless interface that adds this for any device driver that lack internal support (a protocol stack). The basic design was previously available in the VWI extended mode. The plan is also to add routing and a higher level protocol (RETE) for wireless sensor handling.
Also, the CC1101 has an "Integrated Analog Temperature Sensor" and was wondering if you have any plans to make that component available/accessible in the CC1101 driver?
To make this available CC1101 pin GD0 must be connected to an analog pin. The GD0 pin needs to be enabled as output and special care taken to enable the sensor during the CC1101 is in IDLE state. Then the difficult part mapping the analog value to temperature reading smiley. Please note that the value from the device has an accuracy of +- 2 C, 2.47 mV per C at 3V, The analog conversion without scaling approx. 3 mV LSB (3V/1024).

Cheers!
180  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: November 19, 2013, 02:33:55 pm
After getting this to work fairly reliably, I have run into a situation where the CosaWirelessReceiver appears to stop receiving data after going out of range and then coming back.
Need to check if the NRF24L01P also has this behaviour.
@sirhax

The Cosa NRF24L01P driver works as expected and does not show this behaviour. Message are retransmitted until the retransmit limit(15) is exceeded and then flushed. Getting back into range starts up the transmission/ack again without any problems.

Cheers!
Pages: 1 ... 10 11 [12] 13 14 ... 29