Raspberry Pi High Quality Camera: https://shop.pimoroni.com/products/raspberry-pi-high-quality-camera £49.50
Microscope Lens: https://shop.pimoroni.com/products/microscope-lens-0-12-1-8x £22.50
Camera Cable: https://shop.pimoroni.com/products/raspberry-pi-camera-cable?variant=10312197191 £4.50
Save the following as /home/pi/cameraLocalView.sh
#!/bin/bash
raspivid -o - -t 0 -md 2 -fps 25 -ISO 800 | cvlc -vvv stream:///dev/stdin --no-audio --demux=h264 -h264-fps=25
Then run
chmod +x /home/pi/cameraLocalView.sh
You can now double click the file and choose 'Run in Terminal'
If you add a filename like this raspivid -o -vidFile.mpg
the stream will also be saved to ~/vidFile.mpg
To autorun the script at start up...
nano ~/.bashrc
bash /home/pi/cameraLocalView.sh
Better solution: https://elinux.org/RPi-Cam-Web-Interface#Installation_Instructions
omxplayer <filename>
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo reboot now
sudo rpi-update (this updates the firmware)
sudo reboot now
Updating the firmware is good to do once for earlier Raspberry Pi 4s to stop overheating issue. Not necessary to do this regularly.
Plug the Pi's SDCard into a computer. Create a text file called wpa_supplicant.conf to SDCard boot partition to manually configure wifi access. This file is read when the RPi boots and is then removed.
country=gb
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="NETWORK-NAME"
psk="NETWORK-PASSWORD"
}