Wednesday 15 April 2015

Scanning for i2c devices on ESP-01 / ESP8266 modules running NodeMCU / LUA

Trying to get my OLED module to work on one of my ESP-01 modules, the first thing I did today was making sure the ESP-01 "sees" the OLED.
I had found an excellent little LUA script here: http://www.esp8266.com/viewtopic.php?f=19&t=1049#p6198 the user goes by the name "gwizz". Kudos to him (gareth@l0l.org.uk)

 dofile("i2c-autoscan.lua")  
 Scanning all pins for I2C Bus device  
 Device found at address 0x3C  
 Device is wired: SDA to GPIO0 - IO index 3  
 Device is wired: SCL to GPIO2 - IO index 4  
 >  

This works a treat and helps me to avoid silly mistakes. - Highly recommended.

No comments:

Post a Comment