My team recently encountered an unfortunate aspect of sensor data: “noise”. In order to make use of sensors for precision movements, such as driving straight, one needs a way to identify and filter out the junk. Here’s a step-by-step description of our median filtering process.
There is much information on the VEX Forum and various websites concerning PID, and most of them do a better job of explaining how it works and how to implement it than I could hope to achieve. Here’s a post with links to the resources I found useful.
The Pre-autonomous / Initialize part of your competition template can be used for handy stuff, including sensor calibration and autonomous code selection.
RobotC’s datalog functionality allows you to see your program’s numerical data in complete detail, captured as your program is running. You can scroll through every iteration of a function and see the value of variables at each step. Plus one-click download to CSV and one-click customizable graphs. I love it.
RobotC tasks are a powerful tool that allow you to write code that can run simultaneously (sort of faux-multitasking, since the cortex cannot actually do two things at once). This is pretty high on the list of why we switched to RobotC from easyC; if your robot can handle several movement instructions at once, you can do a lot more, for example, in those 15 seconds of autonomous.
The ternary statement in RobotC is a way of writing an if-else statement all in one line, comprised of a (condition check), (what to do if true), and (what to do if false). Read on for some samples and explanation. While no one *needs* to write code this way, *everyone* should be able to read it to take advantage of code snippets available online.
Here are a few new (to us) programming concepts, courtesy of George Gillard. Read on for breaking in auton, slowing down as you approach a target, and an elegant button coding scheme.
Sign up for a free online class during 2017 December school vacation. Read this post for complete details about what is covered and how to enroll. Geared toward the newbie.
Here’s a simple programming concept that was new for me this year, which grew out of moving to RobotC. However, this method can be used in (and recommended for) any language; examples are given here for RobotC and easyC.
This post is part of my journey from easyC to RobotC. I will post things here as I learn them, that might be helpful to others who are also new to this language. This week, I learned how to program a joystick to drive a chassis. Unlike easyC, the standard text-based RobotC does not have […]