Isi takes BOTduino to GeekUp in Leeds with Ben Dalton talking a little about it.
This Friday Ben Dalton, Paul Emery & I will be running an Arduino workshop at LeedsMet’s staff development week for staff across the University. The session titled “Future Craft” will include an introduction to Arduino along with discussion of the potential for the use of this type of technology across a range of academic disciplines.
A test in developing interfacing with computers using colour.
Hacked a few example patches together in max msp to make colour level control shape distortion
Today I’ve been learning a new piece of freeware named eMotion. It applies the laws of physics to particles, lines or next. I’ve also been looking at some other stuff, have a gander.
I’ve hacked a pong flash game to be controlled using two potentiometers going into the analogue inputs on the Arduino board. The set up was just a test in combining different technologies but one use for it is that it could allow for multiple responsive controllers on internet flash applications and games.
Here’s a Video.
The main challenge of getting this to work was translating the jittery signal from the Arduino into a smooth and fluid movement in flash.
I separated the values from the different controllers by adding 257 to the second input in Arduino. Then once id identified the different feeds in flash I gave the second value a different name and subtracted the 257 back off again.
I achieved the smooth and fluid movement by using action script to store the incoming signals into 2 arrays and creating an average of each array which id use as the value to control the behavior of objects in flash.
Here’s a section of the AS2 code I wrote that did this (for just one of the values)
// fills array for value1
function loop1() {
// need to store data valuese.g. store[arrayPointer] = data
arrayPointer = (arrayPointer+1);// adds 1 to arrayPointer each loop
//trace(arrayPointer);
_root.createAvg();
_root.divideAvg();
// if arrayPointer is a number the same as or greater than the length of the array
if (arrayPointer>=dataArray.length) {
arrayPointer = 0;// resets arrayPointer back to 0
}
}
// gets average value from array and makes the var avg equal to it.
function createAvg() {
for (var i:Number = 0; i<dataArray.length; i++) {
//trace(dataArray[i]);
avg = avg+(dataArray[i]);
}
}
// divides the average by the length of the array and outputs it
function divideAvg() {
avg = Math.round(avg/dataArray.length);
_root.mc_square2._xscale = (avg);
// make paddles = new averaged values
_root.p._y= (avg);
}
Another main problem I found was flash didn’t seem to treat the incoming xml socket data as an integer so to get it as a value I could use in my equation I linked the scale of an invisible movie clip on stage to the value of data and then used this movie clips properties in my calculations.
I’ve managed to make a patch that will mix a live web cam feed from anywhere with the movie file of your choice or a live camera feed. For some reason it gets confused when you use two web cam feeds from the internet. The phidget slide potentiometer could be used to slide between files but I didn’t get it set up for this test.
Finally tweaked the head tracking patch so its fairly stable and thoroughly usable now. The weak link in the system turned out to be the IR bulbs which weren’t bright enough and were powered by some weakened batteries. A quick trip to maplin provided me with some 5mm high powered leds, this combined with a much needed change of batteries and the whole system is now much much more stable, if not that aesthetically pleasing quite yet….
Hello, this is serious sports info. The tilt switches, when turned on, bring up an rss feed about certain sports from the bbc website. Football rugby cricket etc. I wanted to use physical objects which represent the sport in question but the principal is there.
This is a blog to accompany a 2 week Leeds Met Uni student project to explore how electronics kits and widgets can be used in non-technically focused education.