Kinetic Landscape is an implementation of arduino script and robotics into an alternating play space that can increase the quality of playground space in dense urban environments. A series of modules are arranged like a grid pattern with stacked Piezoelectric sensors that would create a looped motion where modules rise and descend in order to alter the play field. A mesh is applied to the field and fastened to each module, so there is a climbable landscape to explore. Through the model creation however, due to time and money we simulated the idea of touching the modules to make them move by modifying a photocell sensor to only respond when there is no light detected.
#include <Servo.h>
int avrage;
int val;//Variable determining the servo movement
Servo myServo;
int pos = 0; // variable to store the servo position
int pos1 = myServo.read();
void setup()
{
Serial.begin(9600);//Begining Serial Connection
pinMode(13,OUTPUT);//Servo White wire connection
for (int i=0; i<20; i++){
avrage=avrage+analogRead(0);
myServo.attach(13);
}
avrage=avrage/20;
Serial.println("System Ready");
Serial.println(avrage);
}
void loop(){
int in = analogRead(0); // Reading Sensed data from Arduino
if (in<avrage/2){
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myServo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myServo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
else myServo.write(pos1); { // find its current coordinates and stays static
}
}