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.

https://www.tindie.com/products/lspoplo ... -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: http://www.esp8266.com/viewtopic.php?f=40&t=11075&start=4

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
wait


Great job Mike. thanks tracker.