Migrating more docs from ROB-IOT

This commit is contained in:
2026-06-28 22:14:17 +00:00
parent c166e10a56
commit c818bc62c1
3 changed files with 51 additions and 0 deletions
+1
View File
@@ -5,6 +5,7 @@ Scripts and documentation for setting up a Raspberry Pi (Zero W 1 or 2) for use
# Procedure
1. [Raspberry Pi Imager procedure to setup ssh and Raspberry Pi Connect](imager.md)
1. Find out your Pi's ethernet addresss in case you need to find it on `iot-research` again. Type `ip addr show dev wlan0` and for something like `link/ether 01:23:45:67:89:ab`. Write this information (the 12 characters and colons) in your notebook. In T-411-MECH we want you to put this information in a spreadsheet links from the main page: this allows us connect Pi's to people in case of any issues.
1. [Solder the GPIO header pins](solder-gpio.md)
1. [Gadget Mode to setup a serial connection over USB](gadget.md)
1. [Marcel's script on github to show the IP address on the OLED screen](https://github.com/mkyas/cpsy-display-ip)
+36
View File
@@ -0,0 +1,36 @@
# Gadget Mode to setup a serial connection over USB
Prepare Raspberry Pi OS connection over a microUSB serial cable
Important:  choose either PiUART or OTG.  If you do both, it is possible that neither will work.  Also, you will want to disable the serial console if you are trying to use that serial port for communicating with other devices.  Important reading:  Raspberry PI UART configuration
USB-OTG method (Works on Zero, Zero W, and Compute Module)
Based upon Adafruit guide: https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/serial-gadget:
Look for the SD card reader on the VM under "Devices > USB" and click on it  Iff you get errors, you may have to shut down the VM and set the USB version to 2.0 or 3.0
The Boot and Root partition should mount in Linux under /media/$USER/boot and /media/$USER/rootfs
Navigate to /media/$USER/boot and edit:
config.txt: add "dtoverlay=dwc2" at the end
cmdline.txt:  remove "init=/usr/lib/raspi-config/init_resize.sh" and add "modules-load=dwc2,g_serial" to the end.  Make sure everything is on one line!
Eject the card
Boot the pi with a keyboard and monitor attached
Login
sudo systemctl enable serial-getty@ttyGS0.service
sudo systemctl start serial-getty@ttyGS0.service
# connecting to the serial terminal
If using a Linux VM, you will need to pass the Pi USB connection there.  This is similar to the procedure for accessing an Arduino.
Start the Linux VM if you haven't already
Menu:  Devices > USB
Look for "Silicon Labs CP210x USB to UART Bridge" and click on it.  
Run "ls -l /dev/ttyU*" to check if port /dev/ttyUSB0 is found.  The Pi will most often be accessible over this port.
The user must be in the dialout group to access it.  Use the Linux command: id  -to check if you are in the group.  If not in the dialout group, use:
sudo usermod -a -G dialout <username>
You will use the screen app in Linux to access the Pi.   You can install it with:
sudo apt install screen
You should now gain access to the Pi with:
sudo screen /dev/ttyUSB0 115200
Press enter and you will be prompted to log in to the Pi with default credentials. User: pi - PW: raspberry
+14
View File
@@ -0,0 +1,14 @@
# Solder the Header pins on the Pi Zero W
You will need header pins to access the GPIO on the Pi.  GPIO is needed in order to connect to the Pi via the MicroUSB cable. [Details on what the GPIO pins do](https://www.raspberrypi.org/documentation/usage/gpio/)
1. Read the helpful guide on soldering: [Soldering is Easy Guide](https://mightyohm.com/files/soldercomic/FullSolderComic_EN.pdf)
1. No really, read the comic [Soldering is Easy Guide](https://mightyohm.com/files/soldercomic/FullSolderComic_EN.pdf). The teaching staff will make fun of you if you don't read it before you try doing it for real.
1. Apparently reading is hard because some people still haven't looked at the comic. Go to [Adafruit's guide on soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools) which includes videos.
1. Mount the raspberry Pi zero into a Panavise or other mechanism to hold it steady. If none of those are available, you can use tape to stick it to a piece of cardboard, then stick that to the table. Be aware the tape will melt or burn if it comes into contact with the soldering iron.
1. Get the dual row pins: 2x20. The pins are available in the stock room of V207 if they weren't included in your kit.
1. Drop them in from the top of the board and hold them in place. Flip the board over. The pins should just be sticking a little bit out the bottom of the board.
1. A partner can be very helpful for this step: Hold the pins against the board with pliers or something that won't melt; in a pinch, cardboard and tape work pretty well. Use the soldering iron to attach the corner pins, then solder the rest.
1. Inspect the soldering joints under the microscope to make sure that there are not holes or anything else that might result in a flaky connection. If you see "spiky things" sticking out, that means you didn't heat the pin and solder enough.
1. If any of the connections look questionable, remove the solder on that joint and do it again. **Unreliable solder joints will cause your system to be flaky which will drive you crazy later in the semester!**