Sub Process_Globals
Public Serial1 As Serial
Private LCD As AdafruitSH1106
Private ESP As ESP8266
Public RegistrationStatus As Bool
End Sub
Private Sub AppStart
Serial1.Initialize(115200) 'This is the Hardware Serial used by the IDE for Logging
LCD.InitializeI2C(4, 0x3c)
End Sub
And Here is what it logs:
B4X:
B4R Version: 2.20
Parsing code. (0.00s)
Compiling code. (0.01s)
Building project (0.11s)
Compiling & deploying Ino project (WeMos D1 R2 & mini - COM4) Error
Loading configuration...
Initialising packages...
Preparing boards...
Verifying...
E:\B4X\LaserControler\Objects\bin\sketch\Adafruit_SH1106.cpp:29:26: fatal error: avr/pgmspace.h: No such file or directory
#include <avr/pgmspace.h>
^
compilation terminated.
exit status 1
This seems to be a Lib problem (as opposed to code).
The SSD1306 lib does not produce any errors!
So.... HELP???
So I decided to search the ether and found that in order to use the SH1106 with an ESP2866 needs a modified library, that can be found here: https://github.com/rene-mt/esp8266-oled-sh1106
So I need another wrapper!
The difference between the two of them is that they use different "drivers" and thus require different libs... a quick search in the forum using only "1306" as keyword will get you all the info you need
The difference between the two of them is that they use different "drivers" and thus require different libs... a quick search in the forum using only "1306" as keyword will get you all the info you need
So, after a few pulled from my head by my own hands, uncontrollable by my brain... I got to the conclusion that the SH1106 lib has somehow become uncompatible with newer versions of B4R. Why? It simply doesn't compile... how ever, using SS1306 lib, and of course, corresponding LCD, does compile AND work!
I will try to further investigate...
InB4R IDE, selecting new->Esp never compiled (tested with NodeMCU and Wemos R1 mini), but if selected new->arduino, it compiled ok...
It had been a while si ce I touched my ESP8266 boards... so I thought I was doing something wrong, until I just pulled out an .in file and uploaded from arduino and it worked...
I guess the b4r libs need re-testing
B4R has a very hard time getting the COMs ports open/working... and no info status whatsoever about it...
After a few ( a lot) of tries with my 2 ESP8266 boards, where NodeMCU did compile, but I couldn't find the right pins for the I2C, and my Wemos R1 mini never got the dahm COM port open, I decided to try my ESP32 DEV KIT.
The SSD1306 did work as expected, and I have video to prove it!