I programmed ESP-01 via USB-TTL adapter. ESP-01 can connect to wifi and reveice NTP data from server. I can read correct NTP data from PC Arduino IDE serial monitor while ESP is connected to the PC USB-TTL adapter.
How can I to see this NTP data on my OLED screen which is connected to the Arduino UNO ? I must use UNO since I will add some keypad and some servo to my project. Main goal is, run servo when specified time comes
Ideally, the Uno would be set up to receive serial data (the time data) from the "ESP".
Any idea how you can send "Hello Uno" from the ESP to the Uno and have that display on the OLED?
OK, the command "Serial.print" can succesfully send data to PC via USB-TTL adapter , thats fine.
But, UNO did not recognize this data. I feel I should try something different. I tried Serial.write into ESP but it didnt work.
The usual approach is to attach a Software Serial instance to one of the Uno I/O pins. Then it can receive the serial data from the ESP. You also need 3.3V-5V level shifting between the two.
As suggested in the previous post, you haven't explained anything about your serial connection. You said, "try something different" but different than what?
I'm sorry, but the Uno doesn't require level-shifting on its input; "3V" is an acceptable High.
From what I read, the Uno only needs the NTP from the ESP.
PE -
OP needs to establish a grasp of the fundamentals of Serial data transfer, a simple proof of concept thing.
Yes, as long as you don't require serial communication with the PC at the same time. You still haven't told us enough about your system... that would be okay if it worked. But you say it doesn't.
Reduce complexity! Why do you want to use two microcontrollers? The less components you have, the easier your sketch gets. If you use a board like a Wemos D1 or a NodeMCU you get more pins, you can connect the display directly to the NodeMCU and can get rid of the Arduino! If you really run out of pins, consider to use some I2C portexpanders to get more pins.
Talking about a keypad: For example the SX1509 is a very nice IC to do all the needed things to decode a keypad / buttonmatrix!.
Furthermore: there is no need to do this NTP code in the user sketch. The ESP is perfectly able to do all this in the background, with two, three lines of code.
There is a nice example ESP8266 / NTP-TZ-DST or if you want to read a smaller version on my page https://werner.rothschopf.net/202011_arduino_esp8266_ntp_en.htm