48 lines
		
	
	
		
			1002 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1002 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| # Raspberry Pi Setup
 | |
| 
 | |
| This is a quick guide to set up a Raspberry Pi for IO control shenanigans.
 | |
| 
 | |
| Pick an SD card and write an image plus SSH config on your laptop.
 | |
| 
 | |
| ## Image
 | |
| 
 | |
| <https://www.raspberrypi.com/software/operating-systems/>
 | |
| 
 | |
| Raspberry OS Lite, possibly 64-bit for Pi 3 or later
 | |
| 
 | |
| `unxz` the image, then `dd`; e.g.:
 | |
| 
 | |
| ```
 | |
| sudo dd status=progress \
 | |
|     if=2024-11-19-raspios-bookworm-armhf-lite.img \
 | |
|     of=/dev/mmcblk0
 | |
| ```
 | |
| 
 | |
| ## SSH
 | |
| 
 | |
| - copy .ssh dir; `cp -r ssh-dir rootfs/home/pi/.ssh`
 | |
| - `touch bootfs/ssh`
 | |
| 
 | |
| ## Interfaces
 | |
| 
 | |
| This is done from the running system.
 | |
| 
 | |
| - `raspi-config` -> `3 Interface Options`
 | |
| - configure as you need :)
 | |
| - reboot to apply (config is written to `/boot/cmdline.txt` /
 | |
|   `/boot/config.txt`)
 | |
| 
 | |
| ## Scripts
 | |
| 
 | |
| Do your Python foo...
 | |
| 
 | |
| ## Services
 | |
| 
 | |
| Example:
 | |
| 
 | |
| <https://github.com/torfsen/python-systemd-tutorial/blob/master/python_demo_service.service>
 | |
| 
 | |
| You probably need the type `exec` or `simple`:
 | |
| 
 | |
| <https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html>
 | 
