Import Soul Wouldn’t it be nice if things just worked

28Sep/110

Interactive Donation Box

Well it was right down to the line but i managed to get my Design and Technology project finished and ready for marking, just... I only had confirmation that all the parts of the project played nicely together after rapidly programming it and getting to put coins into it for the first time at 3AM on the morning it was due. After a quick dash to office works at 7AM i was ready at school to hand my project in on time at 9AM.

Even though the projects design had to be greatly modified from its original 3 window design a I am really happy with how well the project has turned out and with all of the really positive responses I have got from other students and teachers. Without any more words here is the project.

Just in-case you haven't read my previous posts from way back about what the donation box actually is, here is a quick summary.

When somebody puts a coin into the machine it is sorted by currency and depending on the value of the coin a certain number of marbles are sent though a marble run (i decided on the rate of 1 marble per 10c). The idea of the project is that if it is made more interesting for people to donate then people are much more likely to make a contribution.

To better display this here is a video of the project in action

Also thanks to MWandel of woodgears.ca for his gear template generator and general articles on marble machines that made me pick this as a project

After i finish up with UNI preferences and scholarship applications i will hopefully have some more info up on what goes on behind the project

Edit: I now have another post up detailing some of the inner workings of the project HERE

Edit: If you are interested on more details on the construction of this project i have now made my portfolio available HERE.

20Sep/093

Stacker – Arduino

For the final week of the NCSS embedded programming challenge, we had the option of creating any program we wanted (to run on the ED1 board) to be entered into a competition. For my entry i decided to make an arduino version of stacker, see the video below.

I will add the source code after the competion

The game is quite simple to play (press either button to start/stop blocks and the board's reset button to restart), but gets ridiculously hard realy quickly, i am yet to get to the leds to the end.

I also failed to compleate any of the final weeks problems, besides this one becasue of being exhasted from shifting logs.

14Sep/090

Arduino and MSN

Since somebody asked i have written up how to get MSN and Arduino to communicate.

Firstly, i use Windows Live Messenger Plus (Go here to find out about it if you dont have it). MSN Plus allows you to download plug-ins for MSN, and it mean you can write your own, the scripts are written in a variant of Microsoft's JScript 5.6.

From there all i had to do was find out how to connect to a serial port useing JScript, i found you could open a serial port like a file like this

com = fso.OpenTextFile("COM7:9600,N,8,1",2);

However that only seemed to work if the serial port had been opened previously so i kind of cheated and just made a Python file that opens the serial port and then disconnects.

import serial
import time

ser = serial.Serial('COM7',9600)
time.sleep(2) ## wait for the arduino to do its software reset thing
ser.close()

Now that that the msn is able to connect to the Arduino is simple to write strings to it but don't forget to close it and don't forget that when you close the serial connection the Arduino resets.

com = fso.OpenTextFile("COM7:9600,N,8,1",2);
com.Write("Something");
com.Close();

I wont post the full code here for my script to turn on msn lights unless somebody particularly wants it as i don't think it is written very well

function OnEvent_Initialize(MessengerStart)
{
fso = new ActiveXObject("Scripting.FileSystemObject");

// run the python script that wakes up the serial port
oShell = new ActiveXObject("WScript.Shell");
var command = "\"C:\\Program Files\\Python25\\python.exe\" \"C:\\Program Files\\Messenger Plus! Live\\Scripts\\wallchart\\open.py\"";
Debug.Trace(oShell.Run( command,0,true)); // wait for it to finish

// Connect to the serial port make sure you wait at least 2 seconds before writeing to it
fso = new ActiveXObject("Scripting.FileSystemObject");
com = fso.OpenTextFile("COM7:9600,N,8,1",2);
}

function OnEvent_ContactSignIn(email)
{
// Say something about who logged in to the serial
com.Write(data);
}

function OnEvent_ContactSignOut(email)
{
// Say something about who logged out to the serial
com.Write(data);
}

function OnEvent_Uninitialize(MessengerStart)
{
// Close the serial port when messenger closes
com.Close()
Debug.Trace("Closed");
}

Well that's it and i hope i managed to explain how to get MSN and arduino to talk to each other, there are many more events that would could catch data from to send to the arduino i recommend for people to read though the MSN plus developers manual here

Also this method is slightly flawed in that it is one way, i will look into a way that can read and write data to the serial port without disconnecting and reconnecting.

Good luck

EDIT: Raymond found out that this method only works with single digit COM ports e.g. COM7 as opposed to COM15

7Jul/090

New Parts

I finaly got some new bits and pieces to mess around with, the parts i got where 2 stickduinos, these are just cut down versions of the arduino and about $15 cheaper and still function the same

I intend to use one of these in my MSN Wallchart and to use one to use in some mobile project

Parts 1

27Jun/092

Word Wipe V2

Here it is all i have done is switch from useing a bar graph to individual leds

Sorry about the blury photo focus was playing up

The setup

The setup

Ribbon of hearts

Ribbon of hearts

You can see the rather large pixel size it draws, each stripe it only 8 bit so thats the max resoultion i can have for now

Tagged as: , 2 Comments