Easy C and Holonomic Drive Programming Questions

I coach a middle school team with several students with 1 years experience and a couple in their first year. We are all learning together :slight_smile:

They wanted to use a holonomic drive and it turned out to be pretty easy to set up. Now we have 2 questions…

  1. How do you build a function to use the holonomic drive in autonomous? We understand how to do it in say tank mode… we can create a function to ā€œturn leftā€ by having the right side moters go forward and the left side motors reverse for some duration. But do we need to individually call each motor to do things like spin and strafe etc?

  2. How do we assign a function to a button? We can build functions to start and stop our fly wheels in the code and can assign them to the joysticks but want to have the options to do it with buttons

I guess there is a 3 question… is there a comprehensive tutorial for EasyC specifically for Vex somewhere?

Thanks in advance

Contrary to popular belief, simply driving a holo isn’t that hard. I’ve done this before.

I’ve decided to post my admittedly bad robot code from Toss Up on GitHub.

This file will be of particular interest for you. Keep in mind this code wasn’t properly finished and it’s PROS, and it’s my code so naturally it’s complicated. Look at the last function, goHoloXCL. It’s got the general idea. May contain language, you’ve been warned.

The whole repo is here.

I’m posting stuff to GitHub because I need to build a professional portfolio and keep forgetting all the stuff I’ve written over time…

Good luck.

Cody, please add some sort of license to the repo. As is, you retain copyright and anyone who want’s to use it has to ask your permission. I realize you are giving it away for free, but it’s a good habit to get into, also if you want others to share their improvements then it should probably be GPL. I would also suggest you detab the source as github insists on displaying everything with 8 spaces per tab.

Will do when I get home, GPL is fine.

Anyone written a ā€˜detabifier’ program yet? I figure I should probably detab my code but i’m far to lazy to do so. Does anyone know of an app that will do it for me or should I write my own?