-->
Page 1 of 2

serial communication with arduino

PostPosted: Mon Mar 07, 2016 11:54 am
by maxmaxy21
Help Needed!!
i have a project of arduino uno and esp-12
arduino is reading some sensors data and sen it serially to esp
i need the code of esp to read the serial data ^^

Re: serial communication with arduino

PostPosted: Mon Mar 07, 2016 1:49 pm
by danbicks
maxmaxy21 wrote:Help Needed!!
i have a project of arduino uno and esp-12
arduino is reading some sensors data and sen it serially to esp
i need the code of esp to read the serial data ^^


Why don't you consider turning the Uno in to an I2C slave device, the ESP could then simply use the wire library to access the uno and request data respectively. Their are lots of tutorials on Uno as an I2C slave.

Dans

Re: serial communication with arduino

PostPosted: Mon Mar 07, 2016 4:59 pm
by maxmaxy21
danbicks wrote:
maxmaxy21 wrote:Help Needed!!
i have a project of arduino uno and esp-12
arduino is reading some sensors data and sen it serially to esp
i need the code of esp to read the serial data ^^


Why don't you consider turning the Uno in to an I2C slave device, the ESP could then simply use the wire library to access the uno and request data respectively. Their are lots of tutorials on Uno as an I2C slave.

Dans

i will do that , thanks alot

Re: serial communication with arduino

PostPosted: Mon Mar 07, 2016 10:30 pm
by martinayotte
Serial or I2C, it doesn't matter !
It is up to the developer to define proper protocol used to hook up both server/client sides ...