Itsch:
so now work the upload to the nodemcu. but how i connect the nodemcu to the arduino as a shield i dont find informations for this ?
so the firmware OTA upload works?
can you post a photo of the wiring?
Itsch:
so now work the upload to the nodemcu. but how i connect the nodemcu to the arduino as a shield i dont find informations for this ?
so the firmware OTA upload works?
can you post a photo of the wiring?
Yes
Nodemcu-Arduino
RX-6
TX-7
GND-GND
Vin-3V
EN-3V
D0-Reset
Itsch:
Yes
Nodemcu-ArduinoRX-6
TX-7
GND-GND
Vin-3V
EN-3V
D0-Reset
what did you set in esp8266-serial-arduinouno-hacked.cpp? 16?
D0 is io 16.
D3 is io 0
D1 is io 5
Ok thanks, the other connections are right ?
Itsch:
Ok thanks, the other connections are right ?
if the WiFiLink library works, then they must be OK
Itsch:
when i try upload ota to the arduino it comes "Error flashing the sketch"
try to disconnect the Arduino from USB. use external power or a charging USB cable without data lines
its the same Problem
Itsch:
its the same Problem
sorry my error. I read the previous page now. You wired the esp to pins 6 and 7 of Arduino. Wire the Arduino to esp8266 RX to TX. the bootloader doesn't listen on SoftwareSerial pins
Arduino- nodemcu
RX-TX
TX-RX ?
ore what you mean ?
Itsch:
Arduino- nodemcuRX-TX
TX-RX ?ore what you mean ?
yes. the esp sends the hex file over bootloader same way as avrdude
ok but then i must change this in the sketch ?
Itsch:
ok but then i must change this in the sketch ?
for flashing not. but for WiFiLink library yes. so change it in sketch and upload it OTA
hmm ota upload does not work the same problem "Error flashing the sketch"
or must i upload a ArduinoOTA library? or for what is this?
Itsch:
hmm ota upload does not work the same problem "Error flashing the sketch"
or must i upload a ArduinoOTA library? or for what is this?
no. it has nothing to with ArduinoOTA library.
does the WiFILink library work now over the hardware Serial? try the WebServer example but change the port to 8080. port 80 would stop the WebPanel and OTA web server in firmware
i change
SoftwareSerial Serial1(6, 7); // RX, TX
to
SoftwareSerial Serial1(TX, RX); // RX, TX ?
Itsch:
i change
SoftwareSerial Serial1(6, 7); // RX, TX
to
SoftwareSerial Serial1(TX, RX); // RX, TX ?
no, please
remove SoftwareSerial and change Serial1 to Serial
Serial(6, 7) ore without (6, 7) ?
#include <WiFiLink.h>
WiFiServer server(8080); // will stop the Web Panel web server at port 80
void setup() {
Serial.begin(115200); // speed must match with BAUDRATE_COMMUNICATION setting in firmware config.h
WiFi.init(&Serial);
delay(3000); //wait while WiFiLink firmware connects to WiFi with Web Panel settings
while (WiFi.status() != WL_CONNECTED) {
delay(10);
}
server.begin();
}
void loop() {
WiFiClient client = server.available();
if (client) {
boolean currentLineIsBlank = true;
while (client.connected()) {
if (client.available()) {
char c = client.read();
// if you've gotten to the end of the line (received a newline
// character) and the line is blank, the http request has ended,
// so you can send a reply
if (c == '\n' && currentLineIsBlank) {
// send a standard http response header
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connection: close"); // the connection will be closed after completion of the response
client.println("Refresh: 5"); // refresh the page automatically every 5 sec
client.println();
client.println("<!DOCTYPE HTML>");
client.println("<html>");
// output the value of each analog input pin
for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
int sensorReading = analogRead(analogChannel);
client.print("analog input ");
client.print(analogChannel);
client.print(" is ");
client.print(sensorReading);
client.println("
");
}
client.println("</html>");
break;
}
if (c == '\n') {
// you're starting a new line
currentLineIsBlank = true;
}
else if (c != '\r') {
// you've gotten a character on the current line
currentLineIsBlank = false;
}
}
}
// give the web browser time to receive the data
delay(1);
// close the connection:
client.stop();
}
}