Go Down

Topic: Arduino Due libraries (official and 3rd party) (Read 119081 times) previous topic - next topic

rblilja

Sorry for late reply - been working a lot lately. There is a README file added now. It explains how to "deactivate" the standard serial handling in Arduino. However, I think commenting out the old U(S)ARTClass objects are only necessary if you need to save space and never call e.g. Serial1.begin() after calling the begin() of DmaSerial.

About limitations. There are some todos marked in the code, e.g. supporting other confs than 8N1.

Usage is quite simple..

Outside loop() and setup():

#include "DmaSerial.h"

DmaSerial dma_serial  = DmaSerial((Uart*)USART0, ID_USART0);

USART0 is Serial1, USART1 is Serial2...


In setup():

dma_serial.begin(9600);

In loop() or where you want to use it:

dma_serial.put("THIS IS A TEST!\n");
dma_serial.putln("THIS IS ALSO A TES!");

uint8_t buffer[32];

dma_serial.get(buffer, 32);

Sorry for the sloppy explanation.. Will include a proper example sketch in the future..

Rubbernose

Hello,

i try to load a lot of my working 2560 Mega projects on a Due.
The actual Due IDE is 1.5.8. If i select a Mega it compiles.
If i select a Due (programming port)  a lot of errors happen...
With an I2C bus:
Code: [Select]
avr/io.h: No such file or directory
 #include <avr/io.h>

or if i use a clock:
Code: [Select]
Arduino: 1.5.8 (Linux), Board: "Arduino Due (Programming Port)"

Build options changed, rebuilding all
In file included from /home/elektro/Elektro/Arduino/arduino-1.5.8/hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3xa/include/sam3xa.h:44:0,
                 from /home/elektro/Elektro/Arduino/arduino-1.5.8/hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3.h:59,
                 from /home/elektro/Elektro/Arduino/arduino-1.5.8/hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam.h:198,
                 from /home/elektro/Elektro/Arduino/arduino-1.5.8/hardware/arduino/sam/system/libsam/chip.h:25,
                 from /home/elektro/Elektro/Arduino/arduino-1.5.8/hardware/arduino/sam/cores/arduino/Arduino.h:42,
                 from Test.ino:6:
/home/elektro/Elektro/Arduino/arduino-1.5.8/hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3xa/include/sam3x8e.h:502:29: error: expected ')' before '*' token
 #define RTC        ((Rtc    *)0x400E1A60U) /**< \brief (RTC       ) Base Address */
                             ^
Test.ino:6:12: note: in expansion of macro 'RTC'
/home/elektro/Elektro/Arduino/arduino-1.5.8/hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3xa/include/sam3x8e.h:502:29: error: expected ')' before '*' token
 #define RTC        ((Rtc    *)0x400E1A60U) /**< \brief (RTC       ) Base Address */
                             ^
Test.ino:6:12: note: in expansion of macro 'RTC'
Test.ino: In function 'void setup()':
Test.ino:22:7: error: request for member 'begin' in '1074666080u', which is of pointer type 'Rtc*' (maybe you meant to use '->' ?)
Test.ino:31:13: error: request for member 'isrunning' in '1074666080u', which is of pointer type 'Rtc*' (maybe you meant to use '->' ?)
Test.ino:34:9: error: request for member 'adjust' in '1074666080u', which is of pointer type 'Rtc*' (maybe you meant to use '->' ?)
Test.ino: In function 'void loop()':
Test.ino:45:20: error: request for member 'now' in '1074666080u', which is of pointer type 'Rtc*' (maybe you meant to use '->' ?)
Fehler beim Übersetzen

  Dieser Report hätte mehr Informationen mit
  "Ausführliche Ausgabe während der Kompilierung"
  aktiviert in Datei > Einstellungen


Is there something wrong with my installation or are the Due-libraries still weak?
Is there no central Due support???

psghodasara

Finally succeeded to modified Adafruit RGB panel library for 16x32 rgb panel to suit arduino due.

Shyam827

I found it at here and it worked : https://codeload.github.com/enternoescape/Arduino-IRremote-Due/zip/master

rahultiwariec

how i can interface arduino due with HC05 bluetooth module.....
i was doing but there was no response with due....

anm_cool

The MIFARE MFRC522 library works properly with arduino due.
The SPI ports have to be used for interfacing.
https://github.com/ljos/MFRC522

garygrewal

#96
Apr 09, 2015, 12:26 am Last Edit: Apr 09, 2015, 12:59 am by garygrewal
I have created MIDI USB Library for Arduino Due.

https://github.com/gurbrinder/Arduino.git

edgardM

How to transform a library for arduino DUE?
I want use a library that it is for operate with matrices, but it is not working for Arduino Due. What I should change in the library for use the library in the Due?


These is the librery:

http://playground.arduino.cc/Code/MatrixMath

Thanks

Steenoluf

I need to have the softwareserial.h or similar to run on a Due for a student project.
I have located 3 serial ports on the Due. Pls. advice: How do I get these ports up and running?

Regards, Steenoluf

sveinutne

#99
May 25, 2015, 08:36 pm Last Edit: May 25, 2015, 08:41 pm by sveinutne
Just got a DUE bord, and tried to compile. error can not find delay.h it is the _delay_ms() that I need.
Eny idea how I can work around it? Got IDE 1.6.4

Is there an easy way to change the code , so it will have different code when I want to run it on DUE and nano.
Maybe something like this, but for the delay.h

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

I guess I need to put in someting else, but this might be a sceleton I can use. If some got what I need to put in it will help.
Svein

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!

Arduino
via Egeo 16
Torino, 10131
Italy