Hardware Reference
In-Depth Information
picture.runShellCommand( "fswebcam " + path + filename + " -r 1280x720" );
while (picture.running());
We then make a second call to the Linux machine, this time calling the Python script with
the name of the picture as an argument, which will upload the picture to Dropbox:
picture.runShellCommand( "python " + path + "upload_picture.py "
+ path + filename);
while (picture.running());
You are now ready to test the project. Again, all the files are available inside the GitHub
repository of the topic:
https://github.com/openhomeautomation/iot-book
First, put the Python file at the root of the SD card, and put the SD card back into the Ardu-
ino Yun board. Then, upload the Arduino sketch to the Yun. Now, try to trigger the motion
sensor, for example by waiving your hand in front of it. You should see that the webcam is
being activated shortly after (for example, my webcam has a LED that turns green when it
is active).
To check that the project is working correctly, after a while you can check the SD card, you
should see that some pictures have been recorded:
You can also check on your Dropbox folder, where the same pictures should have been up-
loaded. They should be located in your Dropbox apps folder:
Search WWH ::




Custom Search