Research project by Rebecca Jordan, advised by Alex Morrow at Olin College of Engineering, and funded by a Clare Boothe Luce Fellowship.
This is an extension of Alex Morrow's Universal Sailing Project, aiming to provide blind sailors with all the information their sighted counterparts have access to while racing. The project detects sail luffing using flex sensors mounted on the jib of a Rhodes 19 or similar boat.
The Python3 code is meant to run on a Raspberry Pi. Run flex_testing.py
on startup. Wiring information for LEDs and sensors is given in the UTS-16 Google Drive documentation. The objects are in flex_sensor.py
, and a quick test that outputs readings to the command line for verifying sensors are working is in test.py
.
When the status LED (white) is on, the system is ready to record. Press the button. The status LED will blink every half-second for five seconds, then every quarter-second for two minutes. During the two minutes, the sensor readings will be recorded every quarter-second to a CSV file in the folder LuffRecords
(don't move or rename that folder) with a timestamp filename. The red and blue/green LEDs can indicate which tack the boat is on and whether it's luffing (as soon as you implement that method in flex_sensor.py
) When the status LED turns solid again, the system can make another recording. The number of sequential recordings is not limited in the code. The Pi must be shut down properly (ie with 'shutdown' command) for the CSV files to save. I recommend a shutdown button/connection when testing headless on a boat.
After recording, CSV records in the LuffRecords folder can be plotted using the Matlab script in plotter.m
or algorithmplotter.m
, which must be in the same directory as the file. algorithmplotter.m
contains the luff-detecting algorithm and plots show luffing was detected. These produce PNG files of the same name as the CSV.