Using with Arduino compatble devices (I2C, etc.)


#1

I’m interested in finding libraries for devices that have been ported from the Arduino to the Dash.
For example, the RDM6300 RFID Card Reader or SSD1306 OLED I2C display.
Has anyone done work on this?

Thanks,
Kevin


SSD1306
#2

Most Arduino libraries should work as-is with the Dash. The only thing to watch for is any processor-specific code. Some libraries assume an Atmel AT processor and that won’t work with the Dash as it is an ARM processor. There my be ports of a library for the Arduino Due (ARM but a different vendor) or for the Teensy (ARM and same vendor, but slightly different) that would work with the Dash.

I looked at the RFID library. I would change the SoftwareSerial interface to one of the 2 Hardware Serial interfaces available on the Dash, then it should work well. The Dash is a 3.3V based board, so you may have to add level shifting for devices that expect a 5V interface.

The Adafruit SSD1306 library has processor-specific code. But the Dash hardware SPI should work fine with the library. You might need to add another processor definition to it to make sure the hardware SPI is used.


#3

Thanks!


#4

Hi Erik,

I am new to Hologram and I am trying to have it work with SSD1306. Would you please let me know how to add the processor definition?

Thanks,
Firas


#5

Hola! I’ve been looking through posts and I think here is the most appropriate place to ask. I’m attempting to use an LCD with the Dash and have had good luck with Adafruit’s GFX library for various displays. When I try to compile my sketch (with updated pins to point to the hardware SPI on the Dash) I get this error:

/Documents/Arduino/libraries/Adafruit-GFX-Library-master/Adafruit_SPITFT.cpp:19:28: fatal error: pins_arduino.h: No such file or directory
   #include "pins_arduino.h"

Looking in the library I found:

#ifndef ARDUINO_STM32_FEATHER
  #include "pins_arduino.h"
#ifndef RASPI
    #include "wiring_private.h"
#endif

Can I just add some Dash specific pins to my sketch?


#6

Version 1.2 of the Adafruit library compiles with the Dash. I just ordered a display, so I’ll test and post results.


#7

You can add a pins_arduino.h file to your sketch and include pin definitions there.


#8

Awesome, thank you!!


#9

I downloaded AdaFruit SSD1306 from https://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples

I am getting this error when I try to compile it:

Arduino: 1.8.4 (Windows 7), Board: “Dash, 120MHz, Check, SPI”

C:\Users\fikhas\Documents\Arduino\libraries\Adafruit_GFX\Adafruit_SPITFT.cpp:19:28: fatal error: pins_arduino.h: No such file or directory

#include “pins_arduino.h”

                        ^

compilation terminated.

exit status 1
Error compiling for board Dash.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


#10

#11

Erik,

I am getting the following error when trying to compile ssd1306_128x64_spi example:

Arduino: 1.8.4 (Windows 7), Board: “Dash, 120MHz, Check, SPI”

C:\Users\fikhas\Documents\Arduino\libraries\Adafruit_GFX\Adafruit_SPITFT.cpp:19:28: fatal error: pins_arduino.h: No such file or directory

#include “pins_arduino.h”

                        ^

compilation terminated.

exit status 1
Error compiling for board Dash.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


#12

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.