Code: Select all
while not self.asleep(): sheep += 1
if you already have the bridge set up so it closes a circuit with a relay when the car goes through, that should be dead simple to connect to the RPi's GPIO's for timing. Connect one lead on the relay to the RPi's 3V3 pin, and the other to a GPIO. A couple lines of Python to set up the GPIO pin for input and to read it, and you're golden.speedyroadster wrote:Thank you BlackJack.
This a timing bridge I made which uses a 741chip to compare to LDRs (situated opposite to the bright LEDs) which then switches via a reed relay the contacts of the remnants of an old pc keyboard housed in the red box. This is then fed into a pc via usb and the computer thinks a key has been pressed. I wrote a program using Basic 256 to run the timer but I would like to get away from taking apart keyboards and use a Pi and Python and the GPIO pins.
I shall investigate the 'Pygame' and 'Curses' and see how I get on.
Would be better still to remove the errors in the code responsible for such poor timings.Wibbes wrote:well you could use your pi as a front end display for ure timer , ardunios dont have hdmi (atleast not cheap)
maybe a serial link between an arduino doing the real time stuff and the pi doing the display , positions and less time stuff
Users browsing this forum: No registered users and 5 guests