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
//TRATANDO O BUFFER
char recebido;
char tratado;
char c;
void setup()
{
//Inicializando serial do Arduino e do ESP82266 para conexão ao WebPage
Serial.begin(9600);
Serial1.begin(9600); //BaudRate padrão do ESP8266
Serial.print("Iniciando Setup\r\n");
Hi Guys,
I need help with my project.
Here is my code:
`#include <ESP8266.h>
//DADOS DO WIFI
define WIFI_SSID "SSID"
define WIFI_PSK "123456"
define HOST_NAME "HOST"
define HOST_PORT (80)
ESP8266 wifi(Serial1);
//OUTPUT
const int LED_RESPOSTA = 13;
//ENDEREÇO NODE.JS
const char http_site[] = "HOST";
const int http_port = 80;
//TRATANDO O BUFFER
char recebido;
char tratado;
char c;
void setup()
{
//Inicializando serial do Arduino e do ESP82266 para conexão ao WebPage
Serial.begin(9600);
Serial1.begin(9600); //BaudRate padrão do ESP8266
Serial.print("Iniciando Setup\r\n");
//LED para Debug
pinMode(LED_RESPOSTA, OUTPUT);
//CONECTAR WIFI CONFORME CONFIGURAÇÕES
conectarWifi();
}
void loop()
{
ConexaoServer();
}
void conectarWifi() {
Serial.println(wifi.getVersion().c_str());
if (wifi.setOprToStationSoftAP()) {
Serial.print("Configuracao StationSoft OK!\r\n");
} else {
Serial.print("Configuracao StationSoft ERRO\r\n");
}
if (wifi.joinAP(WIFI_SSID, WIFI_PSK)) {
Serial.print("Conectado ao WIFI com sucesso!\r\n");
Serial.print("IP:");
Serial.println( wifi.getLocalIP().c_str());
} else {
Serial.print("Não conectou ao WIFI, refazer as configuracoes\r\n");
}
}
void ConexaoServer(){
uint8_t buffer[1024] = {0};
}`
And i receive from Node.js
`Received:[HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 4
ETag: W/"4-wArb1VtkpsN6In8g50pGNw"
Date: Wed, 31 Aug 2016 01:26:41 GMT
Connection: close
Luiz]`
But i want to receive just "Received:[Luiz]". How i can do this?
Thanx!
The text was updated successfully, but these errors were encountered: