As the title says... Chat on...

User avatar
By nathanpc
#75288 I have a ESP-12 module with the NodeMCU firmware built from the cloud build service. I'm playing around with it a bit, just creating simple code snippets that I might use in the future in a project, but I ran into a bit of a road block lately when I tried to play with I2C, I kept getting errors when trying to upload my code using ESPlorer, so I decided I would disconnect everything from the board and try again, but I was still getting the same issues when trying to upload my code, then I tried sending each line one by one and I realized that the problem was specifically when I tried to send the i2c.setup(0, 1, 2, i2c.SLOW) command to setup pins D1 and D2 for I2C communication, but as soon as I sent that the module would just reset and give me the following:

Code: Select allNodeMCU custom build by frightanic.com
   branch: master
   commit: 67027c0d05f7e8d1b97104e05a3715f6ebc8d07f
   SSL: true
   modules: enduser_setup,file,gdbstub,gpio,http,i2c,mdns,mqtt,net,node,pwm,rtcfifo,rtcmem,rtctime,sjson,sntp,spi,sqlite3,tmr,uart,websocket,wifi,wifi_monitor,tls
 build created on 2018-04-10 22:34
 powered by Lua 5.1.4 on SDK 2.2.1(cfd48f3)
lua: cannot open init.lua
>
i2c.setup(0, 1, 2, i2c.SLOW)
i2c.seup(0, 1, 2, i2c.SLOW)

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 31464, room 16
tail 8
chksum 0x63
load 0x3ffe8000, len 4556, room 0
tail 12
chksum 0x14
ho 0 tail 12 room 4
load 0x3ffe91cc, len 136, room 12
tail 12
chksum 0xb8
csum 0xb8
*** A bunch of weird characters, probably part of the initialization stuff that is in a different baud rate ***

NodeMCU custom build by frightanic.com
   branch: master
   commit: 67027c0d05f7e8d1b97104e05a3715f6ebc8d07f
   SSL: true
   modules: enduser_setup,file,gdbstub,gpio,http,i2c,mdns,mqtt,net,node,pwm,rtcfifo,rtcmem,rtctime,sjson,sntp,spi,sqlite3,tmr,uart,websocket,wifi,wifi_monitor,tls
 build created on 2018-04-10 22:34
 powered by Lua 5.1.4 on SDK 2.2.1(cfd48f3)
lua: cannot open init.lua
>


Does anyone have any idea of what might be causing this and how to fix it?
User avatar
By marcelstoer
#75303
nathanpc wrote:
Code: Select allenduser_setup,file,gdbstub,gpio,http,i2c,mdns,mqtt,net,node,pwm,rtcfifo,rtcmem,rtctime,sjson,sntp,spi,sqlite3,tmr,uart,websocket,wifi,wifi_monitor,tls
 build created on 2018-04-10 22:34
 powered by Lua 5.1.4 on SDK 2.2.1(cfd48f3)
lua: cannot open init.lua
>
i2c.setup(0, 1, 2, i2c.SLOW)
i2c.seup(0, 1, 2, i2c.SLOW)




That last bit looks weird. Is it just a typo (the missing 't')?

Also, the list of modules in the firmware is suspiciously long and includes modules that need a lot of memory like sqlite3. Try with a binary that includes fewer modules i.e. just the essential ones you really need.