General area when it fits no where else

Moderator: Mmiscool

User avatar
By Mmiscool
#37078 So long as the power is 3.3 v the and there is a common ground for the 5v signals from the serial adapter it should work perfectly. The esp can't be powered off of 5v but can use 5v signals such as serial and sensors.
User avatar
By luc VdV
#37551 To start, Great Work!
I have used the ESP8266 in combination with a atmel AVR-microcontroller before. Worked nice but I want to get rid of the AVR. I'm not a C-programmer, so the SDK was not useful for me
I was happy to find something like this interpreter. However I've had a hard time to start.

1) The flashing gave me a strange message when finished and I had to close the task with windows-task-manager afterward.
(a message-box with an exclamation sign, followed by a lot of dots)

Connected the terminal and restarted the ESP8266. The network connection afterward worked great. Maximum comfort. :)

2) I tried some of the examples. They worked great. But.....when I started writing myself some simple code it didn't work. There was something wrong with my variables or with the print-function.....
Until I found out the exact syntax of the LET statement.
LET var1= 1
LET var2 =2
LET var3=3
LET var4 = 4
When I printed these vars, it gave me these strange results on my terminal:
>>var1
>>
>>var3
>>4

Finally the last LET-statement with the spaces before and after the equal-sign worked correct.

Once I found out this solution, I've had no more problems and now it's fun to find out how simple it is to use the ESP8266 as IO-controller. Still have a lot to learn a lot cause it is a complete new environment for me. Still have a lot of questions but before asking (some stupid) questions, I will try find out myself.
Once again.....I am thankful for your efforts.
A happy user. :)
You do not have the required permissions to view the files attached to this post.
User avatar
By forlotto
#38106 Yes this is progress at first it can be rather slow....

I've been at it for months to get where I wanted to be with my project at current still a lot left to do but it works as is and that I am happy for.

Exactly you are required to use spaces.

If you want to add two strings you must use the and symbol

example:
let W = "world"
print "hello" & W

would be the same as:
print "hello world"

Just some quick tips.

Enjoy yes give it time follow the documentation etc etc...
User avatar
By flex
#45936 I my trying to get connected to a test server. But I have always DNS problems. I am using a code like this (omitting the part of connection to the WiFi):

net.dns.setdnsserver("8.8.8.8",1)
net.dns.resolve("httpbin.org", function(server_ip)
if (server_ip == nil) then print("DNS fail!") else

print(server_ip)

conn=net.createConnection(net.TCP, 0)

conn:on("receive", function(conn, payload)
print('\nReceived\n')
print(payload)
end )

conn:on("connection", function(conn, payload)
print('\nConnected')
conn:send("HTTP/1.1\r\n"
.."Host: httpbin.org/get\r\n"
.."Connection: keep-alive\r\n"
.."Accept: */*\r\n\r\n")
end)

conn:connect(80, server_ip)

end
end)

The printed IP looks like: userdata: 3fff1b80
And conn:connect(80, server_ip) hangs forever ...