Category Archives: Raspberry Pi

Raspberry Pi PIR Motion Sensor Detector

This is the PIR (Motion) Sensor Detector to add to your Raspberry Pi: Create a script named sensor.bash in /root/ directory: #!/bin/bash   #Define the GPIO path GPIO="/usr/local/bin/gpio" #Define raspistill path RASPISTILL="/usr/bin/raspistill" #Define sleep path SLEEP="/bin/sleep" #Set GPIO mode $GPIO mode 0 input   while true; do   $SLEEP 1   #Wait until a movement […]

Add a shutdown button to Raspberry Pi

This is the schema I have created to add the button to the Raspi: I am going to use a simple button, for example: I have created a hole on the top part of the Raspi’s box, where I inserted the button: This is an image of the button, with the Raspi’s box closed: Create […]

Bash script to save images to a folder with a numeric system

Automatically generate files such as: image1.jpg, image2.jpg, image3.jpg, etc. This is the bash script (save it as script.bash in the /root/ directory): #!/bin/bash   INT=1 PATH="/root/"   while true; do if [ -f "$PATH"image"$INT".jpg ]; then INT=$((INT + 1)) else break fi done   echo "$PATH"image"$INT".jpg#!/bin/bash INT=1 PATH="/root/" while true; do if [ -f "$PATH"image"$INT".jpg […]

Automatically mount USB drive on Raspberry Pi

Install usbmount: apt-get install usbmountapt-get install usbmount Plug-in your USB drive, then type: df -hdf -h You should see something like this: Now to access your USB just type: cd /media/usb0cd /media/usb0

Measure Raspberry Pi temperature from SSH

This command will show the temperature of your Raspi: /opt/vc/bin/vcgencmd measure_temp/opt/vc/bin/vcgencmd measure_temp Example: This command will monitor the temperature of your Raspi every 2 seconds: watch /opt/vc/bin/vcgencmd measure_tempwatch /opt/vc/bin/vcgencmd measure_temp Example:

Create Image Slideshow with Raspberry Pi

With Raspberry Pi we can easily create an image slideshow, without using StartX and with one single line of commands. We will use fbi, that is used to display the specified file(s) on the linux console using the framebuffer device. It supports all image types, including jpeg, ppm, gif, tiff, xwd, bmp and png. For […]

Write raw disk image to a removable device

Win32 Disk Imager is a free and open source application for Microsoft Windows operating systems designed to write a raw disk image to a removable device or backup a removable device to a raw image file. In short, this tool is used for writing images to USB sticks or SD/CF cards. It is very useful […]