You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm trying to connect esp8266(nodemcu v1.0) to my socket server(programming with node.js) the esp8266 can connect to my wifi but it can't connect to the server.
here is my esp8266 arduino ide code:
This is not the right place to ask for assistance on your particular project. This is an issue tracker for the core libs.
Please refer to esp8266.com or stackoverflow or similar for discussion/assistance.
Closing.
i'm trying to connect esp8266(nodemcu v1.0) to my socket server(programming with node.js) the esp8266 can connect to my wifi but it can't connect to the server.
here is my esp8266 arduino ide code:
`#include <ESP8266WiFi.h>
#include <SocketIOClient.h>
SocketIOClient client;
const char* ssid = "Family";
const char* password = "bat3glendi";
char host[] = "192.168.1.2";
int port = 3848;
extern String RID;
extern String Rfull;
unsigned long previousMillis = 0;
long interval = 2000;
void setup(){
Serial.begin(115200);
delay(10);
Serial.print("connect to: ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print('.');
}
}
void loop()
{
if (millis() - previousMillis > interval) {
previousMillis = millis();
client.send("atime", "message", "Time please?");
}
if (client.monitor()) {
Serial.println(RID);
Serial.println(Rfull);
}
}`
here is my socket server code:
`var http = require('http');
var ip = require('ip');
var app = http.createServer(function(req,res){
res.write('
server good!
');res.end();
});
var io = require('socket.io')(app);
app.listen(3848);
console.log('server ip: ' + ip.address() + ':' + 3848);
io.on('connection', function(socket){
console.log('connected');
});
function sendTime() {
}`
anyone got any free courses about nodemcu .i am just getting started
The text was updated successfully, but these errors were encountered: