Closed PontusO closed 6 years ago
I see multiple errors using your new SSD1331 code on a Generic ESP8266 using the latest 1.6.11 IDE.
Mike, that is interesting, I am not even seeing any warnings, neither on esp8266 or Arduino. I am seeing a lot of warnings in Adafruit_GFX though.
Can you send me a list so I can have a look at it.
I just realized that you might mean errors on the display.... Yeah, I just realized that it doesn't support bit banged SPI. I'll fix that.
Added support for bit banged SPI for the ESP8266 now. Tests OK on both ESP8266 and Arduino.
Error on my end. It works perfectly! I'm using the Hazzah and a 0.96" Color display. Great work!
Hi. How did you manage to compile? I first defined the pins as D2, D5 etc since the pure numbers don't map properly. Then after failed compile as bellow I changed the pin definitions to numbers as bellow: // You can use any (4 or) 5 pins
I also tried option 1 and 2 (hardware SPI) but both fail the same way.
I am having the following compile error:
`Arduino: 1.6.13 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)" C:\Users\Mike\Documents\Arduino\libraries\Adafruit_SSD1331\Adafruit_SSD1331.cpp: In member function 'void Adafruit_SSD1331::begin()': C:\Users\Mike\Documents\Arduino\libraries\Adafruit_SSD1331\Adafruit_SSD1331.cpp:289:21: error: cannot convert 'volatile uint32_t {aka volatile unsigned int}' to 'PortReg {aka volatile unsigned char}' in assignment sclkportreg = portOutputRegister(digitalPinToPort(_sclk)); ^ C:\Users\Mike\Documents\Arduino\libraries\Adafruit_SSD1331\Adafruit_SSD1331.cpp:293:20: error: cannot convert 'volatile uint32_t {aka volatile unsigned int}' to 'PortReg {aka volatile unsigned char}' in assignment sidportreg = portOutputRegister(digitalPinToPort(_sid)); ^ C:\Users\Mike\Documents\Arduino\libraries\Adafruit_SSD1331\Adafruit_SSD1331.cpp:305:15: error: cannot convert 'volatile uint32_t {aka volatile unsigned int}' to 'PortReg {aka volatile unsigned char}' in assignment csportreg = portOutputRegister(digitalPinToPort(_cs)); ^ C:\Users\Mike\Documents\Arduino\libraries\Adafruit_SSD1331\Adafruit_SSD1331.cpp:308:15: error: cannot convert 'volatile uint32_t {aka volatile unsigned int}' to 'PortReg {aka volatile unsigned char}' in assignment rsportreg = portOutputRegister(digitalPinToPort(_rs)); ^ exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module).
This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. `
Those errors look like you didn't apply the pull request properly. How did you merge it ?
Used @PontusO 's fork on the library to successfully work with my huzzah feather esp8266, in both hardware and non-hardware modes. Thanks, PontusO!
@michalsok Did you get this resolved? I am having this exact error.
Did you clone my fork or did you apply the patch in some other way. It looks like you don't have my changes.
/P
Hey @ladyada, any chance this will ever be merged? It's pretty nifty!
hiya - we did a restructure to use Adafruit_SPITFT in the 'spitft' branch. that should 1) solve any current/future compatibility problems 2) speed things up A TON
could you please try it? if it works for one other person we'll merge it mainline and ESP8266/ESP32 will Just Work :)
could you please try [the 'spift' branch]?
I took the test
sketch for a ride in Option 1: use any pins
mode on my ESP8266:
testlines
needed at least one yield();
call midway. Since I suspect that yield();
is ESP8266-specific, I didn't open a PR. Would delay(0);
be platform-independent?it should be way faster, yeah if you can put a PR for a delay(10) maybe after each line test (there's four) then i'm happy to merge that and then merge spitft into master and BE DONE WITH BITBANG NOODLING
I have more news with Option 2: must use the hardware SPI pins
:
yield();
not needed.delay(0);
for snag minimization (sorry for the ugly diff 😕).completely restructured. check latest code!
This pull request adds basic support for the ESP8266 from a hardware perspective. It encloses all necessary hardware calls with an #if directive and handles the ESP8266 separatly. I have tested the code on both esp8266 systems and standard Arduino compatible hardware.