Showing posts with label Practical. Show all posts
Showing posts with label Practical. Show all posts

Monday, 27 February 2012

PRESENTATION MOVIE REVISED



It's just been edited to fit the music better, cut snappier and look better.

Thursday, 9 February 2012

THE CODING


This connects Processing with the Arduino Duemilanove board (which is attached to the pressure pads via Digital pins). It also loads the Red Man graphic which has been saved in the corresponding "data" folder as a png file.


a, b, c and d refer to the vertical levels from top to bottom, indicating each of the four levels at which a shot can be fired.


Finally, this is the code for the firing of the shots, repeated for each of the afore mentioned a, b, c and d. It states the bullet to be a rectangle of size 50 x 20 px. It states the background be black (fill 255). The rest breaks down the animation process as the pressure pad is activated. Quite complicated but I think I understand most of it.

(Note: I also need the Arduino programme running simultaneously in order to recognise my board output.)

Here's my take of it. This helped me get my head around it.

Wednesday, 8 February 2012

Tuesday, 7 February 2012

TESTING THE WIRES


In order to see if the pressure pads actually work or not, this is a handy little test. Just to make sure there is indeed electrical stuff going on when the pads are pressed.

We use this device by touching the ends of the black and red to the ends of my two wires attached to each pad. A working pad causes the a number to show on screen, together with a resounding beep noise to confirm.

Test result - all four are good to go.

PRESSURE PAD + ARDUINO


It's still Tuesday. With four real-size pressure pads completed, I next had to wire them up to the Arduino. The above image connects one digital component to the Arduino, passing through the resistor and into a digital pin on the board. I need four of these.

...like this.


That's pressure pads into Digital pins 2, 3, 4, 5 (yellow).
And the breadboard itself into the Power pins 5V (red) and Gnd (white).
Yeahhhh.

MAKING THE PRESSURE PAD. FOR REAL.


First thing was to get MDF boards ready. I used cardboard for the mock, but since I need to step on the pads, MDF would be more stable and suitable. So I went down to the workshop and we cut 8 pieces of 30x30cm boards using 3mm thick wood.


Following the same method as the mock, aluminium foil was laid onto the boards top and bottom, elastic bands and polystyrene too. Then, I attached two wires onto each pad (one on each board) for connecting to the Arduino. Black and blue were the colours of my choice. And what.

Monday, 6 February 2012

MAKING A PRESSURE PAD.. ALMOST.



If you've got eight minutes to spare...
Do watch it in full if you are going to watch it at all.

(Here's the link I refer to again: http://www.cs.cmu.edu/~RAS/Docs/space/pads.html)

Thursday, 19 January 2012

HOOKING UP THE LDR AND LED


Now that the LDR is set up and ready to go, with the Sensor Monitor reading the resistance for us, we're now connecting the LED light to the board and see if we can get it to fade brightness depending on the LDR.

The LED has been put into the Ground pin and 11. Pins 9, 10 and 11 are PWM - pulse width modulation, which enables us to use the fade function. I think.


So it's pinMode (11, OUTPUT) because we want the output for Pin 11. And it's analogWrite because fading requires analogue function and the 'write' bit allows for PWM. We divide 'val' (which is the LDR running at 1024) so the LED is more or less sensitive. Dividing by 4 gives the LED 256.

End result is: less light dims LED down, more light brightens LED. Very cool.

SETTING UP AN LDR



Here's the circuit we just built, with a light dependent resistor.

It's been attached to Analogue Pin 0. (Analogue because light isn't a straight 0 or 1, but it has dark, bright and everything in between.) This is the Arduino code so that we can read the resistance depending on light available.


Cool.

Tuesday, 17 January 2012

ARDUINO DUEMILANOVE

Just in our first class. What the fuck is Arduino...

It's a little circuit board that can have components added and can be controlled by a computer. The software uses Java script to programme serial coding, in order to communicate with the board. Or something.

This is the concept we're being asked to use for our third project. It allows for us to collect data, its recording and analysing. The sensor we add to the Arduino board can pick up the data, the Arduino software can then communicate this date to us, the user, and the software can then communicate back to the board what to do with the data, and then the component on the board can do what we want it to do. Easy. And as it's an open source software, it means anyone can upload, download, edit, re-upload, thus share data. So really, I reckon our task is to see just how powerful this potential collaboration could be in changing our world (or something similar to a smaller scale).

This is the board I'll be using here, Arduino Duemilanove, one of the several types of Arduino board. Tiny little thing, made up of pins and other tech stuff, which I'm sure we'll learn more on soon.