$ 65 32 2.26757369614512E-05 0 5 50 Black 4096 3808 true 242 1152 1536 1152 1600 0 %2F%2F00.00.02b%20%0A%0A%0A%20%2F%2F%20Start%20buttons%0Aconst%20int%20buttonPin%20%3D%202%3B%20%20%20%20%20%2F%2F%20Forward%20button%20%0Aconst%20int%20buttonPin1%20%3D%204%3B%20%20%2F%2F%20Rev%20Motor%0A%2F%2F%20Motor%20controls%20%0Aconst%20int%20ledPin%20%3D%20%2013%3B%20%20%20%20%20%20%2F%2F%20Forward%20Motor%20%0Aconst%20int%20ledPin1%20%3D%20%2012%3B%20%20%20%20%2F%2F%20Rev%20Motor%0A%2F%2F%20variables%20will%20change%3A%0Aint%20buttonState%20%3D%200%3B%20%20%20%20%20%20%20%20%20%2F%2F%20variable%20for%20reading%20the%20pushbutton%20status%0Aint%20buttonState1%3D%200%3B%0Avoid%20setup%28%29%20%7B%0A%20%20%2F%2F%20initialize%20the%20Motor%20pin%20as%20an%20output%3A%0A%20%20pinMode%28ledPin%2C%20OUTPUT%29%3B%0A%20%20pinMode%28ledPin1%2C%20OUTPUT%29%3B%20%20%20%20%20%20%0A%20%20%2F%2F%20initialize%20the%20pushbutton%20pins%20as%20an%20inputs%0A%20%20pinMode%28buttonPin%2C%20INPUT%29%3B%0A%20%20pinMode%28buttonPin1%2C%20INPUT%29%3B%20%20%20%20%20%0A%7D%0A%0Avoid%20loop%28%29%7B%0A%20%20%2F%2F%20read%20the%20state%20of%20the%20pushbutton%20value%3A%0A%20%20buttonState%20%3D%20digitalRead%28buttonPin%29%3B%20%20%2F%2F%20Forward%20button%0A%20%20buttonState1%20%3D%20digitalRead%28buttonPin1%29%3B%20%20%2F%2F%20Rev%20button%0A%20%20%2F%2F%20check%20if%20Forward%20button%20pushed%0A%20%20%2F%2F%20if%20it%20is%2C%20the%20buttonState%20is%20HIGH%3A%0A%20%20if%20%28buttonState%20%3D%3D%20HIGH%29%20%7B%20%20%20%20%20%0A%20%20%20%20digitalWrite%28ledPin%2C%20HIGH%29%3B%20%20%20%2F%2F%20Forward%20ON%0A%20%20%7D%20%0A%20%20else%20%7B%0A%20%20%2F%2F%20Button%20not%20pushed%20%0A%20%20%20%20digitalWrite%28ledPin%2C%20LOW%29%3B%20%0A%7D%20%0A%20%20%20if%20%28buttonState1%20%3D%3D%20HIGH%29%20%0AdigitalWrite%28ledPin1%2C%20HIGH%29%3B%20%20%2F%2F%20Rev%20ON%20%0A%0A%20%20else%20%7B%0A%20%20%20%20%2F%2F%20turn%20Motor%20off%3A%0A%20%20%20%20%20digitalWrite%20%28ledPin1%2C%20LOW%29%3B%0A%20%20%7D%0A%7D R 928 1696 928 1632 0 0 1 5 0 0 0.5 g 960 1792 960 1856 0 s 992 1696 1056 1696 0 0 false > S1 w 928 1696 960 1696 0 g 896 2144 896 2208 0 w 896 2144 896 2112 0 w 1792 2112 1984 2112 0 r 1472 2048 1472 2112 0 10000 > R1 w 1376 2112 1472 2112 0 t 2208 1600 2272 1600 0 1 0 0 100 t 2464 1600 2400 1600 0 1 0 0 100 w 2272 1696 2272 1760 0 t 2208 1792 2272 1792 0 1 0 0 100 r 2208 1600 2144 1600 0 510 > R r 2208 1792 2144 1792 0 510 > R4 g 2336 1856 2336 1920 0 w 2336 1856 2336 1824 0 w 2336 1824 2272 1824 0 t 2464 1792 2400 1792 0 1 0 0 100 w 2336 1824 2400 1824 0 w 2400 1760 2400 1664 0 R 2336 1216 2336 1152 0 0 1 12 0 0 0.5 w 2400 1568 2336 1568 0 w 2336 1568 2272 1568 0 r 2528 1600 2464 1600 0 510 > R3 r 2528 1792 2464 1792 0 510 > R5 w 2624 1600 2624 1984 0 w 2528 1600 2624 1600 0 w 2144 1792 2144 1984 0 w 2144 1984 2624 1984 0 w 2144 1600 2112 1600 0 w 2560 2048 2560 1792 0 w 2112 1600 1792 1600 1 x 2080 2112 2112 2112 13 20 H-Bridges%20isolate%20the%20motor%20control%20signals%0Afrom%20the%20power%20driving%20the%20motor. I 1344 1600 1440 1600 0 2 5 > u2 I 1440 1600 1536 1600 0 2 5 > u3 w 1536 1600 1536 1792 0 w 1728 1952 1504 1952 0 w 1600 1792 1696 1792 0 w 1696 1792 1696 1760 0 w 1696 1760 2144 1760 1 w 2144 1760 2144 1792 0 r 1600 2048 1600 2112 0 233 w 1472 2112 1600 2112 0 162 1600 1792 1600 1856 1 2.1024259 1 0 0 > FORWARD w 1600 1856 1600 2048 0 w 1536 1792 1600 1792 0 I 1376 1440 1472 1440 0 2 5 > u I 1504 1440 1600 1440 0 2 5 > u1 w 1376 1888 1376 1856 0 w 1376 1856 1408 1856 0 r 1376 2048 1376 2112 0 10000 > R2 w 896 2112 1376 2112 0 r 1792 2048 1792 2112 0 233 > R6 w 1600 2112 1792 2112 0 162 1792 1792 1792 1856 1 2.17 1 0 0 > REV1 w 1792 1856 1792 2048 0 w 1792 1600 1792 1792 0 s 1088 1632 1152 1632 0 1 true w 960 1696 992 1696 0 w 960 1696 960 1632 0 w 960 1632 1088 1632 0 x 1120 1408 1152 1408 29 20 DC%20Motor%20Controller w 1376 1888 1376 2048 0 w 2272 1696 2784 1696 0 w 2272 1632 2272 1696 0 w 2400 1664 2400 1632 0 w 2400 1664 2592 1664 0 w 2592 1664 2592 1856 0 w 2592 1856 2784 1856 0 247 2784 1760 2784 1824 0 6 200 0.07 1.6 45 0.001 0.0001 > DC MOTOR w 2784 1824 2784 1856 1 w 2784 1760 2784 1696 1 w 1440 1888 1408 1888 0 w 1408 1888 1408 1856 0 172 1440 1920 1504 1920 0 1 false w 1504 1952 1504 1920 0 w 1472 2048 1472 2016 0 w 1472 2016 1440 2016 0 w 1440 2016 1440 1952 0 x 1408 1792 1440 1792 9 20 Frw%20%2F%20Rev x 1536 1888 1632 1888 25 16 REV x 1536 1984 1568 1984 9 20 FRW w 1344 1888 1376 1888 0 w 1344 1952 1440 1952 0 w 1344 1632 1376 1440 0 w 1152 1728 960 1728 0 w 960 1728 960 1792 0 w 1728 1952 1728 1312 0 w 1728 1312 1056 1312 0 w 1088 1696 1088 1760 0 w 1088 1760 1152 1760 0 w 1088 1696 1056 1696 0 w 1152 1696 1120 1696 0 w 1120 1696 1120 1664 0 w 1120 1664 1056 1664 0 w 1056 1664 1056 1312 0 w 2560 1792 2528 1792 0 w 2560 2048 2112 2048 0 w 2112 2048 2112 1600 0 w 2336 1440 2336 1568 0 159 2336 1216 2336 1280 0 20 1000000000000 > ps1 w 2336 1280 2336 1344 0 w 2304 1184 1728 1184 0 w 1728 1184 1728 1216 0 w 1728 1280 1728 1312 0 w 2304 1184 2304 1248 0 r 1728 1216 1728 1280 0 10000 w 2368 1440 2368 1344 0 w 2368 1344 2336 1344 0 w 2368 1440 2336 1440 0 w 1504 1440 1472 1440 0 w 1600 1440 1792 1440 0 w 1792 1440 1792 1600 0