aws-solutions-library-samples / guidance-for-aws-deepracer-event-management

The AWS DeepRacer Event Manager (DREM) is used to run and manage all aspects of in-person events for AWS DeepRacer, an autonomous 1/18th scale race car designed to test reinforcement learning (RL) models by racing on a physical track.
https://aws.amazon.com/solutions/guidance/aws-deepracer-event-management/
MIT No Attribution
16 stars 12 forks source link

RPi5 not supported for timing #14

Open davidfsmith opened 10 months ago

davidfsmith commented 10 months ago

Due to changes with the way the GPIO is connected on the latest version of the Raspberry Pi (5) the existing timer code leaderboard-timer/timer.js doesn't work with the timing board.

There are a couple of options 1) Do nothing and hope that the library rpi-gpio or its dependency epoll are updated to support the RPi5 2) Look to change the code to use GIPO Zero

Example code detecting "laps" from a timing board that works on both an RPi4 and an RPi5

#!/usr/bin/python3

from gpiozero import Button
from signal import pause

def logLap():
    print('lap')

pin1 = Button(17)
pin2 = Button(27)

pin1.when_pressed = logLap
pin2.when_pressed = logLap

pause()