Introduction: Chopsticks Practice Gritty

For elders mitt rehabilitation, an interesting game would raise effectiveness finished interacting with both muscles and wi. According to Physiopedia, elders above the ages of 50 would have chances of suffering from deteriorating give movement. So, by training the muscles and nervousness of our hands, such symptoms could be ameliorated. Combining fun games with therapy could gain the human relationship betwixt families and also improve material health.


YouTube link: https://youtu.be/S2dYeGXSJZU

Supplies

1. resistance*9

2. solderless breadboard*2

3. Arduino Leonardo*2

4. led get off medulla oblongata (yellow*2 wild blue yonder*1 red*1 green*1 PWM*1)

5. cable*31

6. tape

7. photoresistor*3

8. wooden sticks*12

9. cartons*2

10. detector*1

11. Ping-Pong ball*1

12. few cardboards

13. tools for newspaper clipping

14. USB-B

Step 1: Put to sleep All the Components in Place

1.Educate all the supplies

2.Put them in place A the image above

Step 2: Type the Computer Programs

1.emptiness setup(){ // put your setup write in code here, to run for erstwhile:

Serial.begin(9600); // opens successive port, sets data rate to 9600 bps pinMode( 9 , OUTPUT); // sets the extremity pin A yield pinMode( 6 , OUTPUT); // sets the integer pin as output pinMode( 7 , Yield); // sets the digital stick as output pinMode( 2 , End product); // sets the digital pin as output signal pinMode( 4 , OUTPUT); // sets the digital trap as output pinMode( 12 , OUTPUT); // sets the digital pin as output _color = random( 0 , 3 ) ;

}

void iteration(){ // put your main code here, to run repeatedly: Serial.print(_color); //print message Serial.print(" "); //impress a dummy Serial.println(); if ( _color == 0 ) { digitalWrite( 9 , HIGH ); // sets the digital pin on/murder a(); } if ( _color == 1 ) { digitalWrite( 6 , HIGH ); // sets the digital PIN number on/dispatch b(); } if ( _color == 2 ) { digitalWrite( 7 , HIGH ); // sets the digital pin happening/off c(); } }

avoid b() { //customised function if ( analogRead( A5 ) < 555 ) { digitalWrite( 2 , HIGH ); // sets the digital pivot on/off delay( 1000 ); // waits a few milliseconds digitalWrite( 6 , LOW ); // sets the digital pin happening/off _color = random( 0 , 3 ) ; } else { digitalWrite( 2 , LOW ); // sets the whole number pin on/off digitalWrite( 4 , LOW ); // sets the member pin on/slay digitalWrite( 9 , Moo ); // sets the digital pin on/dispatch digitalWrite( 12 , LOW ); // sets the digital pin on/off } }

void c() { //customised function if ( analogRead( A4 ) < 555 ) { digitalWrite( 4 , Shrilling ); // sets the digital pin happening/forth delay( 1000 ); // waits a couple of milliseconds digitalWrite( 7 , First ); // sets the appendage pin on/off _color = random( 0 , 3 ) ; } else { digitalWrite( 2 , LOW ); // sets the digital PIN on/off digitalWrite( 4 , First ); // sets the whole number immobilize on/hit digitalWrite( 7 , LOW ); // sets the extremity pin along/unsatisfactory digitalWrite( 12 , LOW ); // sets the digital pin connected/off } }

void a() { //customised role if ( analogRead( A0 ) < 555 ) { digitalWrite( 12 , HIGH ); // sets the whole number pin on/off detain( 1000 ); // waits a few milliseconds digitalWrite( 9 , LOW ); // sets the digital pin on/off _color = random( 0 , 3 ) ; } other { digitalWrite( 2 , LOW ); // sets the digital pin on/cancelled digitalWrite( 4 , Squat ); // sets the digital pin on/cancelled digitalWrite( 6 , Degraded ); // sets the digital pin on/off digitalWrite( 12 , LOW ); // sets the digital personal identification number on/cancelled } }

void s() { //tailor-made function if ( analogRead( A4 ) < 555 ) { digitalWrite( 4 , Malodorous ); // sets the digital pin on/off hold( 1000 ); // waits a few milliseconds _color = random( 0 , 3 ) ; } else { digitalWrite( 4 , LOW ); // sets the appendage pin on/off digitalWrite( 12 , LOW ); // sets the member pin on/off digitalWrite( 2 , Down in the mouth ); // sets the digital pin on/off digitalWrite( 7 , LOW ); // sets the whole number pin on/off } }

2.int UltrasonicSensorCM(int trigPin, int echoPin) //Ultrasonic Sensor Code Auto Generated Refund Centimetre max distance 200

{ long length; pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(20); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); length = duration / 59; if ((duration < 2) || (duration > 200)) return false; return length; }

void setup(){ // put your setup code here, to track down once: digitalWrite( 6 , LOW ); //set ultrasonic sensor trigPin

pinMode( 11 , OUTPUT); // sets the digital pin as output pinMode( 13 , OUTPUT); // sets the member pin A output }

void loop(){ // put your main code here, to run repeatedly: if ( UltrasonicSensorCM( 6 , 7 ) < 2 ) { digitalWrite( 11 , HIGH ); // sets the digital PIN number connected/off delay( 10 ); // waits a few milliseconds digitalWrite( 13 , HIGH ); // sets the digital pin on/slay } else { digitalWrite( 11 , LOW ); // sets the whole number pin on/off digitalWrite( 13 , Downhearted ); // sets the digital pin on/off } }

Measure 3: Set Up the Gamy

1. Gashed necessary holes

2. lay the wooden sticks in situ

3. REMEMBER to pass wate holes for the USB-B transfer line to go snuff it

Mistreat 4: Beautify the Show and Come out the Game!

Be the First to Share

Recommendations

  • Anything Goes Contest 2022

    Anything Goes Contest 2022