Search Results

Twittering computer grow box

image

Well this is pretty much clichéd nerdiness but given it only required a couple of lines of C# I couldn’t resist.  I have updated my grow box software to “tweet” some sort of semi-humorous and not really witty comment appropriate to its current state and share its current temperature and moisture content every 2.5 hours.

For those who want to do something similar, this is how I did it.  I one of the many twitter C# libraries and for no specific reason I chose tweetsharp and after adding a reference to their DLL and just the few lines of code (below) you can be programmatically making updates via twitter.

private void UpdateStatus(string message)
{
    IFluentTwitter twitter = FluentTwitter.CreateRequest();
    twitter.AuthenticateAs("user_name", "password");
    twitter.Statuses().Update(message);
    twitter.AsUrl();

    string response = twitter.Request();
}

If you want to see it in action go to http://twitter.com/computergrowbox.

Right now I only have a handful of not so witty comments, so if you have some good zingers add them to the comments and if I like them I will add them to the list.

UPDATE: Grow box shares its own pictures

I get busy these days and sometimes can’t make it out to keep a close eye on my plants in the grow box.  Given I have everything automated the box basically takes care of them, though I thought it would be nice if I could see how they are doing so added photo sharing to the grow box’s twittering software.

I already have the software taking pictures every so often so all I really needed to do what send out the most recent file to twitter.  After a little looking I found that tweetsharp already supported this so yet again this was just a few lines of code to implement.

First I needed the logic to determine the last photo I have taken, fortunately I was carefully about my naming using a timestamp based name similar to “Photo_2008_10_01_090130.jpg”, so alphabetical sorting would work just fine.  I removed the error handling to keep things brief but here is the code to complete this logic:

string[] files = Directory.GetFiles(photoDirectory, "*.jpg");
Array.Sort<string>(files);
string fileToUpload = files[files.Length - 1];

Now you have your photo to upload just signup for one of the photo TwitPic using your twitter account and run the following code using your credentials.

IFluentTwitter twitter = FluentTwitter.CreateRequest();
twitter.AuthenticateAs("user_name", "password");
twitter.Photos().PostPhoto(fileToUpload,
                      SendPhotoServiceProvider.TwitPic);
twitter.Statuses().Update("My Picture").AsJson().Request();

Hopefully this, you too can make you own grow box (or other inanimate object) share its feelings on twitter.

Free Gardening Books

Free gardening books

The great thing about home gardening is that people have been doing it for thousands of years and even better writing about for at least the last few hundred.  Fortunately this provides us with a great amount of knowledge of from many generations back.

What’s even better many of these get gems are under the public domain so they are completely free gardening books to have as a resource to read online and is even available in EBOOK format to take with on your favorite.  To check out these great books yourself check out Google Books with the public domain filter enabled.

Currently I am checking out “The home vegetable garden” by W. R. Beattie in printed in 1906. Sure it doesn’t have a real catching marketing title but provides some great tips and makes use of low cost solutions to the same problems we come across today.  One of my favorite finds was this handy Planting table:

Gardener's Planting Table

Click on image to enlarge

Update: Max mentioned in the comments of another great resource your local Cooperative Extension Service just go to Bing.com and type “Cooperative Extension Service” and then your zip code to find your local office and get some great local info.

BING

 

So check these out and let me know what treasures you find in the comments.

IKE