This will take pictures and save files locally on the Edison
which can be viewed at the http://ipOfEdison/pics address.
This instructable largely assumes you have experience with IOT devices and serves as reference.
Step 1: Install Intel Edison Developer Tools
Download and setup Development Environment:
- Select Intel® XDK IoT Edition
- Once you can get shell access to your Edison configure the device at shell and type:
- configure_edison --setup
- ifconfig will give you your IP address
- example: firstname.lastname@example.org
- provide password that you used when setting up the device
Step 2: Configure Edison Environment
Install required libraries for this project to run:
From Shell prompt type:
- npm install jsupm_hmc5883l
- npm install python-shell
To install Python Webcam Image capture you need to install Python-opencv
From Shell Prompt type:
- echo -e "src/gz all http://repo.opkg.net/edison/repo/all \nsrc/gz edison http://repo.opkg.net/edison/repo/all \nsrc/gz core2-32 http://repo.opkg.net/edison/repo/all >> /etc/opkg/base-feeds.conf
- echo "src mraa-upm http://iotdk.intel.com/repos/1.1/intelgalactic" > /etc/opkg/mraa-upm.conf root@spookyboo:~# opkg update root@spookyboo:~# opkg install python-opencv root@spookyboo:~# npm install python-shell
To install Web Server:
From Shell Prompt type:
- opkg install apache2
- opkg install php
pip install requests
systemctl start apache2
- systemctl enable apache2
- (Rebooting will drop your ssh connection)
Prepare Web Directory:
This lists all files in a directory on the web server
From the Shell prompt type:
- cd /usr/share/apache2/htdocs
- mkdir pics
- cd pics
- make .htaccess file with the following contents (this is also in the attached source file)
- Options +Indexes
Step 3: Make It Go
Start Intel XDK IDE
Extract files in the attached file to your computer.
Copy the files to the edison using a program such as WinSCP in the same structure as it is extracted in.
Open the project named SpookyBoo (named because the project was originally to detect paranormal activity).
Connect to your device.
Upload the code.
Start the program.
You'll notice the Intel Edison has a green led light that comes when motion is detected.
For processing purposes the scan is conservatively set for every 5 seconds.
Pics are saved to /usr/share/apache2/htdocs/pics on the Edison.
Pics can also be saved to the cloud (edit the python EdisonTakePicEmail.py file).
Step 4: Summary
Browse to the ip address assigned to your Edison to see the pictures just captured.
-This project serves as a basic guide to using Intel Edison.
-pictures can fill up the Edison
-these basic instructions are the main reference for this project
-this is my first project to upload encouraged by a hackathon