Speed-up IR send/receive signal for RC laptiming

Hi Guys,

I'm re-building the same idea as this guy RC cars: IR 2.4GHZ multi client Lap timer for Arduino

An IR pillar that sends an IR beam that will be picked-up by the RC-car when it drive by and then its sending via ESP-NOW a payload to the Master-Box with some details.

Today I did some testing outside and it is working as long as I don't drive to fast. My guess is that when I drive faster (30kmh/h+) the car goes by too fast and don't have enough time for a good read from the IR-pillar beam.

Currently the beam is using this code:

void loop() {

  if ( (millis() - lastSend) > 75 ) {
    lastSend = millis();
    irsend.sendNEC(0x539, 0x1, 0, 0);
  }
  
}

Does anyone of you guys know a better/faster way by for example sending a shorter message so I can send more messages per second and this way increase the chance that the car receive the code correctly? Or maybe another good idea/solution for this problem.

Thanks in advance!

looks like the code only sends an IR msg every 75 msec. why not continually send the msg?

void loop() {
    irsend.sendNEC(0x539, 0x1, 0, 0);
}

When I remove the delay the receiving side can't decode the signal anymore.

Output WITHOUT delay:

Protocol=UNKNOWN Hash=0x0 1 bits received
Protocol=UNKNOWN Hash=0x0 1 bits received
Protocol=UNKNOWN Hash=0x0 1 bits received
Protocol=UNKNOWN Hash=0x0 1 bits received
Protocol=UNKNOWN Hash=0x0 1 bits received

output with a delay of 75ms or higher:

Protocol=NEC Address=0x539 Command=0x1 Raw-Data=0xFE010539 32 bits LSB first
Protocol=NEC Address=0x539 Command=0x1 Raw-Data=0xFE010539 32 bits LSB first
Protocol=NEC Address=0x539 Command=0x1 Raw-Data=0xFE010539 32 bits LSB first
Protocol=NEC Address=0x539 Command=0x1 Raw-Data=0xFE010539 32 bits LSB first

can the delay be reduced?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.