Raspberry Pi


python picamera motion detection

posted Dec 5, 2018, 6:38 PM by Chris G   [ updated Dec 5, 2018, 6:38 PM ]

A simple example of using the Raspberry Pi Camera Module and python picamera for motion detection without any additional dependencies.


FutureSharks/raspberrypi-picamera-motion-detection.py

Kerberos.io - a low-budget video surveillance solution for the Raspberry Pi

posted Dec 5, 2018, 6:34 PM by Chris G   [ updated Dec 5, 2018, 6:35 PM ]

What's Kerberos.io?

Video surveillance made easy

Kerberos.io is a free, open-source video surveillance solution, which works with any camera and on every Linux based machine. You can deploy a fully configured video surveillance system within a few minutes on the environment you prefer: Raspberry Pi, Orange Pi, Docker, etc.


Kerberos.io is a low-budget video surveillance solution, that uses computer vision algorithms to detect changes, and that can trigger other devices. Kerberos.io is open source so everyone can customize the source code to its needs and share it with the community under the CC-NC-ND license model. When deployed on the Raspberry Pi or any other board, it has a green footprint and it's easy to install; you only need to transfer the Kerberos.io OS (KIOS) to your SD card and that's it.



Pi Eyes

posted Dec 30, 2017, 6:50 AM by Chris G   [ updated Dec 30, 2017, 6:51 AM ]

Pi_Eyes

The Python code in this repository allows users to display 3D renditions of eyes on any Raspberry Pi display:



You can also view the full project and hardware requirements on the adafruit website:

How to setup tmpfs as ramdisk to protect SD card

posted Dec 28, 2017, 7:26 PM by Chris G   [ updated Dec 28, 2017, 7:28 PM ]

How to setup tmpfs as ramdisk to protect SD card


https://www.raspberrypi.org/forums/viewtopic.php?t=107265

Add the following to /etc/fstab:-
sudo nano /etc/fstab


tmpfs /tmp  tmpfs defaults,noatime 0 0
tmpfs /var/log  tmpfs defaults,noatime,size=16m 0 0

Raspberry Pi controlling GPIO in Python

posted Sep 3, 2016, 2:52 AM by Chris G   [ updated Sep 3, 2016, 2:53 AM ]


A simple interface to everyday GPIO components used with Raspberry Pi.

Component interfaces are provided to allow a frictionless way to get started with physical computing


This is by far the easiest way to control your Pi's GPIO devices using Python. LED, push-buttons, motion sensors, etc.

Install OpenCV 3.30 for Python 3.6 on MacOS

posted Sep 2, 2016, 4:27 AM by Chris G   [ updated Dec 30, 2017, 7:09 AM ]

How to Install OpenCV 3.30 MacOS High Sierra:


  The best way is simply to use homebrew: 
  

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
#brew install git cmake
brew install pkg-config jpeg libpng libtiff openexr eigen tbb
brew install opencv3 --with-contrib --with-python3  

Homebrew will unfortunately not install the package in the proper location, so we need to rename the package and link it to the proper place for Python to find it. Adjust accordingly for your OS and Python version. 


mv /usr/local/opt/opencv/lib/python3.6/site-packages/cv2.cpython-36m-darwin.so /usr/local/opt/opencv/lib/python3.6/site-packages/cv2.so
#echo /usr/local/opt/opencv/lib/python3.6/site-packages/ >> /usr/local/lib/python3.6/site-packages/opencv3.pth
echo /usr/local/opt/opencv/lib/python3.6/site-packages/ >> /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/opencv3.pth
#python3 -c "import sys; print(next(p for p in sys.path if 'site-packages' in p))"

Finally...verify the installation:

python

Type "help", "copyright", "credits" or "license" for more inform
>>> cv2.__version__


Installing OpenCV 3.1 on Raspbian Jessie

posted Aug 25, 2016, 3:59 AM by Chris G   [ updated Aug 25, 2016, 4:00 AM ]

While it is relatively easy to install OpenCV 2 on the Raspberry Pi (apt-get), getting the enhancements available in version 3.1 requires a bit more work.

Fortunately, there is a very nice script that will do most of the work for you, and it is available at:



Simply download the latest version of the script, make it executable, and run it! It will take quite some time to build though, but it will take care of all the dependencies.

However, using OpenCV on a Raspberry Pi with only 512MB or RAM offers some very limited options...but with 1GB or RAM the performance is not too bad.

Enjoy!

Add Facial Recognition to your Raspberry Pi

posted Aug 9, 2016, 5:34 PM by Chris G   [ updated Aug 9, 2016, 5:36 PM ]

The Microsoft Cognitive Services Faces API allows you to not only recognize faces in photos, but also to identify specific people based on a trained model.

For more information, and the API definition, see the following links:

Disable power management to prevent wifi from shutting down

posted Apr 24, 2016, 1:43 PM by Chris G   [ updated Apr 24, 2016, 1:44 PM ]

Out of the box, the Raspberry Pi is designed with power efficiency in mind. Because of that, the Pi will shit down unused devices with every chance it gets, and that includes the WiFi signal. So, if you have a headless Raspberry Pi and are having trouble connecting to it via http or ssh, this is the most likely cause.

To solve this, simply edit the following file:


sudo nano /etc/modprobe.d/8192cu.conf
and add the following:


options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

Save, and reboot, and your Pi will stay connected more reliably, but use a little more power.

Disable extra services to save power

posted Apr 24, 2016, 1:43 PM by Chris G   [ updated Apr 24, 2016, 2:06 PM ]

Out of the box, the Raspberry Pi is designed with power efficiency in mind. But there are a few things you can do to make it even more efficient, especially if you run in "headless mode" without the need of a monitor.

First, you can disable the HDMI port, which will save about 25mA. To do so, edit the file:

/usr/bin/tvservice -o
You can use -p to re-enable this is needed. If you want to apply this change after every reboot, add that same line in the following file:
/etc/rc.local


To save even more, you can also turn off the bright red PWR LED and the ACT activity LED.

If you want to disable both LEDs after every reboot, edit the following file:


sudo nano /boot/config.txt
and add the following:

# Disable the ACT LED. dtparam=act_led_trigger=none dtparam=act_led_activelow=off # Disable the PWR LED. dtparam=pwr_led_trigger=none dtparam=pwr_led_activelow=off

Save, and reboot, and your Pi will now use little less power.

1-10 of 31