Image recognition using Movidius Neural Compute Stick on a Raspberry Pi Zero W

Let’s build a security camera using Raspberry Pi Zero W and Movidius Neural Compute Stick to recognize a “person” on the video stream PiCamMovidius Set up NCSDK API Install required packages on Pi sudo apt-get install -y libusb-1.0-0-dev libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libatlas-base-dev git automake byacc lsb-release cmake libgflags-dev libgoogle-glog-dev liblmdb-dev swig3.0 graphviz libxslt-dev libxml2-dev gfortran python3-dev python-pip python3-pip python3-setuptools python3-markdown python3-pillow python3-yaml python3-pygraphviz python3-h5py python3-nose python3-lxml python3-matplotlib python3-numpy python3-protobuf python3-dateutil python3-skimage python3-scipy python3-six python3-networkx python3-tk libboost-python-dev Clone NCSDK cd ~ git clone Compile and install NCSDK’s API framework cd ~/ncsdk/api/src make sudo make install Test installation using sample code from NC App Zoo cd ~ git clone cd ncappzoo/apps/hello_ncs_py python3 Output should look something like this: Hello NCS! Device opened normally. Goodbye NCS! Device closed normally. NCS device working. Install Paho-MQTT Use pip3 to install Paho-MQTT pip3 install paho-mqtt sudo pip3 install paho-mqtt Using these examples Clone this code cd ~ git clone Native MobileSSD Enter into following directory cd ~/PiCamMovidius/native/picam Edit with appropiate MQTT server IP, port and topic and run python script python3 OpenCV 3.2 YoLoV2 Install pre-compiled OpenCV 3.2 Add to apt-source list echo ‘deb [trusted=yes] stretch-backports main’ | sudo tee /etc/apt/sources.list.d/bintray-yoursunny-PiZero.list Update apt sudo apt update Install OpenCV sudo apt install python3-opencv Verify Install python3 -c ‘import cv2; print(cv2.__version__)’ Enable V4L driver sudo modprobe bcm2835-v4l2 Enter into following directory cd ~/PiCamMovidius/ocv3 make Edit with appropiate MQTT server IP, port and topic and run python script python3

MeshyMcLighting: NeoPixels lighting solution using Mesh Network

Idea: Wouldn’t be cool for many McLighting (RGB LED lighting using NeoPixels) to talk to each other and synchronize? Implementation: Here is my naive attempt at this, which requires McLighting to be served as stand-alone web-client. Link: Features Uses painlessMesh to create mesh network and broadcasts state to every node Does not need WiFi connection to internet, standalone mode + mesh Web interface is borrowed from “WS2812FX esp8266” example, completely served on ESP8266 Can do minimal file upload to SPIFFs Completely Async! Uses Task Scheduler, no more tickers No delays in entire code Has RESTful API (same API as McLighting, use set_mode for setting mode, speed, brighness) Async Websockets (ws://HOSTNAME/ws on port 80, same API as McLighting) Async MQTT/Home Assistant Intergration (Only SERVER connects to outside world) Auto Mode (same as McLighting) Button Mode (same as McLighting) Async WiFiManager for SERVER Limitations/TODO For stability, compile both SERVER and CLIENTS on IwIP variant 1.4 Higher Bandwidth (very flaky in IwIP v2) Use Arduino ESP8266 GIT version (Issues with v2.4.1: not memory optimized) WS2812FX has delays meant for ESP32. Track issue here NeoAnimationFX has no delays.

Stock Prediction on Python using Machine Learning (NARX)

Here is a naive attempt at predicting a particular stock’s price and displaying it on a ESP8266. This algorithm is not the best one out there, but what is being shown here is the ability to port it elsewhere and easily integrate these complex models with micro-controllers (ESP8266) and other devices. GitHub: Install MATLAB 2017a Runtime v9.2 from here Goto Python/matlab_stock_python_lib folder and install “stock” python library using `python install` Use “requirements.txt” file to install required libraries. Console: “$ pip -r install requirements.txt” Enter appropriate values for MQTT server in “” and run “python” Upload Arduino files on your esp8266 using Arduino IDE

Quenching of a 360 MHz NMR Magnet

Watch liquid Helium boil off to gaseous state from a decommissioned 360 MHz NMR magnet. For every litre of liquid Helium, 750 litres of gaseous Helium is generated. When the Helium boils off the superconductor is no longer a superconductor and this seizes to be a magnet. Watch the steel screwdriver fall off once this happens.

ExplorationU at Mount Nittany Middle School

[metaslider id=748] It was a great opportunity provided by Penn State Postoc Society, that both me and Sasmita were able to present a few projects at ExplorationU @ Mount Nittany Middle School. We presented 3 projects that involved light sensors doing some amazing things, particularly a color sensor detecting colors, a gesture detector sensing hand movements and a proximity sensor to look at the distance of hand from sensor. The joy that kids got from interacting with these sensors made our day!