Project not responding

Hi,

So I'm building a custom RC transmitter and receiver; with the nrf24 as the wireless coms device. At the moment I'm trying to control an RC car. Issue is that sometimes the car just hangs and stops responding to the input from the transmitter. I'm not sure if the issue is with the tx or the rx; but I found that sometimes restarting the transmitter once or a few times sorts the issue; but sometimes I found that I need to restart both the tx and rx for it to work again. I'm looking through my code to find the culprit; but with no luck so far. Here are the project repos and schematics:

Receiver

Transmitter

Any guidance on this matter is welcomed.

There’s a good chance the problem is in the code, please post it here with tags as suggested in the forum guidelines.

The code is long and won't fit in code tags; hence why I posted the links to the repos which contain all the code. Please check them out and let me know what you think. Cheers.

We're unpaid volunteers. You have to make it easier for us.

I apologize if I am being ambiguous. Please tell me what you want me to elaborate on and I will :grin:.

To explain what's going on in the repo; I'm using platformIO. So all the code is in the 'src' and 'lib' folders. The main.cpp file contains the setup and loop functions.

I hope that helps?

AS has been said many times before, main problems with NRF devices is power regulation and another is trying to drive servos off the Arduino 5v.

Show a circuit diagram of you connections and power supplies of both units as I don't have a day spare to troll though what you have supplied.

Sounds like brownout

2 Likes

Yes, it will fit in code tags.

I would be very surprised if anyone bothers look up your "repo", especially since this is the Arduino forum, where vanishingly few people care about or use PlatformIO.

Good luck with your project!

Your project is complex, so don't expect others to debug your project.
If it works, then the wires and components are fine. Freezes solved by reboots are, in general, code issues (dead-locks). Since you are using a State Machine, probably that the code is stuck in some unwanted state transition (maybe never leaves that state, or infinite state cycle between two states, or something).
I see that you are using SD card: make a logging mechanism, log your State Machine transitions and when it freezes, just used the sdcard log file to see where it stopped (or maybe you'll just see tons of infinite state changes without an actual outcome). Then, inspect your code and try to understand if the logic meant there fits with what the code actually does.

1 Like

That would imply a priori knowledge of the nature of the problem, which is not available.

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