-->
Page 1 of 6

Serial communication between ESP8266 and uC

PostPosted: Tue Nov 01, 2016 1:40 pm
by rodrigocirilo
Hello everyone,

I'm trying to do a serial communication between the ESP8266 and microcontroller pic.

Well send an ESP of character for the pic I already got the pic triggers a pin receives, then immediately sends a character "c" and I do not know how to take this character in ESP and make a decision.

See my sample code, I put a serialbranch to direct when something coming but does not direct, it does not print on the screen the test I did.

Help me please.

Code: Select allcls
var = ""
baudrate (1200)
button "send1", [send1]
button "end", [end]
serialbranch [change]
wait


[change]
print "received"
wait

[send1]
serialprint (a)
io(po,2,0)
delay 100
io(po,2,1)
wait


[end]
end

Re: Serial communication between ESP8266 and uC

PostPosted: Tue Nov 01, 2016 4:40 pm
by Mmiscool

Re: Serial communication between ESP8266 and uC

PostPosted: Thu Nov 03, 2016 9:59 am
by rodrigocirilo
Mmiscool wrote:see this thread.
viewtopic.php?f=40&t=11316


I understood, I followed this example and it worked with termite 3.2.

But when I put the microcontroller (PIC) to send characters like 'a' or 'b' esp does not receive ..

I had to use a voltage divider at the output of the pic to esp, to match the voltages from 5v to 3.3v (could this be causing the problem?

Re: Serial communication between ESP8266 and uC

PostPosted: Thu Nov 03, 2016 11:00 am
by Mmiscool
The input pins are 5v tollerant. Just use a common ground. The esp can not be powered from the 5 volts thoug.