Quantcast
Viewing all articles
Browse latest Browse all 83

Using ESP32CAM Serial to control 18 channel maestro

Hi Im trying to control the 18 channel maestro via serial from a ESP32cam. Ive made all the connections as per the documentation, and each device is hooked up to a adequate power supply. Ive set all the proper setting in the maestro control center windows app, and Ive upgraded the firmware to 1.03. Ive tried a baud rate 9600 and 115200. and neither seems to get a response from the maestro. The yellow status LED is blinking about ~once a second. Are none of the servos enabled, if so how do I enable them.

The servo I have on channel is unpowered (moveable by hand) even with 5V on the servo rails

here is my serial output of the ESP32cam at 9600 baud

Here is my code, which is just modified basic example

#include <PololuMaestro.h>

#define maestroSerial Serial1

MiniMaestro maestro(maestroSerial);

void setup()
{
  // Set the serial baud rate.
  maestroSerial.begin(9600);
}

void loop()
{

  // Set the target of channel 0 to 1500 us, and wait 2 seconds.
  maestro.setTarget(0, 448);
  delay(2000);

  // Set the target of channel 0 to 1750 us, and wait 2 seconds.
  maestro.setTarget(0, 1500);
  delay(2000);

  // Set the target of channel 0 to 1250 us, and wait 2 seconds.
  maestro.setTarget(0, 2448);
  delay(2000);
}

Image may be NSFW.
Clik here to view.
image

6 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 83

Trending Articles