This has given me the chance to become more familiar with the programme in the build up to creating the stage of processes that will inevitably bring functionality to the interactive side of my installation.
I was provided with an Arduino experimentation kit by one of my tutors early on in the module once we had discussed ideas of how I was expecting the interactive element to engage with users.
Every now and a again I would sit down with my Mac and the Arduino kit whenever I had some time to spare and just experiment with all the different functions and components.
Inside the kit you are provided with an experimenter's guide which gives you a tone of examples to try out, ranging from simple things such as flashing LED lights or spinning motors to relays and temperature sensitive triggers.
If you go to http://arduino.cc/en/Main/Software you can download all the software you will need to connect the Arduino circuit board to your computer. In this software package all the codes for the examples are already set up meaning that you don't have to worry about writing them. The only thing you have to do is make sure the board is set up correctly, and there are diagrams and instructions to help guide you, which makes the process relatively simple.
I was dreading this part of my project as I am not the best at writing codes or getting things like this to work the way that I intend for them to do so. Surprisingly though I found it a very enjoyable and less complex stage.
After spending so much time practising with the examples I found myself beginning to have an understanding the coding. I could then see how I could then begin to alter some of the previous codes I had come into contact with to then make the components I intended to use work the way I wanted them to.
Here is the circuit board I am going to use as the engaging factor of my project. It containts a 10mm LED light and a photo resistor which reacts to the amount of light that it is recieving.
Also I have to purchase a red 10mm LED light as I only have blue ones at the moment and I want the LED to be inside the clear cast that I have created of a heart. Obviously I want everything to tie in together so a red light is the most suitable to use.
The LED light will constantly flash on it's own, having no connection with the photo resistor. I attempt to make the flash a ressmeblance of a heart beat. This light will be 1 of if not the only the source of light that will be featured in my room, and will act as tool to draw the user into the key place where the interaction takes place.
The photo resistor will also be encased in the organ cast but will be visible and touchable on the exterior of the cast. It will be set to trigger off the Isadora to play the visuals when a certain value has been reached depending on when the user touches it, permitting light from being seen by the surface of the photo resistor.
Getting Arduino and Isadora to work together was my biggest task during this stage of the project. Having no idea how to get the two to cooperate with each other I scoured the Internet for relative information that could help me.
Unfortunately not many people have written about using the two together, but I did come across this one blog that offered me the key information that I needed for my Arduino to work. It is very poorly written because the person who's blog it features on is Swedish so their English isn't entirely great, but you get the gist of what they are saying after a few reads and some guess work.
On their blog I found a piece of code that proved valuable to me, as it would ensure that the photo resistor would interact with Isadora. The way that they have written the code is so that any type of sensor will work with Isadora depending on whether or not the USB serial port is receiving information and of course if the Isadora serial ports are all set up properly.
Once I had constructed my code all I needed to do was make sure it was working properly by simply checking the USB serial port information that can be located through the tabs at the top of the Arduino software.
Below is a screen shot of the values that the photo resistor is sending out depending on how much light it was receiving. As you can see it was a constant state for the time I wasn't touching it but then each time I placed my finger on it, the values would increase.
This meant that the structure of my code was a success and it was all ready to act as a trigger for the visuals for when users come into contact with it.
My next job was structuring an Isadora stage that would allow the photo resistor to act as a trigger within the software.
Once I had constructed my code all I needed to do was make sure it was working properly by simply checking the USB serial port information that can be located through the tabs at the top of the Arduino software.
Below is a screen shot of the values that the photo resistor is sending out depending on how much light it was receiving. As you can see it was a constant state for the time I wasn't touching it but then each time I placed my finger on it, the values would increase.
This meant that the structure of my code was a success and it was all ready to act as a trigger for the visuals for when users come into contact with it.
My next job was structuring an Isadora stage that would allow the photo resistor to act as a trigger within the software.
Below is the code I constructed for the LED to have a double beat that closely reassembles a state of a heart beat, and for the photo resistor to trigger the Isadora to play once a person has come into contact with it.
The Arduino Code
int val; //Declare variables. any words are fine.
int ana = 0; // Value must be same as a number of the analog pinint led = 13;
void setup()
{
Serial.begin(9600); //Setup serial speed (it is important in a later
step)
// initialize the digital
pin as an output.pinMode(led, OUTPUT);
}
void loop()
{
val = analogRead(ana); //get data from analog
Serial.print(1,DEC); // discuss in laterSerial.print(val); //Send a value to computer.
Serial.println(); //Send a value to eom
delay(500); // Regulate a frequency of connection.
digitalWrite(led,
HIGH); // turn the LED on (HIGH is the
voltage level)
delay(130); // wait for a seconddigitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(180); // wait for a second
digitalWrite(led,
HIGH); // turn the LED on (HIGH is the
voltage level)
delay(130); // wait for a seconddigitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(170); // wait for a second
Isadora
With having used Isadora previously over the past couple of months in other modules, and from watching the only set of tutorials that are featured on Youtube I found most of my stage easy to set up.
The idea was to have a constant black screen being projected on the wall at all times. Once a user has touched the photo resistor it would trigger Isadora to play 7 random clips and then loop back to the constant black screen, waiting for the user to engage with it again.
I used a serial port watcher to monitor the value of light that was being radiated onto the photo resistor. Also it acted as a tool for telling me how much light was in the room. This then helps me to figure out what value I would need to set the Isadora to for it to work coherently with the photo resistor.
Using a value watcher that was connected to the serial port watcher I could then type in a certain value that had to be reached before it would trigger the videos to play. This stops the trigger from constantly going off and activating the videos.
The challenge that proved most difficult was getting the videos to loop back to a constant black screen. I was able to get the videos to play once someone had come into contact with the photo resistor, but the videos would just continuously loop, showing no sign of going back to the start.
It was becoming an infuriating task.
After consulting with one of my tutors we figured a way around the problem that was more complex than we though. Through a range of loops and gateways I was able to construct a pathway that enables the videos to play randomly once they had been generated and then eventually loop back the black screen.
The loops and gateways act as a way of catching the looping videos after a certain period of time and then closing gates that restrict the videos from continuously playing. This eventually resets itself to a constant state and takes you back to the starting point.
I will be posting a demonstration video on here at a later date that shows you how it all exactly works and hopefully it will give you a better understanding of what I have tried to explain.


































.jpg)













