raspberry pi/uart introduction - github pages
TRANSCRIPT
![Page 1: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/1.jpg)
Raspberry Pi/UART Introduction
Bryce Hime baugh
E210 Engineering Cyber-Physical Systems (Spring 2021)
![Page 3: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/3.jpg)
INDIANA UNIVERSITY BLOOMINGTONINDIANA UNIVERSITY BLOOMINGTON
Raspberry Pi/UART
![Page 4: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/4.jpg)
Raspberry Pi Overview
![Page 5: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/5.jpg)
INDIANA UNIVERSITY BLOOMINGTON
Raspberry Pi History• Collaboration between University of Cambridge and Broadcom
• Released in 2012 to teach basic computer science in schools and developing countries.
• Managed by Raspberry Pi Foundation
• Original target application was robotics.
• 3B+ Costs $35, 4B Costs $75
![Page 6: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/6.jpg)
Raspberry Pi Hardware • Processor
• Broadcom BCM2837B0 quad-core ARM A53• 64-bit 1.4Ghz
• GPU• Broadcom Videocore-IV
• 1GB LPDDR2 SDRAM• Gigabit Ethernet, 2.4GHz and 5GHz
802.11b/g/n/ac Wi-Fi• HDMI Video Output • Audio Output• 32GB SD Card Drive
![Page 7: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/7.jpg)
Raspberry Pi Software • Typically runs a variant of Linux• Pi OS Linux
• Formerly known as Raspian• Debian based• Created in 2012• Managed by the Raspberry Pi Foundation• Uses LXDE (lightweight X11 Desktop Environment) Desktop Environment by default
• Others• Ubuntu• LibreElec• RetroPie• TLXOS
• Possible to create “bare-metal” programs. • Documentation can be challenging
![Page 9: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/9.jpg)
![Page 10: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/10.jpg)
![Page 11: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/11.jpg)
![Page 12: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/12.jpg)
![Page 13: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/13.jpg)
![Page 14: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/14.jpg)
![Page 15: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/15.jpg)
https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b
![Page 16: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/16.jpg)
https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b
![Page 17: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/17.jpg)
https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b
![Page 18: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/18.jpg)
https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b
![Page 19: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/19.jpg)
https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b
![Page 20: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/20.jpg)
https://gadgetversus.com/processor/intel-core-i7-8565u-vs-broadcom-bcm2837/
![Page 21: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/21.jpg)
UART Overview
![Page 22: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/22.jpg)
INDIANA UNIVERSITY BLOOMINGTON
UART Overview• Universal Asynchronous Receiver Transmitter
• Full-Duplex - Receive and Transmit Simultaneously
• Communication with systems using different clocks.
![Page 23: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/23.jpg)
INDIANA UNIVERSITY BLOOMINGTON
Waveform
![Page 24: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/24.jpg)
INDIANA UNIVERSITY BLOOMINGTON
Pins• TX (output): Transmit Data
• RX (input): Receive Data
• Flow Control
• nCTS: Clear to Send - prevents STM32 from transmitting data when high.
• nRTS: Ready to Send - indicates STM32 is ready to receive data when low
![Page 25: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/25.jpg)
USB to Serial Converter
![Page 26: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/26.jpg)
Serial Connection to PIUSB-to-Serial Adapter
![Page 27: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/27.jpg)
Pi
Workstation
UARTUSB
FTDI USB-UART Converter
RX/TXVirtual COM Port
![Page 28: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/28.jpg)
![Page 29: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/29.jpg)
![Page 30: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/30.jpg)
Connecting the Pi
![Page 31: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/31.jpg)
Connecting with Putty• Connect USB cable• Determine the COM port of FTDI cable • Connect to COM port using Putty
![Page 32: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/32.jpg)
Console Connections
![Page 33: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/33.jpg)
![Page 34: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/34.jpg)
![Page 35: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/35.jpg)
Might have to hit Enter a couple of times …Username: piPassword: e101class
![Page 36: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/36.jpg)
Connecting with Mac/Linux• Connect the USB/Serial Cable• Look in the /dev directory to find name of device.
• Linux: ttyUSBx where x is an integer starting at 0 • MacOS: cu.x where x is likely something like usbserial
• Connect to the device using screen • https://pbxbook.com/other/mac-tty.html
![Page 37: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/37.jpg)
![Page 38: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/38.jpg)
![Page 39: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/39.jpg)
![Page 40: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/40.jpg)
After logging into the machine: • Username: pi• Password: e101class
![Page 41: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/41.jpg)
Determine IP Address• If you are in Luddy, the PI will connect automatically to IU
DeviceNet• You should have an IP address that begins with 140. • Use the command ifconfig to verify address of wlan0 interface
![Page 42: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/42.jpg)
![Page 43: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/43.jpg)
SSH to this IP Address
![Page 44: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/44.jpg)
Not at Luddy … • Use the raspi-config utility to add the name and password of
your wireless access point. • Run the command using sudo. For Example:
• “sudo raspi-config”
![Page 45: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/45.jpg)
![Page 46: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/46.jpg)
![Page 47: Raspberry Pi/UART Introduction - GitHub Pages](https://reader030.vdocument.in/reader030/viewer/2022012107/61dc2c6bfcbaf2378c5f8227/html5/thumbnails/47.jpg)