ROBOTC for VEX Online Professional Development
Robotics Competitions
VEX Robotics Competitions Official VEX Competitions utilize special Field Control Hardware to enable and disable robots
Competition Templates ROBOTC is fully legal in VEX Competitions You must program using the built-in templates –Competition Template –Driver Skills Template
Competition Template Pre-autonomous code goes here – clear encoders, ect Autonomous code goes here Remote Control code goes here
Testing Competition Code The ROBOTC Competition Control Debug Window simulates the Field Control Hardware, so you can test your code
Pneumatics
Sound
ROBOTC Sounds ROBOTC with the VEX has a speaker port available on it for playing basic and polyphonic tones. You can play the follow types of sounds: –A specific note – PlayTone(); –A system sound – PlaySound(); –A user loaded sound file (.wav) – PlaySoundFile();
Playing Sounds PlayTone(frequency, durationIn10MsecTicks); –Example: PlayTone(440, 10); –Plays a 440hz note for 100ms. PlaySoundFile(“fileName.wav”) –Will play the sound file “fileName.wav”. –Use the “File Management” Utility for downloading sound files onto your VEX Robot – Advanced Tools – File Management
Playing Sounds PlaySound(sound); –Plays a specific sound effect that is pre-programmed into the VEX soundBlip soundBeepBeep soundDownwardTones soundUpwardTones soundLowBuzz soundFastUpwardTones soundShortBlip soundException soundLowBuzzShort
Sound Variables bSoundActive –A Boolean variable informs the user if the VEX is actively playing a sound. Returns “true” if a sound is playing, “false” if no sound. bPlaySounds –A Boolean variable to “mute” the VEX. Set bPlaySounds to “false” to mute the VEX. Set bPlaySounds to “true” to unmute the VEX. –The #define shortcuts are also acceptable: MuteSound(); UnmuteSound();
Sound Queue The VEX has an internal queue in order to line up sound commands. –This queue will automatically process any waiting sound commands, in order that they are received. –You can override/check on the queue with the following commands: PlayImmediateTone(frequency, durationIn10MsecTicks); –This command will force the “playTone” command to jump ahead of the queue. bSoundQueueAvailable –A Boolean Variable to check if the sound queue is full. Returns a “true” if there is space available, “false” if the queue is full.
File Management The file management utility allows you to see all of the programs, sound files and other files that are loaded on your VEX.
VEX File Management From the file management utility, you can.. –Upload files –Download files –Run/Stop Programs –Delete files –Create custom firmware images –Check space available on the VEX
Overview
What are ? RVWs are simulation environments that run virtual robots programmed in ROBOTC.
Why RVW (Initially)? 1.Many classrooms don’t have enough robots for students 2.Very few students have robots at home to do homework or make up missed classwork The Robot Virtual Worlds Project tackles both of these problems by allowing students to program virtual robots using the same ROBOTC Software VEX and LEGO Versions Available –Every version of ROBOTC 3.x comes with a free 60-day trial! –Free licenses available on CS2N for individual student use!
Why RVW (Now)? Research between the Carnegie Mellon University Robotics Academy and the Learning Research and Development Center at the University of Pittsburgh shows that learning to program in a simulated environment is actually more effective than with physical robots!
Why RVW (Now)? continued… Programming with a simulated robot greatly reduces wasted class time –Very little time spent getting ready for class –Robots automatically reset to their start location –No broken motors, sensors, gears, etc. –No low batteries in the robot or joysticks –Debugger information is always readily available Flot, J., Lui, A., Schunn, C., Shoop, R. (November 2012). Learning How to Program via Robot Simulation. Robot Magazine, Robot Magazine
RVW Solutions Classroom Environments –Curriculum Companion Tables –Level Builder Competition Environments –VEX Skyrise –VEX IQ Highrise Themed / Game Environments –Ruins of Atlantis –Operation Reset –Palm Island
Classroom Environments
ROBOTC Curriculum Step-by-step tutorial videos teach students how to program using motors, sensors and remote control Practice challenges allow students to apply what they’ve learned
Curriculum Companion All of the practice tables found in the free ROBOTC Curriculum but in a virtual environment Students follow along with the tutorials and go through the practice challenges, but with virtual robots Every student in a classroom can learn to program, even at home!
Virtual Robots Virtual robots emulate their real-world counterparts Several robots available, based off of models used in curriculum Have working light sensors, encoders, touch sensors, ultrasonic sensors, compass sensors and motors Still communicate with the ROBOTC Debugger!
Achievements / Badges As students complete challenges, they earn badges similar to modern games Designed to motivate them, engage them in CS activities long-term Badges are also displayed on CS2N.org, allowing teachers and parents to track progress
Tracking Progress CS2N.org also allows teachers to create “Groups” with their students RVW Challenge Completion and Quiz scores are all presented in convenient, easy-to- understand format
Using Robot Virtual Wolds 1.Switch Robot > Compiler Target to Virtual Worlds 2.Choose Window > Menu Level > Select Virtual World to Use > Curriculum Companion 3.Compile and Download a Program to Launch the Virtual World
Part 2: RVW Level Builder The Level Builder allows teachers to: 1.Provide individual programming challenges for each student 2.Teach and reinforce their own topics in addition to the ROBOTC curriculum (maze solving, state machines, etc.)
RVW Model Importer With the model importer, students can import any model they’ve created in Solidworks, SketchUp, or Autodesk Inventor into the Level Builder Adjust size, mass, colliders, color and more
Competition Environments
Competition Fields Both the VEX and VEX IQ Competition Fields are emulated in virtual environments Simulations for the last 3 years of games have been implemented
VEX Toss Up Features 2 fully programmable robots –Include multiple motors with encoders, sonar sensor, 3 line tracking sensors, gyroscope, potentiometer and touch sensor Autonomous timing, tele-op timing, scoring, preloads, and match loads are all supported Keyboard and joystick control are also supported
VEX IQ Highrise Features a fully programmable VEX IQ Clawbot with multiple configurations –Include multiple motors with encoders, sonar sensor, color sensor, gyroscope and color LED Programming Skills and Robot Skills modes are both implemented
Themed / Game Environments
Themed Worlds Learning and Gaming are not mutually exclusive! Themed worlds use all of the same ROBOTC code to control the robot, but in a fun environment Students earn CS2N Achievements as they complete missions using behavior based programming or math problems
Palm Island Seagulls calling. Palm trees swaying. Waves lapping at the beach. Palm Island is a floating oasis for you to explore. Help Commander Roxie-Rivet-minder prepare for a Luau Collect coconut clusters and set lobster traps Use motors and sensors to control your robot's movement on the island boardwalk
Operation Reset Deliver Charge Cubes, Unobtanium Crystals and Ion Propulsion Fuel Barrels throughout this outer space mining colony to get it up and running after a major storm took all of the systems down.
Ruins of Atlantis We thought Atlantis was a myth – we were wrong. Collect underwater treasure and explore the lost Ruins of Atlantis. Sequel to Expedition Atlantis.
Resources
Hardware / Building Best way to learn about building? –Build a few robots of your own! /index.htmhttp:// /index.htm
Hardware / Building Additional Resources: –VEX Wiki: –VEX Inventors Guide Pages:
ROBOTC Programming ROBOTC Help Documentation
ROBOTC Programming Function Library with Built-in Variables Help
ROBOTC Programming –VEX Cortex Video Trainer, Forums, Projects, Latest Downloads and updates
Additional Resources The Robotics Academy Website – Newsletter: – otline/index.htmhttp:// otline/index.htm
Additional Resources VEXTeacher.com VEX Curriculum 2.0 (found at VEXTeacher.com)
CS2N.orgCS2N.org: Computer Science Student Network
VEX Kits and Parts RoboMatter Store