Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By gerardwr
#13557
Creamers wrote:What are the pro's using lua over normal arduino code? Faster?
(I would like to send data to website very fast , maybe you can refer me to a sample?)


When I started in Nov 2014 with the ESP I had years of Arduino experience, and ZERO minutes LUA experience.

I started with LUA because that's the only thing that was available besides the bare C coding environment. After a few weeks I had the opportunity to join the IGRR ArduinoESP environment, and liked it! So I ditched the LUA environment in a few days.

Why? These things spring to mind:
- Arduino is a "known" language, with good documentation, many examples, many libraries, big community. LUA is impressive.
- ArduinoESP is a turnkey environment that "just works". There was no IDE, it was "work in progress" with many bugs, and rather small community.
- LUA consumes a lot of RAM limiting code. Arduino has enough RAM left for bigger sketches.
- LUA is interpreted, Arduino is compiled. therefore faster
- My older Arduino code migrated to the ESP in a simple way. Also Interrupt handlers and 433Mhz code migrated without problems.
- During the beta test I had a direct communication link to the creator IGRR, and this guy really know his coding, and is willing to help.

Note : I'm really impressed what the LUA guys have done, and it's MUCH better now since I started. For experienced LUA coders it's a fine environment right now. If Arduino for the ESP had not been published I probably would have stayed with LUA.

But in my opinion the Arduino environment is much more stable and mature, and I think the active Arduino community will give it a big push forward.

Re. your question for sending data to a website fast: the provided WifiClient example sends data to io.Sparkfun every 5 secs without any problem.
User avatar
By CheapB
#13657
gerardwr wrote:Yes, burn at address 0. On my Mac I use:
Code: Select allsudo ./esptool.py --port /dev/cu.usbserial-A4004QZw write_flash 0x00000 blank512K.bin


Thanks. I am using the esp8266_flasher.exe and I am getting this error on BOTH the good and the bad module when trying to flash :

Writing at 0x0007f800... (32 %)

Writing at 0x0007fc00... (32 %)

Writing at 0x00080000... (32 %)
Failed to write to target Flash


and now none of them will execute the bins from the Audrino IDE lol
User avatar
By CheapB
#13674
CheapB wrote:Thanks. I am using the esp8266_flasher.exe and I am getting this error on BOTH the good and the bad module when trying to flash :

Writing at 0x0007f800... (32 %)

Writing at 0x0007fc00... (32 %)

Writing at 0x00080000... (32 %)
Failed to write to target Flash


and now none of them will execute the bins from the Audrino IDE lol


Success! I flashed the module with an AT firmware - I used AI-v0.9.5.0 AT Firmware.bin and confirmed it accepted AT commands. Then I went back to the Arduino IDE and everything seems to be back to normal. Thanks for leading me in the right direction!
User avatar
By CheapB
#13746
CheapB wrote:
CheapB wrote:Thanks. I am using the esp8266_flasher.exe and I am getting this error on BOTH the good and the bad module when trying to flash :

Writing at 0x0007f800... (32 %)

Writing at 0x0007fc00... (32 %)

Writing at 0x00080000... (32 %)
Failed to write to target Flash


and now none of them will execute the bins from the Audrino IDE lol


Success! I flashed the module with an AT firmware - I used AI-v0.9.5.0 AT Firmware.bin and confirmed it accepted AT commands. Then I went back to the Arduino IDE and everything seems to be back to normal. Thanks for leading me in the right direction!



If you have problems connecting try to put the module in STA mode - either in your sketch or while you have the AT bin loaded. I had a problem where the ESP AP used the same channel as my router and prevented connection. Your Sketch will not set the mode unless you explicit set it.