The BLF runs (at the moment) in a PIC12F510 processor.
The Source code was written in XC8 and is still test code 21-5-16 – downloadable here.
The HEX can be obtained via an email to firstname.lastname@example.org
I program the processor using a PIC KIT V3, but any compatible PIC programmer should be fine.
I intend to try the 12F675 soon, please note the settings for this processor are untried at present.
The software runs around a loop running these routines in order.
Takes the inout from the two proximity sensors and applies debounce and a time domain shmitt function to get a clear Black/White signal for each
Turns on the correct motor, or motors depending on the Shmitted Eye information. Applyes a wait condition if both Eyes have been black for a number of seconds.
If wait has been applied Stop both motors and check for one or both Eyes to see White again.
Show the current status using the led cadence.
Apply a pulse to each motor in turn. (runs better than continuous)
Allows for the intensity of each motor to be varied
Useful routine to add in code for testing. Normally the call for this is commented out.
Later versions (20-5-16 onwards) have the ability to do automatic calibration if you are using the PIC12F675
Details of the calibration software routines will come later.