Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micro-Controller Program for Cube Mover #20

Open
IamfromSpace opened this issue Jan 20, 2018 · 0 comments
Open

Micro-Controller Program for Cube Mover #20

IamfromSpace opened this issue Jan 20, 2018 · 0 comments

Comments

@IamfromSpace
Copy link
Collaborator

Our robot requires three servos, which each require a PWM (pulse width modulated) pin out for control.

While a Raspberry Pi has GP I/O and would be more capable of image processing (an eventual requirement for a self sufficient solver), it only has one hardware PWM. The other software PWM can be affected by the OS and other applications. As such, a micro-controller is the preferred way to move the servos.

The micro-controller application needs to accept serial commands to turn cube faces, and keep track of it's orientation. For parsing ease, we can use Singmaster Notation (U/D/L/R/F/B) to denote cube face, and then an second character to denote the number of 90 degree turns clockwise. So if the serial input is F3U1D2, it would turn the "front" face counter clockwise, the "up" face clockwise, and the "down" face 180 degrees.

Any time this would "reorient" the cube centers, the micro-controller code would take this new orientation into account when it gets the next move.

So each time it decoded the next instruction it would:

  1. Identify "where" the face in question is.
  2. Rotate the cube so that the face is pointing at or away from the claw
  3. Update its internal orientation state based on this rotation
  4. Make the face turn by a series of claw rotations and extensions
  5. Update the internal orientation representation based on center changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant