Sunday, 7 May 2017

Communicate between Raspberry Pi and Arduino

Intro:
I was looking how I could talk between Raspberry Pi and Arduino, because sometimes is much easier to get a sensor, driver motor or else ready in C instead of trying to code something that will take months to get it working.

Communications:
Raspberry Pi has the advantage to have SPI, I2C and Serial port communication, but for laziness I chose the Serial port. Of course you could try to go for SPI or I2C but it will take a little bit of more time to setup everything.

What you need:
You can use the serial port already existing on the Raspberry's pins but to make sure that I am not going to send some dirty data, because you can access the console via com, I chose to buy a usb ftdi.
You can buy the "official" usb to ttl, that will cost you around 15 pounds or you can go for a standard and cheap one here that works great!

Connection:
Connect the usb ttl on your Raspberry's usb port and then 3 cables in yours Arduino, remember to dont connect the power pin! It wont damage your Arduino but better dont risk.