Go Down

Topic: Nodemcu/esp8266 serial hdw requires sacrificing the console capability (Read 1 time) previous topic - next topic

PaulRB

Your SP1/I2c Uart suggestion is a good one, and that inspired my idea to use another esp8266 for that purpose. Assuming the ESP can act as an SP1 or I2c slave as I think it can.
Both those solutions are more complex than switching to an ESP32. Has your order arrived yet?

Also, seem to remember can't use esp8266 as i2c slave, the core does not support it. Not sure about SPI slave.

frank2644

My ESP32 order is coming from China so it will take awhile.




Juraj

Your SP1/I2c Uart suggestion is a good one, and that inspired my idea to use another esp8266 for that purpose. Assuming the ESP can act as an SP1 or I2c slave as I think it can.

the I2C slave doesn't work on esp8266. the Wire library has it, but it is considered experimental and not documented. there are many reports that it doesn't work.

SPI slave is OK
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

frank2644

Well, I finally finished migrating to IDE v1.8.9 and started playing with the integral new SoftwareSerial capability.

In general, using a standalone loopback sketch it works well. Even at 56,000 bps there were no errors and I tried two different esp8266 pin pairs.

I also put that loopback sketch into an existing wifi html server sketch and at 9600 it also worked well. I did not any significant serial errors. Any error that I did see seemed to happen immediately during the first few seconds after boot-up. Subsequently it was error free. At 56000 bps I did see repeated, occasional errors, maybe .5%.  

Unfortunately, I did not understand much of the documentation for the serial sw. I managed to get the loopback working by copying some code from one of the examples and a lot of trial and error. Best i can see you must read-in a character at a time (probably desirable) and send a single character at a time (not as desirable) . Not a big deal IMHO and possibly due to my inability to understand the docs.

Admittedly, my above testing was not very comprehensive, but it does seem encouraging. So this seems like it might be a good solution for my need to use that SW with a Nextion display.

If I turn up any significant problems relevant to this thread I'll post back here.

Frank

Go Up