-->
Page 1 of 1

I need help with a startup sketch

PostPosted: Thu Jan 16, 2020 1:25 pm
by igeorge
Hello,
I am completely new to arduino.
I would like to start playing with a beginning sketch, but really i do not know what to do.
Basic, i have two arduino uno boards and on each of them it is attached an ESP8266-01.
Each board has 3 push buttons and 3 leds.
What i want to do is to turn on led 1 on board 2 when i press button 1 on board 1.
The led should stay on as long as i keep pressed the button.
Also, if i press 2 or 3 buttons i want to see the corresponding led on.
Can you help me please.
Attached it is a general schematic.
I can wire it on breadboard and play with it if i have a startup or a piece of code.
Thank you very much.

Re: I need help with a startup sketch

PostPosted: Fri Jan 17, 2020 8:21 am
by rudy
The ESP8266 is a 3.3 volt part and it is not 5 volt tolerant. You need to drop the Tx from the Uno down to 3-3.3 volts. The Hi output of the Tx on the ESP8266 is marginal for the Uno Rx. It may or may not work.

The 3.3 volt terminal of the Uno is not capable of powering the ESP8266 module. Not even close. You need a 3.3 volt power supply that should be capable of about 400mA. The ESP8266 can draw high current when it transmits and about 80mA when not.

I have not used the ESP-01 module, but I think you need to have the CH_PD pin pulled high to enable the ESP8266. There may be a pull up resistor on the board, I don't know for sure.

I suggest you first start without the Uno. Use a proper USB to serial converter (3.3V) and program the ESP8266 that way with the Arduino framework. There are example files included.
https://github.com/esp8266/Arduino

You can control the ESP-01 with AT commands, but most people prefer using the Arduino framework.

Re: I need help with a startup sketch

PostPosted: Fri Jan 17, 2020 10:24 am
by igeorge
Thank you very much Rudy.
I spent all my day yesterday and finally late in the night i found out on Youtube the answer.
I do not need Arduino.
I can do it with two ESP, and i have to use ESP NOW , COMBO mode.
In this mode , two ESP can talk directly to each other. No need of router.
But again, i am too new to understand all the instructions, and i need some example code to play with.