Page 61 - MDP2020-1
P. 61
················································································ 명장양성프로젝트 【MDP】 과제발표회 자료집 Ⅰ | 55
i = 0;
while(i < arrayMax)
{
digitalWrite(13, HIGH);
i += 1;
Serial.print(joint3[i]); Serial.print(", ");
}
Serial.println("Joint3");
}
void Button()
{
if (digitalRead(6) == false)
{
delay(20);
if (digitalRead(6) == true)
{
if (Taster == 0)
{
Taster = 1;
previousMillis3 = currentMillis;
}
else if ((Taster == 1) && (currentMillis - previousMillis3 < 250))
{
Taster = 2;
}
}
}
if ((Taster == 1) && (currentMillis - previousMillis3 > 1000))
{
if(!playmode) {
arrayStep += 1;
arrayMax = arrayStep;
record();
Taster = 0;
playmode = false;
Serial.print("Record Step: "); Serial.println(arrayStep);
digitalWrite(13, HIGH);
delay(100);
digitalWrite(13, LOW);