Browsing all articles in Social

So this is going to be a rather strange post as at the time of writing its not actually implemented, the system is built in a waterproof container as well as the networking setup and so on. I figure that since I will only be able to get another Arduino and ethernet shield at a later stage I may as well write it up for now. Below are a few pictures of the system completed:

Completed System

Completed System

Completed System

Completed System

Completed System

Completed System

 

 

 

 

 

 

 

 

 

With regards to the requirements for the system my part spec was as follows:

  • One large reservoir – I got an 80 litre orange bucket for about R100
  • Arduino + Ethernet shield – pretty stock standard
  • 4x 10K resistors – used for the sensors
  • 4x ‘sensors’ – sensors setup as before, coiled wire (soldered if you can) and taped on
  • 8x galvanised steel washers – used as the actual sensors
  • 2x transistors - used for the relay setup
  • 2x relays - I used LT-5GS’ for this to switch the pumps on and off
  • 2x Diodes – used for my relay setup
  • 2x Water pumps - I used two (1 per pot) honestly because it was cheaper, although not as elegant as having a electrical valves and a more intricate watering system, mine were the 1.5A 12V bilge pumps (about R150 each)
  • 2x Water pump power supplies – Obviously used for the pumps power, I used some cheap power adapters that didn’t cost much
  • 1x Arduino power supply - See http://www.arduino.cc/playground/Learning/WhatAdapter for more information
  • Wires, Tape, Tv Series, Patience -  essential in setting this up :)

Read more »

I’ve always been harping on about growing my own tomatoes and other veggies and earlier this year i attempted it for a while.Unfortunately with me going away for various conferences and generally being a forgetful lout i managed to kill many many plants!

What i wanted was:

What i wanted!

What I got was:

What I Got

So recently I was playing with my arduino and thinking about this, and got the idea to try and create an automated gardening system where my plants where automatically given water/light/etc without me having to worry about it. There are some fantastic resources online like http://www.instructables.com/id/Garduino-Gardening-Arduino/ and http://makeprojects.com/Project/Garduino-Geek-Gardening/62/1.

I began planning something i’d want, and ideally it would have to be this:

  • Moisture control for water
  • Water pump to water them
  • Light sensors for Lights and LEDs (red and blue for optimal growth)
  • Humidity to keep my plants cosy
  • Interface via LCD/Web to see how things are doing (if more water is needed etc)
  • Solar panel to allow the system to be completely stand alone

Read more »

Sep
27

zacon badges

zacon – http://www.zacon.org.za/ – is just around the corner now, so badge submission went out. Wasn’t particularly inspired but i hacked together 3 diff ones, now we just wait and see.

UPDATE

Decided to go with the Spy badges, what do you think?

 

So its been ages since i last blogged, and i am determined to try do this more regularly since it will probably get me onto doing more stuff!

This is pretty much the first thing i built with the Arduino – the idea was to make a budget IPCam with a web interface that i could connect to from anywhere and have the ability to pan and tilt my camera. Since i was in the budget price range i did also look at what was available off the shelf — and it sucks, bad quality, slow response time, no lose wires to show, all things i’m not really interested in.

I’ve split this into 3 sections just to make sure that this doesnt become a massively long blogpost:

This is that cool part where you watch the video, unfortunately i haven’t got round to making one yet.. but when i do, its going here! For now, its in pictures (the webinterface and the actual device):


The web interface for the camThe Physical Device

So i’ve commented most of the lines and you should be able to easily follow what has happened in the code. Leave a comment if there are any questions :)

Code after the break!
Read more »

So i see its been forever since i have posted anything, figured its about time, and i wanted to show some of the stuff ive done with my Arduino. The first thing i tried to do with it was create my own budget IPCam with a webcam and some arduino parts.

