![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
投擲プログラム
Diff: main.cpp
- Revision:
- 4:e31648a823e2
- Parent:
- 3:d4caf19048aa
diff -r d4caf19048aa -r e31648a823e2 main.cpp --- a/main.cpp Mon Jan 15 06:37:42 2018 +0000 +++ b/main.cpp Mon Jan 15 11:21:10 2018 +0000 @@ -31,7 +31,7 @@ //led2=!led2; enc=rollen.getPulses(); pc.printf("%d\n",enc); - if(enc < 0){ + if(enc > 0){ led2 = 1; valve1 = 1; } @@ -39,7 +39,7 @@ led2 = 0; valve1 = 0; } - if(enc<enc_old){ + if(enc>enc_old){ led1 = 1; led3 = 0; }