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: ADXL345_I2C QEI SDFileSystem mbed
Diff: main.cpp
- Revision:
- 3:de6579180af2
- Parent:
- 2:49d3b3eebc2e
- Child:
- 4:1ec5063fb20e
--- a/main.cpp Tue Feb 07 18:55:27 2017 +0000
+++ b/main.cpp Tue Feb 07 19:06:35 2017 +0000
@@ -104,7 +104,7 @@
t.start();
- while(t.read() <= 0.50) {
+ while(t.read() <= 0.51) {
// debug.printf("loop sensorB\n");
if(flag) {
flag = 0;
@@ -283,11 +283,12 @@
*F = 0.35 * F_1 + 0.4 * F_2 + 0.25 * F_3;
*acce_output = *F / 8.5;
*duty_output = *acce_output / 118 + *duty_output;
- if(*duty_output > 0.65) {
- *duty_output = 0.65;
+ if(*duty_output > 1.0) {
+ *duty_output = 1.0;
myled4 = 1;
}
- duty.write(*duty_output);
+// duty.write(*duty_output);
+ duty.write(1.00);
F_3 = F_2;
F_2 = *F;
// debug.printf("%i,%f,%f\n", (int16_t)readings[0],*v,*duty_output);