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 BufferedSerial
Fork of FRDM_wahadlo_torsyjne by
Revision 14:93a9776b5dee, committed 2014-06-18
- Comitter:
- Pawel_13
- Date:
- Wed Jun 18 15:23:14 2014 +0000
- Parent:
- 13:8810ad3ccc04
- Child:
- 15:fa12498ab984
- Child:
- 18:97a08a408bc7
- Commit message:
- wzorcowanie
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Jun 14 13:42:17 2014 +0000
+++ b/main.cpp Wed Jun 18 15:23:14 2014 +0000
@@ -43,7 +43,7 @@
void task2() {
get_voltage_in(analog_IN_0, zero_analog_IN_0);
get_voltage_in(analog_IN_1, zero_analog_IN_1);
- pc.printf("%.3f\t%.3f\n", get_voltage_in(analog_IN_0, zero_analog_IN_0), get_voltage_in(analog_IN_1, zero_analog_IN_1));
+ pc.printf("%.8f\t%.3f\t%.3f\n", switch_dir_time, get_voltage_in(analog_IN_0, zero_analog_IN_0), get_voltage_in(analog_IN_1, zero_analog_IN_1));
}
int main() {
@@ -60,7 +60,7 @@
wait(switch_dir_time/2); // położenie zerowe silnika do ustalenia zer czujników
direction = !direction; // i uruchomienie silnika
- triger2.attach(&task2, 0.02);
+ triger2.attach(&task2, 3);
triger1.attach(&task1, switch_dir_time);
while (true) {