Basic stuff that make up the IPCam:

  • 2x Servo Motors
  • 1x LCD (16×2)
  • 1x LED
  • 1x Potentiometer (used for LCD)
  • Bits of random Meccano
  • 2x Small lifting weights ( hey, we all knew i wouldnt use them to get in shape anyway )
  • Tape/Glue/Random stuff

So first off, this is a hack, i havent done pretty much anything properly, i just pieced it together, tied in bits of code and got it working :)

This is what the circuit looks like:
Arduino IPCam CircuitArduino IPCam CircuitArduino IPCam CircuitArduino IPCam Circuit

Read more »

ANDREW I DONT CARE ABOUT YOUR STORIES! JUST GIVE ME THE LINK! >> http://andrewmohawk.com/facefall/

So its been a long weekend, but i had a lot of time to myself this weekend, and decided to play a bit with some of the side projects i’ve been interested in.

With regards to the previous posts, the code has been updated and fixed, ill update the post a little later — but hopefully we (@Paterva) will be releasing the transforms to the public this week so everyone can play!

One of the first ones i wanted to tackle was faceFall — essentially twitterfall for the facebook graphAPI, so you can quickly search for a topic and watch the status messages / links fall down as they arrive :)

So check it out: http://andrewmohawk.com/facefall/ ( yes i realise the UI looks like ass, but i cant get a nice design to work.. if you have one or want to build one, PLEASE let me know!)

Some stuff id need to fix:

  • Removing doesn’t work well ( probably my lame ass jscript )
  • Doesnt do any correlation (like same person featured on x Topics)
  • Needs more info — only does status/links atm

If anyone wants this and wants to help, feel free to comment msg me!

I also cleaned the whiteboard:

Technical Info after the break!
Read more »

Oct
11

Hello Webcam!

So i figured i’d drop a quick update on what i’ve been messing around with, firstly ZACon II was awesome! I’m really dissapointed i didn’t submit a better talk and get a chance again, however i did win the badge competition and get to make my own cool badge:

Rock Paper Scissors Lizard Spock!

Rock Paper Scissors Lizard Spock!

Some of the talks i really liked:

  • Who can forget Roelof Temminghs talk, especially when one of the sections is “5 things Andrew didn’t implement in his free time” :P
  • Ollie Whitehouse on UNCON and how their group runs ( and drinks :P )
  • RC1140/Jameel‘s talk on Powershell
  • Todor/UKJ‘s talk on DNSSEC ( but really guys 800 requests at once, that needs to be fixed/mitigated first!)
  • Ross Simpsons iPhone Hackery ( can’t wait for 4.1 JB to be out )
  • Ian de Villiers JAR reversing talk
  • Haroon Meer‘s FIG talk :)

Secondly i KNOW i probably should have put up code and stuff for the arduino project i built, basically its a webapp that shows the webcam and allows you to move the cam around. The Arduino is connected to two servo’s to do vertical / horizontal movement, and it can be controlled via the webapp:

CAM CAM CAM

CAM CAM CAM

Oh yeah, it also lets you send text to an LCD and blink an LED ( but these aren’t nearly as cool ).

So after doing this i wanted to look at motion tracking and see if i could get the camera to automagically follow someone around a room with facial/object recognition, and in the little time i have had to play today it seems easily doable with the likes of OpenCV , so far today ( besides battling c++ – its been over 5 years since I’ve touched the stuff, so there were some issues :P ) I’ve managed to get it to do some pretty cool facial recognition with the Haar classification and the provided definition – haarcascade_frontalface_alt2.xml. I’ve also given it a bit of a window to try move into and it seems to work pretty well. The only issue i saw was that at the default resolution of the camera ( 640×480) it absolutely ATE my 3ghz dual core, so i had to halve the image size and now it works real-time-ish, check out the pic:

Webcam Facial Detection

Webcam Facial Detection

I’ve also been playing around with Facebook’s graphAPI and i am hoping to provide some cool new search functionality both to Maltego and as an RSS feed that people can use to monitor what has been said about a specific topic in the public on the social networking giant.

