adafruit / Adafruit-SSD1331-OLED-Driver-Library-for-Arduino

For 0.96" OLEDs in the Adafruit shop
http://www.adafruit.com/products/684
Other
100 stars 67 forks source link

Ported GFX Demo from NeoMatrix / RGBPanel to SD1331 #24

Closed marcmerlin closed 5 years ago

marcmerlin commented 5 years ago

This is a hello world GFX demo I've written and ported to multiple GFX supported backends. It is not fully optimized for SD1331 but simply meant to show how it works on that backend, including the issue of clear() being slow. One big plus is that it shows how to display bitmaps (missing from the existing demo included with the code)

This same demo is already present in these 2 Adafruit trees:

If you have a good memory of ancient times, you may think "mmmh, some of this code looks familiar", and you would be right :) See https://github.com/adafruit/Adafruit_LED_Backpack/blob/master/examples/matrix8x8/matrix8x8.ino

and other similar GFX compatible backends:

marcmerlin commented 5 years ago

build failure is totally unrelated to my change which touches no existing code

Picked up JAVA_TOOL_OPTIONS: 
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
In file included from /home/travis/build/adafruit/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino/examples/displayOnOffTest/displayOnOffTest.ino:13:0:
/home/travis/.arduino15/packages/adafruit/hardware/samd/1.4.1/cores/arduino/Arduino.h:48:17: fatal error: sam.h: No such file or directory
 #include "sam.h"
                 ^
compilation terminated.
exit status 1
makermelissa commented 5 years ago

Cache cleared and build restarted.

marcmerlin commented 5 years ago

Two samples: image image

marcmerlin commented 5 years ago

Any idea why travis keeps breaking on unrelated changes? Either way, I forgot to originally mention (just edited the text) to say that it's a very evolved version of your own code written for your first 2D display (IIRC) https://github.com/adafruit/Adafruit_LED_Backpack/blob/master/examples/bicolor8x8/bicolor8x8.pde It's a bit like vger is from voyager, but still wanted to credit you for the original roots :)

makermelissa commented 5 years ago

You could try switching to the board and sketch it’s failing on and compile them on your computer.

marcmerlin commented 5 years ago

@makermelissa first, nice to see you helping out on bugs and PRs, thank you for your help :) Back to the issue, after the flake in travis, I looked at the wrong travis report and missed that this one was actually my fault as shown in https://travis-ci.com/adafruit/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino/builds/111514114 Not a bug, but I used a type that doesn't work on all CPUs. Fixed now.