misc tools and scripts by Ian Kluft (in shell, Perl, Rust, C++, Go, Python)
I have a few scripts in this directory which demonstrate running Perl on a Raspberry Pi.
The do-video script plays videos from a directory in random order. It looks in the user’s home directory for either Videos or Movies directory. Or you can modify your copy of the script to use another. This can be useful for playing videos at a display kiosk or during indoor exercise.
do-video uses the omxplayer program which takes advantage of the Raspberry Pi’s video hardware acceleration. Use the following command to install it. apt-get install omxplayer

Though you could just use GPSD for this, gps-read.pl demonstrates Perl code to directly access the serial port in the Raspberry Pi’s GPIO pins to read data from a GPS. This assumes the GPS outputs in standard NMEA format.
For the specific example I used an AdaFruit 746 Ultimate GPS Breakout Board and AdaFruit 2028 T-Cobbler Plus GPIO interface, or equivalent. Note that this uses the 40-pin GPIO from the RasPi A+/B+ and later. At the time of this writing that’s everything except the original RasPi 1, which has an older 22-pin interface and needs the original T-Cobbler (no plus) interface board and 22-pin cable.
Run the following commands on the Raspberry Pi to install it.
console=serial0,115200. The RasPi will need to be rebooted for this to take effect. But you can wait for that until the rest of the installation instructions are done.On a RasPi 1/1+/2/Zero run these commands.
systemctl stop serial-getty@ttyAMA0.service
systemctl disable serial-getty@ttyAMA0.service
On a RasPi 3 run these commands.
systemctl stop serial-getty@ttyS0.service
systemctl disable serial-getty@ttyS0.service
This is a simpler and lower-level example which reads raw data from the serial port so you can see the raw NMEA strings from the GPS.