You really need to crash course some basic Arduino coding skills. All you want to do is turn on or off a projector if the pedals are moving. If you knew some basic stuff then you could sort through your code and remove most of it.
How does the code know the pedals are moving?
How are you powering the relay that powers the projector?
It seems to me that a very basic code would suffice
If (pedals are moving){
Activate relay;
} Else {
Don’t activate relay;
}
You would need to do very minimal setup first.
My apologies for the oddball code blocks. I typed it on my cell phone.