DSFU – Adding Email Functionality, Better User Experience, Stable Set Adding

Big post for this project, here’s a video:

This version of the code implements a few really cool features.

First things first I added 10 LEDs that display the percent uploaded of the batch. For example if 13 / 100 photos have been uploaded, the first LED will light up. If 56 / 100 the first 5 LEDs will light up. Eventually the 10 junk LEDs will be replaced with a bar graph which will be mounted externally on the front panel of the enclosure.

I am using every single available output on my Pi now, but I was able to get away with adding 1 more LED that I should be able to use by using a transistor array explained here:

On the code side of things, I updated the way photos are added to the set. It uses the same principal as described in the previous post (using APscheduler to do the adding on an interval). All of these changes can be seen below, it’s still very poorly commented however.

Thanks for reading!

Pi Uploader | Reliable Batch Uploads to Flickr

Here’s a video:

So basically the program indexes every single file on the SD card and then starts a scheduled interval process to upload them every single upload to flickr every 20 seconds. From there, it creates a set and indexes all of the upload responses and then walks though that list and adds each photo to that list. Then it emails the set URL with some other data.

I had a lot of problems with the flickr API timing out, and solved this problem by using APscheduler (easily my favorite package). You can see a more in depth chronicling my struggle on my twitter account.

I really want this project to be polished so I probably won’t be done with it for a while. I want to like 3D print a really nice looking enclosure and use a lot of panel mount components.

Here’s the python script:

Thanks for reading!

Pi Uploader | Updating Code for Mounting and Mounting Capabilities

This program can now handle mounting and unmounting the SD card on /mnt/SD (you will have to make that dir with root privileges)

Pi Uploader | Uploading and Photoset population with Flickr

Here’s a video!

So now, when in Flickr Upload mode, the program will:

1. Walk through all Sub-Directories and find every image file

2. Upload all of those photos to Flickr

3. Get the photo ID’s of each of those photos and then index them into a list

4. Use that list to create a Photoset (Flickr’s equivalent of a Photo Album) named after the time the photos were uploaded.

As I said in the video, I want eventually (if the weather stays this bad, tomorrow) add email functionality to the program so it will send the user an email when all of the photos have been uploaded / the set of those photos.

Here’s the source used in the video:

Pi Uploader | Copy from SD card to HDD

Here’s a video!

So half of the core functionality of the device is done! It’s a pretty simple solution to walk through all of the files in the directory. I actually might check if having sub-folders will mess the process up and it probably will, if that’s the case I’ll try and publish a fix for later tonight.

Anyway’s here’s the source:

EDIT: So the above code won’t walk through sub-folders on the SD card, here’s an updated source:

Pi Uploader | A basic skeleton

So like I said in my previous post I’m attempting to make a dead simple Flickr uploader. Video explaining this setup here:
http://youtu.be/Ll0SOO-jmr4

Here’s a picture of how it’s all wired up, this will likely not change throughout the duration of the project:

uploader

Image generated by fritzing.

And here’s the python code, it’s very rudimentary:

Thanks for reading!

Integrating twitter to the Raspberry Pi

Here’s a video of the system working:

I wanted to create a way to push data from my Raspberry Pi monitoring plant growth to myself. Instead of creating an email server and sending emails, or setting up an sms client, I decided to install tweepy and use twitter and python to send me the data.

First thing’s first, I had to create a dummy account (@eso_rpi) and sign up for the Twitter Dev Program, which is a free way to access the API. You will need to generate a set of consumer keys and access tokens for your app. The process is pretty simple, and the tweepy example is pretty straight forward. If you run into trouble you could easily google it as the process is pretty well documented.

Here’s my code, you will need to download and install tweepy and apscheduler for this to work:

The wiring diagram is the same as it is here, except there is an ldr connected to port 1:

There you go!