Exploring raspberry pi serial port

8
Exploring Raspberry Pi’s Serial Port Sudar (@sudarmuthu) http://hardwarefun.com https://github.com/sudar

description

Talk about using Raspberry Pi's Serial port

Transcript of Exploring raspberry pi serial port

Page 1: Exploring raspberry pi serial port

Exploring Raspberry Pi’s Serial Port

Sudar (@sudarmuthu)http://hardwarefun.comhttps://github.com/sudar

Page 2: Exploring raspberry pi serial port

I am going to assume

• You know what is Raspberry Pi• You know what is Arduino• You know what is a serial Port

Page 3: Exploring raspberry pi serial port

Raspberry Pi has a serial Port

Page 4: Exploring raspberry pi serial port

Using Raspberry Pi’s Serial Port

• To login via serial console• To communicate with other devices like

Arduino

Page 5: Exploring raspberry pi serial port

Raspberry Pi’s pins or only 3.3V compatible.

Don’t connect 5V directlyYou will brick your Raspberry Pi

Page 6: Exploring raspberry pi serial port

Using Serial port to log into RPi

• You need a USB-to-serial adapter• If not 3.3V then you need a logic level convertor• Connect Tx of RPi to Tx of adapter and Rx to Rx• Power up RPi and you can login using the serial

console.• If you don’t have a USB-to-Serial adapter, then

you can use Arduino - http://hardwarefun.com/tutorials/using-arduino-as-a-bridge-to-connect-serial-devices-with-pc

Page 7: Exploring raspberry pi serial port

Using RPi’s Serial Port to communicate with devices

• By default this is disabled.• You need to enable it. Usehttps

://github.com/lurch/rpi-serial-console• Connect Rx of RPi to Tx of your device (Arduino)

and Tx of RPi to Rx of your device• Use a simple serial echo program -

https://github.com/sudar/arduino-robotics-workshop/tree/master/Serial/two_arduino_serial

• You can use screen in Rpi• Profit

Page 8: Exploring raspberry pi serial port

Thank You