Asked — Edited

Roboquad Resurrection With ESP-32 And ARC

@DJ Sures, @Athena,

Back in the day with the EZ-B V3, I modified my RoboQuad to control it based on a tutorial or guidance from you. The basic idea was to intercept the IR receiver, hardwire it into the EZ-B, and send the codes to the robot via output from the EZ-B V3. When the EZ-B V4 was released, there was an issue you mentioned that prevented it from working correctly. It had something to do with the string codes needing to be sent over Wi-Fi instead of Bluetooth, but I can't recall the details.

Now, using the Flipper Zero, I should be able to retrieve the action and movement codes. What if I used an ESP32 with modified firmware to store the codes onboard the ESP32, with ARC sending various bit combinations to represent specific IR code outputs?

Do you have any pointers or ideas on how to get started? I plan to use the Flipper Zero to capture the IR codes first. Do you still have the old codes and strings you used to send? Is there anything specific I need to know before attempting this?

User-inserted image


Related Controls firebase WebSocket Server

ARC Pro

Upgrade to ARC Pro

Unleash your robot's full potential with the cutting-edge features and intuitive programming offered by Synthiam ARC Pro.

PRO
Canada
#9  

Got it! Let's focus on setting up the custom Movement Panel in ARC with a single script for each direction. Here's how you can configure it:

Step-by-Step Guide to Use Net.sendUDP() in ARC with a Custom Movement Panel

  1. Create a Custom Movement Panel:

  2. Configure the Custom Movement Panel:

    • Open the configuration for the Custom Movement Panel.
    • You'll see options to add scripts for different movement directions (Forward, Left, Right, Reverse, Stop).
  3. Add JavaScript Code to Send UDP Commands:

    For each movement direction, you'll use the Net.sendUDP() function to send a command to the ESP32. Here's an example of how you can set up each direction:

    // Define the IP address and port of the ESP32
    var esp32IP = "192.168.1.100"; // Replace with your ESP32's IP address
    var esp32Port = 12345; // The port you set in the ESP32 code
    
    // Function to send a UDP command
    function sendUDPCommand(command) {
        var commandBytes = new Uint8Array(command.length);
        for (var i = 0; i < command.length; i++) {
            commandBytes[i] = command.charCodeAt(i);
        }
        Net.sendUDP(esp32IP, esp32Port, commandBytes);
    }
    
    // Forward command
    sendUDPCommand("F");
    
    // Left command
    sendUDPCommand("L");
    
    // Right command
    sendUDPCommand("R");
    
    // Reverse command
    sendUDPCommand("B");
    
    // Stop command
    sendUDPCommand("S");
    
  4. Assign the Functions to Movement Directions:

    • In the Custom Movement Panel configuration, assign the sendUDPCommand("F"), sendUDPCommand("L"), sendUDPCommand("R"), sendUDPCommand("B"), and sendUDPCommand("S") to the respective movement directions.
  5. Test the Setup:

    • Connect your ESP32 to the same network as your ARC setup.
    • Run the ARC project and use the Movement Panel to control your RoboQuad.

Notes:

  • Ensure that the IP address (esp32IP) matches the IP address of your ESP32.
  • The port (esp32Port) should match the port you configured in the ESP32 code.
  • The Net.sendUDP() function sends the command as a byte array, which the ESP32 will interpret to execute the corresponding IR command.

Feel free to ask if you have any questions or need further assistance!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.