Server Upgrade | Pictures!

Alright so the build works, here are a bunch of pictures!

The final setup!

Server Upgrade | Initial Build Spec

Hello! Long time no write!

Lemme jump right in, the server that hosts all of my content is dying. Right now, I get around 200 hits a day, and that’s only rising (thanks youtube dudes!) which is really taking a toll on the server. It’s an HP laptop that has been on for almost two years straight, in addition to being my only computer for 4 years before that.

The only reason this is worth writing about is because I intend on using this machine for a few things other than hosing a WordPress server (hopefully I’ll write a post about migrating a content rich blog across servers).

I also want to run a series of email servers on the machine as well! It would appear that a series of virtual machines would be the most efficient way to accomplish this.

Here is a list of the components that I have ordered: http://pcpartpicker.com/user/egg/saved/3deW

Accessing both SPI ports on the raspberry pi using python

Turns out it’s not that hard at all! Here’s a video of the whole thing working:

This basically works around concepts I first explained here. It’s still really cool though! SPI is really fast and really easy to use, perfect for a novice like me.

Here are the physical representations and schematics of the setup seen on my desk:

Images generated by fritzing.

Here’s the code that makes it all work!

Here is some further reading:

http://www.megaleecher.net/sites/default/files/images/raspberry-pi-rev2-gpio-pinout.jpg

http://hertaville.com/2013/07/24/interfacing-an-spi-adc-mcp3008-chip-to-the-raspberry-pi-using-c/

http://tightdev.net/SpiDev_Doc.pdf

Thanks for reading!

PiPlanter | Goals and changes

So I am 151 miles away from the PiPlanter. But thanks to the internet, modern day routers, and wifi dongles I can pretty much control everything about it from here.

That being said, there are a few things I would like to change about the project. First of all, the program itself needs to be more modular. Reason being is that the core program should never stop running, even if changes need to be made. I should be able to screen the main program once, and then never have to stop it ever. This would be advantageous in a few ways but the main example is that the plants will require more water as they get larger, and then less once they start yielding fruit. I could script this, but I think that it would be best to be able to edit the ‘ontime’ value from the program without having to stop the whole process.

I’ll keep y’all posted as I try to implement this.

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!

Multiple Project Update

Hi guys

So I’ve been eeking out all that I can of my last few days of summer, and there hasn’t been much rain or bad weather at all. As a result, I’m not posting much at all.

Doesn’t mean I’m not working though, I’ve been doing a couple things.

First thing’s first my speaker is done. I just need to get a bunch of video edited, and a big post written.

Secondly I’m still working really hard on my dead simple flickr uploader (dsfu). The cool thing about this project is that it has the potential to be very useful to quite a number of people, so I’m trying to make sure that it is very stable, and very easy to duplicate. This means for the most part I’ve been doing a series of 4000+ photo uploads trying to break my script. It’s happened a lot, and you can check my twitter feed to see my brain melt as I try and figure out the problem. This project won’t necessarily be “complete” until I have a 3D printer at my disposal to create the enclosure I want.

As for the PiPlanter, it’s still a work in progress. The update I did with my last post was a start to something really complete it is in no way finished. I still need to move the camera, and the plants.

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!

PiPlanter | Big Overhaul Update

Okay! So I leave for college in less than 30 days, but I’d like to make sure my tomatoes to continue to grow once I leave so I’ve taken some steps to make sure that my departure goes smoothly.

Here’s a video of my revised setup:

There are a few key differences between this setup and my previous one:

The main one is that the watering system has been 100% re-vamped. The water distribution happens via a hose with holes in it instead of using the tray at the bottom of the plant grid in the previous video.

It also takes, uploads and tweets a picture of itself using a raspberry pi camera module.

It also creates a new mysql table every two weeks, and in turn, renders a new kind of graph. The renderscript.php file receives an argument from the python script which is the table code.

Here’s the python script:

Here’s the .php script:

Thank you 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)