Adafruit OLED with the Dash


#1

There have been lots of questions about how to use the Dash with the Adafruit OLED. So here is a brief description of how to use this 1.3" 128x64 Adafruit OLED with the Dash.

Download the latest Adafruit SSD1306 and GFX libraries. I am using 1.1.2 and 1.2.2, respectively.

We are going to use the SPI interface to connect to the Dash. The I2C should work also, but you may need to add 10K Ohm pull-ups to the I2C lines.

OLED -> Dash, from right to left on the OLED
GND -> L02
Vin -> R12
3v3 -> N/C
CS -> L07
Rst -> L04
DC -> L03
Clk -> L05
Data -> L06

This config allows us to use either Hardware or Software SPI. If you want to use software SPI, you can change any of the pins to any Dash digital IO pin, except for GND and Vin.

Software:

#define OLED_MOSI  L06
#define OLED_CLK   L05
#define OLED_DC    L03
#define OLED_CS    L07
#define OLED_RESET L04
Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);

Hardware:

#define OLED_DC     L03
#define OLED_CS     L07
#define OLED_RESET  L04
Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);

Add either (but not both!) of these definitions to the ssd1306_128x64_spi example provided by the Adafruit SSD_1306 library. Compile and program the example and you should see the demo running on your display.


Using with Arduino compatble devices (I2C, etc.)
SSD1306
#2

Erik,

I am getting the flowing error when I try to compile the 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.


#3

Erik,

I updated the AdaFruit library and it is now compiling. The example is not working though. I get the following warning. Not sure if it is related:

WARNING: library SPI claims to run on (konektdash) architecture(s) and may be incompatible with your current board which runs on (sam) architecture(s).
Archiving built core (caching) in: C:\Users\fikhas\AppData\Local\Temp\arduino_cache_508380\core\core_konekt_sam_dash_cpu_speed_speed120,check_update_check,spi_select_spi_b42e5283d2bb4ea89f75ce0cde887415.a
Sketch uses 48940 bytes (4%) of program storage space. Maximum is 1014764 bytes.
Update Complete


#4

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