ESP8266wifi icon indicating copy to clipboard operation
ESP8266wifi copied to clipboard

Serial and swSerial in the example ESP8266_tcp_cli.ino

Open ghost opened this issue 8 years ago • 10 comments

swSerial and Serial are changed in the example ESP8266_tcp_cli.ino ESP8266wifi wifi(Serial, Serial, esp8266_reset_pin, swSerial); Correct: ESP8266wifi wifi(swSerial, swSerial, esp8266_reset_pin, Serial);

Thank you very much for the library!

ghost avatar Feb 28 '16 13:02 ghost

I swapped them intentionally in favour of hardware serial reliability over software serial. For me, a possible missed char on the debugger is more acceptable then the frustration caused if it happens interfacing the ESP8266.

A good point though that people may swap between examples and not notice. Could be worth a comment line above highlighting this.

tuna-f1sh avatar Mar 06 '16 18:03 tuna-f1sh

Ok, I understand now.

ghost avatar Mar 07 '16 19:03 ghost

Is it possible to use this library with Arduino DUE (using hardware UART port instead using softwareserial)? If so can you provide me with a working example? Thanks in advance!

lenny1972 avatar Sep 15 '16 12:09 lenny1972

Yes. I don't have a DUE to test with but it should just be a case of replacing swSerial with Serial (or which serial port you want to use). See attached.

ESP8266_tcp_cli_duo.zip

tuna-f1sh avatar Sep 15 '16 14:09 tuna-f1sh

Thanks for the example. I'm trying to compile it for Arduino Mega 1280 but the compiler gives me the following error:

(line 39) 'swSerial' was not declared in this scope'

How is it possible?

2016-09-15 16:15 GMT+02:00 John Whittington [email protected]:

Yes. I don't have a DUE to test with but it should just be a case of replacing swSerial with Serial (or which serial port you want to use https://www.arduino.cc/en/Reference/Serial). See attached.

ESP8266_tcp_cli_duo.zip https://github.com/ekstrand/ESP8266wifi/files/474842/ESP8266_tcp_cli_duo.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ekstrand/ESP8266wifi/issues/21#issuecomment-247340594, or mute the thread https://github.com/notifications/unsubscribe-auth/AMafC-_A888OHNePYpjTcsfOV4hCwzVQks5qqVMCgaJpZM4Hk0r7 .

lenny1972 avatar Sep 15 '16 14:09 lenny1972

Sorry, I didn't read the istruction you gave me (..replacing swSerial with Serial..).

Now it seems tpo compile for Arduino Mega 1280. As soon I come back home I'll check with the Arduino DUE and let you bknow.

Thanls fopr your prompt reply and support

2016-09-15 16:15 GMT+02:00 John Whittington [email protected]:

Yes. I don't have a DUE to test with but it should just be a case of replacing swSerial with Serial (or which serial port you want to use https://www.arduino.cc/en/Reference/Serial). See attached.

ESP8266_tcp_cli_duo.zip https://github.com/ekstrand/ESP8266wifi/files/474842/ESP8266_tcp_cli_duo.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ekstrand/ESP8266wifi/issues/21#issuecomment-247340594, or mute the thread https://github.com/notifications/unsubscribe-auth/AMafC-_A888OHNePYpjTcsfOV4hCwzVQks5qqVMCgaJpZM4Hk0r7 .

lenny1972 avatar Sep 15 '16 14:09 lenny1972

Re-download the example :). I did a ninja edit on the attached file quickly after posting as it originally contained an unsaved edit.

tuna-f1sh avatar Sep 15 '16 14:09 tuna-f1sh

I get some errors with my wifi. Serial Software 115200 can't be work! I screw down to 9600 and this works fine with my wifi module. Arduino Uno and Nano are don't stable with 115200. Make an UART AT command that this work. You need the debugger script to send AT commands to the chip. Most Firmware versions accept AT commands:

AT+UART(_DEF)=9600,8,1,0,0

Will give a solution.

Wikibear avatar Feb 07 '17 19:02 Wikibear

You don't need to use sw serial.

7 feb. 2017 kl. 20:32 skrev Wikibear [email protected]:

I get some errors with my wifi. Serial Software 115200 can't be work! I screw down to 9600 and this works fine with my wifi module. Arduino Uno and Nano are don't stable with 115200. Make an UART AT command that this work. You need the debugger script to send AT commands to the chip. Most Firmware versions accept AT commands:

AT+UART(_DEF)=9600,8,1,0,0

Will give a solution.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

ekstrand avatar Feb 07 '17 20:02 ekstrand

How to connect to Arduino Nano and read out via serial terminal for debugging then? Thanks

Wikibear avatar Feb 07 '17 20:02 Wikibear