Okay... my brand new Feather ESP8266 Huzzah seems to be working. :)
For now, I am testing with the pre-installed Lua, although I do intend to reflash for Arduino once I finish with these tests. Using TeraTerm (couldn't get Putty to send characters), and working from your Lua examples for the Feather ESP8266 Huzzuh underneath your "HELLO WORLD" headline, I have successfully performed both the manual and then the subsequent simple loop test for blinking the red led. I then moved on to the next two examples, both of which gave me syntax errors while typing them in. (I am pasting in the lines of code one by one because pasting in the whole mini-program all at once sends the characters to the ESP8266 too fast. I'm sure that the Arduino IDE will take care of this for me.)
First, with the example that follows your text "a smarter way to blink an LED is to use the timer capability to set off the LED control," I am able to type in the definition of the three local variables without trouble. However, I run into trouble as soon as I reference them. For example, the Lua interpreter gives me the message "stdin:1: bad argument #1 to 'mode' (number expected, got nil)" after I typed in "gpio.mode(pin, gpio.OUTPUT)" which is the first line of code that references one of the local variables. (If I replace the "pin" with the value 3, I don't get an error, but the subsequent loop simply MUST be able to reference the variables.)
Moving on, I reset the ESP8266 board and continued on to the first wifi scanning Lua example. The "wifi.setmode(wifi.STATION)" line of code was accepted, as were the first three lines of:
Code: Select all
function listap(t)
for k,v in pairs(t) do
print(k.." : "..v)
end
end
wifi.sta.getap(listap)
stdin:3: unfinished string near '"..v)'
Of course, I already admitted that it is not my intention to become a Lua developer. However, I had considered it best practice to ensure that your basic functional examples work before I reflash the part. Accordingly, any guidance you can offer is greatly appreciated. (Btw, the Lua website is not nearly as nicely put together as your own.)
Thank you so much!
P.S. I am typing in the lines of code one by one because pasting in the whole mini-program all at once sends the characters to the ESP8266 too fast. I'm sure that the Arduino IDE will take care of this for me.