Arduino Due libraries (official and 3rd party)

Hi,
I always use this library for myself, and I personaly think that is VERY usefull. Its clear that Arduino doesen't support real parallel processes, but we can "sort" of do it with scheduled tasks.

Yes, there is already an class called "Scheduller", but for big projects (likes the ones I do, with more than 15.000 lines), it's not "good" enought...

I LOVE Object Oriented stuff, and this follows it pretty much.

Check out the library here: GitHub - ivanseidel/ArduinoThread: ⏳ A simple way to run Threads on Arduino

It also works for ANY arduino, but I implemented thinking on the DUE, since it's capable of more stuff (I use it with my ArduinOS, and it's just perfect =] )

Any suggestions are welcome!

First version of the DueGUI library is now downloadable...

http://forum.arduino.cc/index.php?topic=164788.0

Hey everyone,

I rewrote the T6963 library to interface a graphics LCD using the Toshiba driver with the arduino due.
It is significantly faster than the old version since all data bus lines are on port C of the AT91. All pins used are on the vertical 18*2 pin connector what allows you to use a ribbon cable.
Examples and instructions to hook it up included.

Edit: Fixed bug for UpdateBuff(), speed optimizations

T6963_due_0_31.zip (10.8 KB)

I modify SFEMP3Shield library from Bill Porter and Michael Flaga so that Sparkfun MP3 shield work with Arduino Due.
You can play files from SD memories or listen to web radios.
See Listen web radio with Arduino Due, Ethernet shield and Sparkfun MP3 shield - Arduino Due - Arduino Forum

DueGUI library is now at version 0.13 and with the start of some quite thorough documentation. All the most important GUI objects are already implemented with more to come. Why not give it a try:

http://forum.arduino.cc/index.php?topic=164788.0

DueGUI seems to be very good. is it possible to run on mega?. Is it possible to run on iboard pro?. I am working now on a iboard pro project.

c-agua:
DueGUI seems to be very good. is it possible to run on mega?. Is it possible to run on iboard pro?. I am working now on a iboard pro project.

It should do but I will have to look up how do the interrupts on the mega too.

Hi guys... Nothing about VirtualWire?

http://www.airspayce.com/mikem/arduino/

I can't compile with Due... does anybody succeeded?

I'm hoping for one for the RFM12 line of wireless modules. Anyone know if that one has been ported yet?

I sort of formalized and hopefully simplified randomvibe's original code to run the Due hardware PWM pins 6, 7, 8, and 9 which avoids using slower analogWrite calls. This was paramount for my application because I'm really pushing the limits of what the Due is capable of. I'm heavily using nearly every pin on the board and taking advantage of as many of the optimization and hardware features as possible is extremely important. It's attached...

DuePWM.zip (4.24 KB)

Adafruit ST7735 and GFX libraries modified to run on the Arduino Due here:

regards

Where do you feed the battery backup power into the DUE to keep the RTC awake while it's powered down?

You can't. They've not only wired the backup power pins to the +3.3V and GND, but also they have not populated the 32kHz crystal so you couldn't use the RTC even with normal power.

heh, at least, not without lifting the pins off the board and running some crazy jumper wires.. :slight_smile:

Hi folks,

I have published my LinkedList Class on GitHub. It's REALLY usefull for all kinds of libraries and projects.

Features that are implemented:

  • LinkedList::LinkedList() - Constructor.
  • LinkedList::~LinkedList() - Destructor. Clear Nodes to minimize memory.
  • int LinkedList::size() - Returns the current size of the list.
  • bool LinkedList::add(T) - Add element T at the END of the list.
  • bool LinkedList::add(int index, T) - Add element T at index of the list.
  • bool LinkedList::unshift(T) - Add element T at the BEGINNING of the list.
  • bool LinkedList::set(int index, T) - Set the element at index to T.
  • T LinkedList::remove(int index) - Remove element at index. Return the removed element.
  • T LinkedList::pop() - Remove the LAST element. Return the removed element.
  • T LinkedList::shift() - Remove the FIRST element. Return the removed element.
  • T LinkedList::get(int index) - Return the element at index.
  • void LinkedList::clear() - Removes all elements.

For more information, and Latest releases go to GitHub - ivanseidel/LinkedList: 🔗 A fully implemented LinkedList made to work with general Microcontrollers and Arduino projects

Fell free to commit new changes and use it.

Ivan

Hi folks,

After a lot of work, I could manage to make a Gaussian "simple" enough to use and implement almos everything.

In this Library summing Gaussians is really easy, like this:

Gaussian g1 = Gaussian(10, 30.4);

Gaussian result = g1 + Gaussian(30, 40);

There is also a Moving Average class, called "GaussianAverage". It works great with Gaussians and also simple values.

GaussianAverage myAverage(10); // 10 samples to keep track of

myAverage += Gaussian(32, 2.45);
myAverage += 10; // Automaticaly adds a Gaussian with Maximum variance

Gaussian average = myAverage.process();

For more information and a very detailed documentation, go to GitHub - ivanseidel/Gaussian: Library that makes Gaussian work easy to use with C++ and Arduino

Fell free to commit new changes and use it.

Ivan

Ivan, when I use your library and #include your CPP file in my Sketch (.ino), at link time I'm getting multiple definitions of the timer objects. I have #include DueTimer.cpp at the beginning. The DueTimer.h is of course included in the CPP file. How can I ask the preprocessor to only include it once?

rmetzner49:
Ivan, when I use your library and #include your CPP file in my Sketch (.ino), at link time I'm getting multiple definitions of the timer objects. I have #include DueTimer.cpp at the beginning. The DueTimer.h is of course included in the CPP file. How can I ask the preprocessor to only include it once?

Hi,
Never include de .cpp file, always include the .h =]
#include <DueTimer.h>

Arduino Due TLC5940 Library

Information and Download: Google Code Archive - Long-term storage for Google Code Project Hosting.

The Arduino Due uses an ARM Cortex M3 processor made by Atmel (SAM3X8E). This microcontroller is fairly different from the normal AVR microcontrollers used for most Arduinos. Alex Leone made an Arduino library for handling Texas Instrument's TLC5940 16 Channel LED PWM driver with the AVR microcontrollers (Google Code Archive - Long-term storage for Google Code Project Hosting.).

However, running the TLC5940 well requires delving into lower-level parts of the hardware -- things like timer counters and interrupts -- and these are different on the Due/SAM3X8E. I've started a TLC5940 library that makes use of the features offered by the SAM3X8E. At least for now, this library doesn't offer all the fancy features that Alex Leone's library (e.g. animations, fades, PROGMEM storage, etc.) because I didn't need those features. I have my own libraries for describing and running lightshows.

Hopefully some will find this useful. :wink:

  • Madeline

Hi all,

I 've been working on my senior project - a balancing robot - using a Mega 2560. A recent accident damaged the board and I was thinking of replacing it with a Due to see if the faster clock speed helped. Can someone check to see if the following libraries/examples work or at least compile?

These 2 I'm using now:
http://bildr.org/2011/06/l3g4200d-arduino/
http://www.loveelectronics.co.uk/Tutorials/12/adxl345-accelerometer-arduino-tutorial

This one will be my next purchase, I think:
http://bildr.org/2012/03/stable-orientation-digital-imu-6dof-arduino/

It would be greatly appreciated,

Brian