Skip to main content

Notes (11/07/2024)

CE team stuff!!!

  • DEFINITELY MAKE A DEMO!

    • The demo application should spin a single motor! This is important for testing purposes!!!
  • Combine last week's work together:

    • Robot (aka Drivetrain, aka SquareDrive, aka HDrive) class and PCA9685 code should be merged.
    • Now, add the Serial work. Here's my old code from enMo -- feel free to reference it! You're basically replicating that today (and going forwards).
      • Note the overall structure (this is kind of a template ig):
// create motor objects
// I use a naming scheme - FL or LF is "front-left corner motor".
// F=front, B=back, L=left, R=right
Motor fl(0);
Motor fr(1); // C++ constructor syntax is... something alright
// ... 3 others - note that an H-drive has 5 motors!
HDrive drivetrain (fl, fr, bl, br, middle);

void setup() {
// Set up the drivetrain
// Initialize Serial
}

void loop() {
// Get the latest Serial message
// Parse it into speeds x,y,rotation
// Set the speeds by calling a Robot class method!!
// delay(10); // this is necessary!!!
}
  • Version control it all !!!

  • Make circuit:

    • Consider using Play-doh to place components!
    • Pico, with GPIO pins connected to 5 motor controllers (fl, fr, bl, br, middle)
    • Battery voltage in -> Voltage regulator (check boxes in da back!!!) and Motor power.
      • BTW, ref pico docs @ 4.5. Powering Pico to see info about safely powering from two sources