I bought a NodeMCU from AMAZON equiped with ESP8266. I tried to use https://docs.micropython.org/en/latest/esp8266/esp8266/quickref.html
with no success.
At the end, here is issue: NodeMCU bought from AMAZON designed by AI-Thinker (http://www.ai-thinker.com) comes with ESP8266-12F and not 12E as in the quick ref. There are pinout changes, i.e. the I2C: SDA is D4 and SCL is D5 of ESP-12E.
Correct instanciation must refer to ESP-12F GPIO number like this :
from machine import I2C, Pin
import time
i2c = I2C(scl=Pin(14), sda=Pin(2), freq=50000)
NodeMCU_ESP-12F.pdf
This works well.
Pull-up resistors are not necessary with this ESP-12F.
Last point: how to identify ESP-12F ? look at the antenna shape: it is different (see my pdf).
It should be great and usefull to update the quick reference with the above info.
I love micropython.
Regards,
Alain DUBREUIL
I bought a NodeMCU from AMAZON equiped with ESP8266. I tried to use https://docs.micropython.org/en/latest/esp8266/esp8266/quickref.html
with no success.
At the end, here is issue: NodeMCU bought from AMAZON designed by AI-Thinker (http://www.ai-thinker.com) comes with ESP8266-12F and not 12E as in the quick ref. There are pinout changes, i.e. the I2C: SDA is D4 and SCL is D5 of ESP-12E.
Correct instanciation must refer to ESP-12F GPIO number like this :
from machine import I2C, Pin
import time
i2c = I2C(scl=Pin(14), sda=Pin(2), freq=50000)
NodeMCU_ESP-12F.pdf
This works well.
Pull-up resistors are not necessary with this ESP-12F.
Last point: how to identify ESP-12F ? look at the antenna shape: it is different (see my pdf).
It should be great and usefull to update the quick reference with the above info.
I love micropython.
Regards,
Alain DUBREUIL