I’ll try start putting out a little more.

Cheers,
Andrew

p.s. yeah, the mohawks been gone for a month now, now if only i had a new alias that wasn’t taken on the net :)

MusicBee

IF YOU DONT CARE ABOUT WHAT HAPPENED AND JUST WANT THE PLUGIN CLICK HERE
So i have recently switched over to the wonderful musicBee ( www.getmusicbee.com ), phenomenal application, nearly amarok for windows :) Some of the features i like:

  • Quick search (type in the search bar, library adjusts by searching all available fields intelligently)
  • Notifications across MSN and Last.fm and the like
  • Fantastic tagging per track and per album
  • Downloading of art and lyrics
  • Looks good :P

One of the features i have always used in my previous media players has been the now-playing-plugin for mIRC which i use on this machine.

Unfortunately i could not find any for musicBee, so yesterday i took a few hours to figure out how to make one.Let me preface this section by saying the last time i coded C++ was around 5 years ago at university, so i could be horribly wrong for some of this, but i’m just saying what i saw – also if the code is horrid, well, atleast it works :)

mIRC and DLLs


Essentially mIRC communicates with dll’s by calling the DLL ( which you specify ), the function within the DLL and some data that is sent from mIRC as per the documentation (mIRC help) the function looks as follows:

The routine in the DLL being called must be of the form:
int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause)

*my function was showSong

All DLLs also require a sort of reference file that tells mIRC exactly what functions are available like so:

LIBRARY "musicBeePlugin"
EXPORTS
showSong @ 1

* showSong is the function i created

Essentially i followed this guide to get setup, fantastic little how-to setup a mIRC plugin in VC++: http://purplespore.com/main/?p=46 and for just the guide: http://purplespore.com/main/wp-content/uploads/2008/10/mytutorial3.html

MusicBee and Songs



So after doing that i noticed that musicBee displays the current artist and song within the window title ie:

Alt Tab  - MusicBee

Alt Tab - MusicBee

Code



So now i just had to write some simply code to go through all the currently available windows and then find the one that matches “MusicBee”. Sure i could have used regular expressions, but i didnt wanna push my very limited C++ skills to get this done by overcomplicating something. None the less the code looks like this:

#include <windows.h>
#include <string>
using namespace std;
string finaldata = "";

BOOL CALLBACK MyEnumProc(HWND hWnd, LPARAM lParam)
{
   char buff[255];
   if (!hWnd)
   {
      return TRUE; // Not a window
   }
   if (!::IsWindowVisible(hWnd))
   {
      return TRUE; // Not Visible?
   }
   GetWindowText(hWnd, buff, 255);
   string windowTitle = buff;
   string windowToFind = "- MusicBee";
   basic_string <char>::size_type titlePos;
   titlePos = windowTitle.find(windowToFind);
   if(titlePos != string::npos)
   {
      finaldata += windowTitle.substr(0,titlePos);
   }
   return TRUE;
}

int __stdcall showSong(HWND mWnd,HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause)
{
   EnumWindows(MyEnumProc, 0);
   strcpy(data,finaldata.c_str());
   return 3;
}

Some of the things that had me stuck:

SWITCH YOUR APP TO MULTIBYTE SUPPORT or you cannot use the char within GetWindowText — to do this:

  • Select project (not solution)
  • Project->properties
  • Character set->Use Multibyte Character Set
projectProperties

VC++ Project Properties

Download and Use



musicBeePlugin for mIRC — download .zip

Extract the above zip into your mirc directory, and add this to the alias file ( alt + r, click Aliases ).

/F4 //me is listening to: $dll(“musicBeePlugin.dll”,showSong,a) [ MusicBee ]

You can then press F4 to have your song playing:

mIRC with nowPlaying and Aliases

mIRC with nowPlaying and Aliases

Recent Posts

What?

Not the quickest of cats
on the best of days.

Tag cloud

Donate

For electronics/other to play with:



Archives