Chat about current Lua tools and IDEs

User avatar
By bataradena
#60653 I been playing with tools and maybe it's me but I'm having nothing but problems...

Comments:
Maybe I don’t understand the “User Methods” in using this tool but I found this IDE-GUI very buggy. I’m not sure what I maybe missing but I put together my find in performing a simple LED Blink Program to be successfully Load into the ESP8266.

My machine:
Windows 7 Professional (x64) Service Pack 1 (build 7601)
Hewlett-Packard HP Compaq 8000 Elite USDT PC
3.15 gigahertz Intel Core2 Duo
64 kilobyte primary memory cache
6144 kilobyte secondary memory cache
64-bit ready
3992 Megabytes Usable Installed Memory
Intel(R) ICH10 Family USB Enhanced Host

DUT:
NodeMcu ESP8266 V3 Lua, CH340G

Parameters:
Tested ESPlorer (v0.2.0-rc5) with two different Firmware Builds with two different Flasher
1. Nodemcu_inger_09.6-dec-20150704.bin
2. Cloud Build nodemcu-master-7modules-2016-12—31-23-20-18-interger.bin
3. Flashed ESP8266 using both NodeMCU
4. Flashed ESP8266 Tool V3.4.4

My finding were loading and running the Lua-LED Blink:

Code:
lighton=0
pin=4
gpio.mode(pin,gpio.OUTPUT)
tmr.alarm(1,2000,1,function()
if lighton==0 then
lighton=1
gpio.write(pin,gpio.HIGH)
else
lighton=0
gpio.write(pin,gpio.LOW)
end
end)


1. Problem with File: Save to Disk / Save As… Disk, not working as expected.

2. Save&Compile ALL…
error , file.close();
dofile("LED_BINK.lua");
stdin:1: syntax error near ';'

3. Perform a “Format”
A message would be help letting the user the action is being performed, ~ 30 seconds for completion.
Pressed “Reset-ESP8266”

4. Save to ESP…..
file.remove("LED_BINK.lua");
> ([==[ lighton=1]==]);
w([==[ gpio.write(pin,gpio.HIGH)]==]);
w([==[ else]==]);
w([==[ lighton=0]==]);
w([==[ gpio.write(pin,gpio.LOW)]==]);
w([==[ end]==]);
w([==[end)]==]);
file.close();
dofile("LED_BINK.lua");
stdin:1: syntax error near ';'

5. Perform a “Format” & Pressed “Reset-ESP8266”

6. Send to ESP
lighton=0
> pin=4
> gpio.mode(pin,gpio.OUTPUT)
> tmr.alarm(1,2000,1,function()
>> if lighton==0 then
lighton=1
stdin:2: 'then' expected near 'thenlighton'
> gpio.write(pin,gpio.HIGH)
> else
stdin:1: '<eof>' expected near 'else'
> lighton=0
> gpio.write(pin,gpio.LOW)
> end
stdin:1: '<eof>' expected near 'end'
> end)
stdin:1: '<eof>' expected near 'end'


7. Perform a “Format” & Pressed “Reset-ESP8266”

8. Upload….
Uploading to ESP file LED_BINK.lua...Success

9. RUN…
Works as expected

-----------------------------------------------------------------------------------------------

Playing around with the other ESPlorer -Buttons not sure what they are for…

Note: For each one of the following examples I performed both Format & Reset to the ESP8266

1. Save&Run, no response.???
Total : 3509482 bytes
Used : 0 bytes
Remain: 3509482 bytes

2. Save&Complile&Run… ???

node.compile('LED_BINK.lua')
stdin:1: cannot ope
----------------------------
No files found.
----------------------------
>
Total : 3509482 bytes
Used : 0 bytes
Remain: 3509482 bytes


3. SaveComplie&Run…?
User avatar
By andrefleitao
#64422 Good night

I don't know if his is the correct topic to ask this but here it goes:

I have a nodemcu devkit 0.9 and i'm am able to use ESPlorer to upload basic codes like the webserver with some buttons that turn on and off leds on the board.

Now i was trying to interface nodemcu with a load cell amplifier (hx711) which i saw has libraries for nodemcu here https://nodemcu.readthedocs.io/en/maste ... les/hx711/

How can i "include" the hx711.c in my .lua file for it to recognize the functions inside hx711.c ?

The error that appears when i try to send to ESP is
"LUA interpreter error detected
stdin:1: attempt to index global 'hx711' (a nil value)..."

Best regards,
André
User avatar
By uraich
#76239 When trying Esplorer on an esp32 with micropython I have a few problems:
There is no way to stop a running program. I added a button, sending ^C which does this.
When trying to access GPIOs the module to be loaded in the snippets is not "pyb" but "machine". I corrected this in my version and the snippets work fine now.
The extra buttons do not work in python. I re-wrote the code for the reset button and disabled the other buttons.
Cheers Uli