Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed filesystem TextLCD
Fork of Projeto_Mecatronico by
posicionamento.h@8:80c72f7ee7da, 2022-05-03 (annotated)
- Committer:
- fernandosakabe
- Date:
- Tue May 03 15:01:31 2022 +0000
- Revision:
- 8:80c72f7ee7da
- Child:
- 13:e1de9d8d635c
sub rotina posicionamento em processo
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| fernandosakabe | 8:80c72f7ee7da | 1 | #include "mbed.h" |
| fernandosakabe | 8:80c72f7ee7da | 2 | #include "movimento.h" |
| fernandosakabe | 8:80c72f7ee7da | 3 | #include "mover.h" |
| fernandosakabe | 8:80c72f7ee7da | 4 | void posicionamento () |
| fernandosakabe | 8:80c72f7ee7da | 5 | { |
| fernandosakabe | 8:80c72f7ee7da | 6 | lcd.printf("Confirmar o posicionamento XY?") |
| fernandosakabe | 8:80c72f7ee7da | 7 | |
| fernandosakabe | 8:80c72f7ee7da | 8 | while(button_enter == 0) { |
| fernandosakabe | 8:80c72f7ee7da | 9 | x = xAxis.read() * 1000; |
| fernandosakabe | 8:80c72f7ee7da | 10 | y = 1000 - yAxis.read() * 1000; |
| fernandosakabe | 8:80c72f7ee7da | 11 | if(x > 600) { |
| fernandosakabe | 8:80c72f7ee7da | 12 | x_mais() |
| fernandosakabe | 8:80c72f7ee7da | 13 | } |
| fernandosakabe | 8:80c72f7ee7da | 14 | if(x<400) { |
| fernandosakabe | 8:80c72f7ee7da | 15 | x_menos () |
| fernandosakabe | 8:80c72f7ee7da | 16 | } |
| fernandosakabe | 8:80c72f7ee7da | 17 | |
| fernandosakabe | 8:80c72f7ee7da | 18 | if (y>600) { |
| fernandosakabe | 8:80c72f7ee7da | 19 | y_mais() |
| fernandosakabe | 8:80c72f7ee7da | 20 | } |
| fernandosakabe | 8:80c72f7ee7da | 21 | if (y>600) { |
| fernandosakabe | 8:80c72f7ee7da | 22 | y_menos() |
| fernandosakabe | 8:80c72f7ee7da | 23 | } |
| fernandosakabe | 8:80c72f7ee7da | 24 | |
| fernandosakabe | 8:80c72f7ee7da | 25 | |
| fernandosakabe | 8:80c72f7ee7da | 26 | |
| fernandosakabe | 8:80c72f7ee7da | 27 | |
| fernandosakabe | 8:80c72f7ee7da | 28 | |
| fernandosakabe | 8:80c72f7ee7da | 29 | } |
| fernandosakabe | 8:80c72f7ee7da | 30 | |
| fernandosakabe | 8:80c72f7ee7da | 31 | } |
