$ 1 32 2.26757369614512E-05 0 5 50 White 4064 4224 true 242 672 288 672 352 0 %2F%2F%2000.00.02%0A%0A%20%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%0Aconst%20int%20ledPin%20%3D%20%2013%3B%20%20%20%20%20%20%2F%2F%20Forward%20Motor%20on%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%2CINPUT%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%0A%20%20buttonState1%20%3D%20digitalRead%28buttonPin1%29%3B%0A%20%20%2F%2F%20check%20if%20the%20pushbutton%20is%20pressed.%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%20%2F%2F%20turn%20Motor%20on%3A%20%20%20%20%0A%20%20%20%20digitalWrite%28ledPin%2C%20HIGH%29%3B%20%20%0A%20%20%20%20%20if%20%28buttonState1%20%3D%3D%20HIGH%29%20%0A%20%20%20%20%20%20digitalWrite%28ledPin1%2C%20HIGH%29%3B%0A%20%20%7D%20%0A%20%20else%20%7B%0A%20%20%20%20%2F%2F%20turn%20Motor%20off%3A%0A%20%20%20%20digitalWrite%28ledPin%2C%20LOW%29%3B%20%0A%20%20%20%20%20digitalWrite%20%28ledPin1%2C%20LOW%29%3B%0A%20%20%7D%0A%7D > CPU g 352 480 352 544 0 R 416 448 416 384 0 0 1 5 0 0 0.5 w 352 480 672 480 0 g 832 928 832 992 0 r 1024 832 1024 928 0 10000 > R1 w 1024 928 1312 928 0 w 928 928 832 928 0 w 1024 832 1024 640 0 w 864 640 1024 640 0 r 928 864 928 928 0 10000 > R w 1024 928 928 928 0 w 928 864 928 704 0 w 928 704 864 704 0 s 1184 704 1248 704 0 1 false > FRW1 w 928 704 1184 704 0 s 1088 640 1152 640 0 1 false > Rev1 w 1088 640 1024 640 0 R 1280 256 1280 192 0 0 1 5 0 0 0.5 w 1280 256 1280 640 0 w 1280 704 1248 704 0 w 1280 640 1280 704 0 w 1152 640 1280 640 0 247 1760 384 1760 448 0 6 200 0.07 1.6 45 0.001 0.0001 > M t 1632 320 1696 320 0 1 0 0 100 > Q t 1888 320 1824 320 0 1 0 0 100 > Q1 w 1760 384 1696 384 0 t 1632 512 1696 512 0 1 0 0 100 > Q2 w 1696 384 1696 480 0 r 1632 320 1568 320 0 510 > R2 r 1632 512 1568 512 0 510 > R4 g 1760 576 1760 640 0 w 1760 576 1760 544 0 w 1760 544 1696 544 0 t 1888 512 1824 512 0 1 0 0 100 > Q3 w 1760 544 1824 544 0 w 1760 448 1824 448 0 w 1824 480 1824 448 0 w 1824 448 1824 352 0 R 1760 256 1760 192 0 0 1 6 0 0 0.5 w 1824 288 1760 288 0 w 1760 256 1760 288 1 r 1952 320 1888 320 0 510 > R3 r 1952 512 1888 512 0 510 > R5 w 2048 320 2048 704 0 w 1952 320 2048 320 0 w 1568 512 1568 704 0 w 1568 704 2048 704 0 w 1568 512 1344 512 1 > Frw w 1568 320 1536 320 0 w 1984 736 1984 512 0 w 1984 512 1952 512 0 w 1536 320 1408 320 1 > Rev w 1536 320 1536 736 0 w 1536 736 1984 736 0 x 1408 96 1440 96 8 20 H-Bridges%20isolate%20the%20motor%20control%20signals%0Afrom%20the%20power%20driving%20the%20motor. I 960 320 1056 320 0 2 5 > u I 1056 320 1152 320 0 2 5 > u1 I 960 416 1056 416 0 2 5 > u2 I 1056 416 1152 416 0 2 5 > u3 w 1344 512 1344 320 0 w 1344 320 1152 320 0 w 1408 320 1408 416 0 w 1408 416 1152 416 0 w 960 416 928 416 0 w 928 416 928 352 0 w 928 352 864 352 0 w 864 384 896 384 0 w 896 384 896 320 0 w 896 320 960 320 0 s 480 576 544 576 0 0 false > S1 w 480 576 416 576 0 w 416 576 416 448 0 w 544 576 576 576 0 w 576 576 576 512 0 w 576 512 672 512 0 w 1696 352 1696 384 0 w 1696 288 1760 288 0