This project times and graphs the speed of a fidget spinner as it slows down. Deceleration is the inverse of acceleration!
Place the FunKey Super in LightGate Mode (A/I, W/ground, sensor on G)
-set the FunKey Super into Keystream Mode by connecting the A and I ports and plugging in the USB. Keystream is now the current mode, remove the alligator clip. Keystroke Mode LED will be bright, and I/O Mode LED will be dim
--connect a yellow IR reflection sensor to port G (D0) Other sensors can be used, but this one is ideal for timing moving objects
--connect an alligator clip between port W (D5) and any of the ground holes at the bottom of the board. This acts as an on/off switch, turning the timing internal circuit on when connected. Leave it connected for your measurements. The I/O Mode LED goes off in this mode, while the Keystroke Mode LED stays on and bright
How it works in Scratch: The LightGate Mode is sending back number strings terminated by a "return". Scratch is not well equipped to receive text input, except through its "answer" function. The code employs this to trap the continuous readings, draw them on the screen as a plot, and plush them onto a Scratch "list", which is an array. You can also use the Scratch "list" box to export your data to Excel or Sheets as a .csv file. Note that the code has a threshold to accept only data which is in the correct range, because some errant readings can occur.