Questions with regards to ESP8266 Basic and hardware interfacing and control via Basic commands

Moderator: Mmiscool

User avatar
By jlbachiochi
#53611 Picked up a D-Duino which is a NodeMCU and OLED on one board. ... -display-/

Unfortunately it looks like it uses GPIO5 and GPIO4 as the I2C. Already put ESPBASIC V3 on it and works well (cept fer da display). It would be nice for the OLED commands to accept address, SDA, and SCL.
User avatar
By trackerj
#53894 Latest version adds the i2c.setup() function !

Will change the default pins for the i2c interface.
i2c.setup({SDA}, {SCL})

Now you can define your I2C bus pins as you wish!

For scanning the I2C bus for devices you can use the I2C_scanner code from here:

Original Article is here: ESPBasic I2C_scanner example function
User avatar
By jlbachiochi
#54120 That solves the issue with the D-Duino's display! I can now reassign the I2C pins then print to the display using the built-in OLED commands.

Code: Select alli2c.setup(5,4)
lcdbl 1
oledprint "Hello", 0, 0

Great job Mike. thanks tracker.