All files located in GitHub where I will track all software related activity.
https://github.com/bhileman/cardtocloud
Supported Hardware:
Linkit Smart 7688
Supported Cloud Service:
Google Drive
A device that will automatically upload photos and videos from a SD card directly into connect cloud storage.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
All files located in GitHub where I will track all software related activity.
https://github.com/bhileman/cardtocloud
Supported Hardware:
Linkit Smart 7688
Supported Cloud Service:
Google Drive
The 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:
Major test completed 2/13/17: 120 photos upload completed! - Average upload speed per photo: 15 sec.
Next Steps:
Followed 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.
This 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.
It 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:
Create an account to leave a comment. Already have an account? Log In.
Hi Brettbuilds,
This is very cool! I also bought a Linkit 7866 board and I am trying to make it stay online more reliably. The concept of going back to AP mode if it can't find a network that it knows is a really good idea. I tried to do it myself but it isn't working for me. I took a look at your code and tried to just keep the "auto AP" mode but now my board won't allow you to log in from the web UI, even after I reset it and re-uploaded the firmware and bootloader.
I have two more boards, so I want to try again. My simplified code (mostly your code) is here: https://github.com/robear90/mylinkitproject
It doesn't seem to put the board back into AP mode, and it also messed the board up a lot (my fault for executing scripts I don't fully understand). Any thoughts? Thanks!
Sorry just seeing your comment Robert. Let me look into it, I haven't run into this issue but it is possible that the board doesn't like how I am sending it into AP mode.
Looks like a neat little project.
I have a TP-Link WR703 'travel router' running openwrt which has some GPIO's available and a USB port; hook up a button and a script, connect my SD card to the USB, and upload is done..!
I shall dig in to this further..
Thanks for the inspiration
Hey Gareth, yeah seems like it should be do able. You will want to make sure to update to mount directory in this bit of code: os.system("mount /dev/mmcblk0p1 /mnt")
If you run into any issues let me know also if you get it working with any other cloud storage please share.
Become a member to follow this project and never miss any updates
I have the same problem, for me it’s terribly inconvenient to take out the card every time and plus this is additional time that could be spent on processing.