Timeline for how to ignore a sensor being tripped the first time and start recording millis on the 2nd time it is tripped
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 22, 2020 at 15:32 | comment | added | Gerben |
Those millisecond values don't look odd to me, assuming the car is accelerating. I think you are calculating s/m not m/s . You should divide the distance (which I assume is 1m) by the number of seconds (which is 0.1574 and 0.557). Then you get an average of 0.64m/s in the first section. And an average of 1.8m/s in the second section.
|
|
Sep 21, 2020 at 18:28 | comment | added | chris | So for example I get a start milli of 27083 split of 28657 finish of 29214. when I do the math to get m/s it turns out to be 1.574 from start to the split and .557 from the split to the finish...... I am not sure if this is a problem with my code or if it is a problem with my math? | |
Sep 21, 2020 at 18:24 | comment | added | chris | So what is happening is if when testing it out (just using my hand to break the beams) if I do it quickly it seems like I get a good result. but if I put the finish sensor far away from the split it gives me after calculations a number on the 1st time that is WAY too high when it should be the opposite. | |
Sep 21, 2020 at 14:50 | comment | added | Gerben |
Are you sure it really messes up the timing of the next person? When you reset the start gates, you code sets start to the current time. But then you you actually start the next race, you code overwrites start with the correct value. As long as you reset the gate after the last sensor is triggers (which actually prints out the times), you're fine, as far as I can see.
|
|
Sep 21, 2020 at 7:58 | answer | added | Nick Gammon♦ | timeline score: 1 | |
Sep 21, 2020 at 7:51 | history | edited | chrisl | CC BY-SA 4.0 |
added 196 characters in body
|
Sep 21, 2020 at 7:41 | review | First posts | |||
Sep 21, 2020 at 17:03 | |||||
Sep 21, 2020 at 7:39 | history | asked | chris | CC BY-SA 4.0 |