-
Major Update: Code simplified, now running with button press, added LED indicator.
02/13/2017 at 23:13 • 0 commentsThe code has been simplified, now everything is contained in one single python script now named app.js (remember to update the file rc.local in /etc with the new app name to run at startup).
New Hardware setup:
- I created a proto board with a push button and LED. The upload sequence is now initiated via a button press. The LED will blink when in idle mode and will remain solid during the upload process. The LED and button are wired in with a 1k and 10k resistor.
Major test completed 2/13/17: 120 photos upload completed! - Average upload speed per photo: 15 sec.
Next Steps:
- Create an enclosure to take this out for some field testing (hiking this weekend..)
- The enclosure needs to have some sort of cooling, most likely a small fan because the linkit does get pretty hot. May also consider a small heat sink.
- I am planning on keep the power external and using my mobile lipo battery powering over USB. Simple and works well.
-
Make Program Run at Boot
01/13/2017 at 00:44 • 0 commentsFollowed these directions and made the button run at startup
https://iamblue.gitbooks.io/linkit-smart-nodejs/content/en/basic/linux_auto_start.html
Now the button program starts at boot up and a button press with run the uploader script. Woohoo!
This was really all I needed to do to get it "un-tethered" from the computer because I now have the button to initiate the script. Now time to get this running off battery and ready to go truely mobile.
-
Run Script with Button Press
01/13/2017 at 00:27 • 0 commentsThis function is crucial in order for the user to determine when the program is run. Followed this schematic minus the LED portion:
Here is the code, I put the function in the root directory:
import mraa import time import os button = mraa.Gpio(20) #set GPIO 20 to input mode button.dir(mraa.DIR_IN) while True: print "P8 state:", button.read() if (button.read() == 1): os.system("python root/uploadersd.py") break time.sleep(1)
Currently running script in the top level with python root/button.py
Successfully monitors button with 1 sec scans then runs the upload script when the button is pressed. The plan is to now make this program run at start up so the device is automatically looking for that button press to start the upload.
-
Test 1/11/17: First Successful Camera -> Drive
01/12/2017 at 01:58 • 0 commentsIt works! Been in the works for some time now but it is to a point worth mentioning. Successfully:
- Took 3 photos with my Sony RX100 (add had a random stock photo of tulips in the mix)
- Inserted SD card, ran program
- The photos uploaded to my google drive without any intermediate steps!
Next tasks:
- Figure out the smoothest (hopefully easiest) way to connect the device to a wifi network via my phone. Delete all existing authorizations and go through the entire setup process using only my phone
- Get the software setup to run with the push of a button
- Get mobile hardware setup with battery, charger/regulator, and enclosure.