Arduino Forum

Using Arduino => Microcontrollers => Topic started by: bigredsmokehouse on Sep 17, 2020, 07:57 pm

Title: Mega+wifi Serial Configuration (ESP & Mega)
Post by: bigredsmokehouse on Sep 17, 2020, 07:57 pm
I am porting two apps over to a mega with the wifi onboard.  The wifi chip is an ESPRESSEX.  Flashing it has be a zero problem.   I even took a look at the ESP-Link bin.  I got it running fine which is actually pretty nice.

I went back to the espressif binary and all is good.  I can route serial communications from the ESP8266 to the Mega wonderfully.  I want to test from the mega back to the ESP but am struggling how to display it from the ESP.

The serial monitor in the Arduino IDE is for the mega board (please correct me if I am wrong).  What are my options of being able to see serial output (for debugging purposes only) on the ESP board?  Can I putty into it?  What is everyone doing to be able to debug their ESP code?  Looking for ideas :-)
Title: Re: Mega+wifi Serial Configuration (ESP & Mega)
Post by: Idahowalker on Sep 17, 2020, 08:03 pm
I use the Arduino IDE to program ESP32's, where I can open the serial monitor and view my log_i printouts, serial.print also works.
Title: Re: Mega+wifi Serial Configuration (ESP & Mega)
Post by: Juraj on Sep 17, 2020, 08:04 pm
https://robotdyn.com/mega-wifi-r3-atmega2560-esp8266-flash-32mb-usb-ttl-ch340g-micro-usb.html
scroll it down.

ask if you need more information.

I recommend the 1,2,3,4 ON, 5,6,7 OFF. and RX/TX to Serial3. don't switch the DIP switches too many times. they fall apart.
with AT firmware 1.7+ in esp8266, you can use my WiFiEspAT library in ATmega
Title: Re: Mega+wifi Serial Configuration (ESP & Mega)
Post by: bigredsmokehouse on Sep 23, 2020, 08:59 pm
Thank you both.  I got the ESP back up and running.  It is serving pages up nicely.  I must try the RobotDyn board.

As far as the serial output from the ESP goes.  I ended up taking an FTDI Cable (https://www.ebay.com/i/253155639771?rt=nc&_trkparms=aid%3D1110006%26algo%3DHOMESPLICE.SIM%26ao%3D2%26asc%3D20160908110712%26meid%3D892c5ac8231c4784ae2ea11a5112feaa%26pid%3D100677%26rk%3D5%26rkt%3D30%26mehot%3Dag%26sd%3D164278978519%26itm%3D253155639771%26pmt%3D0%26noa%3D1%26pg%3D2386202%26algv%3DDefaultOrganic%26brand%3DUnbranded) FTDI Cable and hooking the black wire to the ground and the white wire to the TX0 on the ESP pins.  Putty worked well to view the serial port on the ESP.

My code works well transmitting data between an ESP/Mega.  I am struggling a little bit with the Serial 3 on the Mega+wifi board.  I do have the dip switch on RX03/TX03.  Do I still need to connect the ESP pins to the Arduino pins?  I am guessing not as that would defeat the purpose of the integrated board.

I am testing with DIPs 1-4 on.  I know it is running as I have both monitors running.

The lack of documentation just drives me nuts.  Can someone tell me a little more detail on the following?




Many thanks to all the wonderful people out here !!

(https://forum.arduino.cc/index.php?action=dlattach;topic=705475.0;attach=382937)