Hi all,
I recently got into learning the Arduino and I came across this video and thought of re-creating it.
The only program is I have is that the video only displays the void loop part of the code but not the void setup so I really have no idea what the setup is supposed to be?
I wonder if some of you experienced folks could help me out with this! He doesn't have the schematics up either so I don't really quite know what to patch and where to patch.
I think I have all the parts required to do this project so I really hope to get this going! I have a RC motor and a potentiometer!
This is the code posted in the video that I copied :
*/
}
void loop()
{
//int BEATS = 10
// int theBeat[] = {-1, 1, 1,-1};
//int theBEAT[] = { -2, -2, 2, -1, 1, -1, 1, -2, 4 };
int i;
int sensorpin = 0;
int sensorValue = analogRead(sensorpin);
int extension = 45;
//int maxSensorValue = 1023;
int Maxwait = 1025;
Serial.printIn(sensorValue);
int millis = maxWait - sensorValue;
for (i=0; i<4; i++){
sensorValue = analogRead (potpin);
millis = maxWait - sensorValue;
hit(millis*theBeat[i]);
}
}
Please HELP!! Thanks fellas!