UKM8 Notes
6/4/2022:
Program "main 6th April 2022.py" received.
This is WKS9z.py but with extras: It's suitable for running Drag races:
1) speed = 60 , mult = 0.4 , dfactor = 8
2) reads stop sensor, and prints it in pre-run loop before button pressed:
fred = stopsense.read_u16() [ which gives value 45,000 - 61,000 uncalibrated]
3) Keeps loopcount in main (running) loop
4) Reads stop sensor in running loop, and stops if loopcount >200 ( 1 second) and fred < 56000:
if(loopcount>200 and fred<56000): #stop
speed = 0
5) loop delay = 5 ms
It could usefully be extended to await the stop sensor going from white to black to start the race.
Make a free website with Yola