ROBOTC.net Blog  

ROBOTC News

Archive for the ‘Coding’ tag

Student POV: How ROBOTC Changed the Way we do Robotics

without comments

HOW ROBOTC

We, as a team from the Federal Institute of Sergipe (Aracaju, SE, Brazil), have started to meddle with robotics about half a year ago. After some hard work with the hardware and mechanical aspects of the build, we headed to the most crucial thing: the algorithm, intelligence itself. There, we’ve hit an obstacle. A considerable one.

“Talos”, the Robot

“Talos”, the Robot

First, we’ve tried to use the LEGO Mindstorms EV3 software, the one where you use blocks to build programs directly to the brick. That, proved very unsustainable as we move along. The code kept getting bigger, and more unclear to work by as it grew. As we’ve kept getting the needs for a clear code interpretation and source sharing, it was no longer an option.

We’ve then tried a couple other options, as the LeJOS and EV3DEV, but as we we’re implementing an Arduino Pro Mini and an Arduino UNO, we needed a better grasp on the protocols that runs between them. We’ve decided to use I2C and found out that both of the options didn’t have the tools needed to debug and test with. That along with the inconsistency (the robot just didn’t work for no reason 1 out of 20 times), have presented us with a challenge.

There were times when we just didn’t know if a software/framework with the tools we needed existed. We still had an option, we had to try ROBOTC.

We haven’t done it before on one fact: It was paid. But it had a 10-day trial, and we still had to try. And it was fantastic.

We could instantly try it out, it had a firmware of it’s own (with a 1-click install, which makes thing extra-practical) and a really smooth learning curve. An extensive documentation, a really broad community and many many tools to debug from. But does it have an I2C test utility? Yes. It has. The code became clearer, the problems we’re gone, we could share the code on Github, it was magical. It even has a couple plans of payment for teams and or students.

I’d suggest ROBOTC to every EV3/NXT user, it is simply the best all-together tool out there.

Arduino UNO on the bottom of the Robot

Arduino UNO on the bottom of the Robot

- Henrique Cunha

Written by Cara Friez-LeWinter

June 1st, 2017 at 8:07 am

The VEX and VEX IQ Programming Skills Challenge for Robot Virtual Worlds 2017

without comments

Robomatter, VEX Robotics, and the REC Foundation are excited to present low cost, high quality virtual competitions that enable students to test their problem solving and programming skills in the VEX Starstruck and VEX IQ Crossover Robot Virtual World Competitions. And, not only do these virtual competitions provide a great learning experience, you could also qualify for the 2017 VEX Worlds Championship!!
 

This Year’s Games

Both games simulate the single-player Robot Skills and Programming Skills modes of the physical Starstruck and Crossover competitions. However, only the Programming Skills modes of the Virtual simulations are awarded prizes. To participate in the competition, you must update your Robot Virtual World software.

 

starstruckflair

In the Starstruck Robot Virtual Worlds Competition, your goal is to score as many stars and cubes in your zones. You then must hang your robot on your hanging bar.

 

 

crossoverflair

For the Crossover Robot Virtual Worlds Competition, you must pick up the hexballs, score them in their colored scoring area, and then balance on the bridge.

 

Winners Qualify for VEX Worlds!

virtual-challenge-2017

The winners of the Robomatter sponsored VEX Starstruck and VEX IQ Crossover Virtual World competition will receive an invitation to the VEX World Championship April 19-25, 2017 at the Kentucky Expo Center in Louisville Kentucky!

Important Deadlines:

  • Submissions for both contests are due by January 11, 2017.
  • Winners will be announced by February 1, 2017

To learn more about the VEX and VEX IQ Programming Skills Challenge for Robot Virtual Worlds, visit www.robotc.net/recf and visit www.cs2n.org/competitions to sign up!

Cool Project: VEX IQ Smart Radio and iOS

without comments

Cool Project - Smart Radio Blog
Our friend, Simon Burfield, put together a fantastic tutorial on how to get the your VEX IQ brain transferring data with your bluetooth enabled smartphone using the VEX Smart Radio and ROBOTC. Who doesn’t want to control their VEX IQ with a smartphone?!?!

And if you were at VEX Worlds 2016, you might have seen the VEX IQ Smart Radio in action with Simon’s robots. Check out a preview below:

 

To get started, you will need the following:

  • An iOS device with xcode installed
  • A way to run ROBOTC 4.5 +
  • The VEX firmware update program

The following video tutorial and steps below will guide you through the process:

Steps

1) Install the VEX Smart Radio firmware on to the brain
2) Enable Smart Radio in ROBOTC
3) Install the RobotC Smart Radio firmware on to the brain
4) Download the code https://github.com/burf2000/VEXIQ_iOS_ROBOTC
5) Plug a motor in to port 8, a Touch LED in to port 2
6) Install the ROBOTC (BT Demo) program on to the brick
7) Disconnect the brain from the PC
8) Find your Smart Radio ID and remember it (mine was 7436)
9) Run the ROBOTC program on the brain (remember not to be connected via USB)
10) Load code project up and deploy to a iOS device that supports Bluetooth LE
11) Enter your Smart Radio ID in to the App and hit connect

Once connected you should be able to control the motor and the LED!

You can find the original code by James Pearman here. And this is Simon’s code shown in the video tutorial.

Have questions? Head over to our ROBOTC VEX IQ Forum and we can help you out.

Happy Programming!

Do you have a cool ROBOTC project you want to share with the world? If so, send us an email at socialmedia@robomatter.com and we’ll post it on our blog and social media pages!

Written by Cara Friez-LeWinter

May 18th, 2016 at 6:00 am

ROBOTC for VEX Robotics 4.53 Preview Available Today!

without comments

ROBOTC 4-53 VEX

ROBOTC for VEX Robotics 4.53 preview is out and it sports a myriad of awesome new features that we’re very excited about! A full list of changes and improvements appear below, but here are the highlights:

Create Graphs from your Datalogs

Datalog Graph

Want to know what running your robot into a wall looks like to your accelerometer? Curious about how ambient light intensity varies throughout the day? Datalogging now supports (live) plotting of incoming data gathered on the robot brain. Science experiments involving sensor and motor data can be displayed. You can easily find out by gathering the data and having ROBOTC plot the data for you, as it comes in.

Datalog Graphical

Datalogging is no longer restricted to just Full ROBOTC, we’ve added easy to use blocks that allow you to access the same functionality in a simple manner.

Additionally, logged data can even be exported for further analysis in a spreadsheet application of your choice.

 

ROBOTC Graphical Variable Support

Variable Support

You can now use variables in ROBOTC Graphical, as well as perform various operations on them. You can add, subtract, divide, multiple, whatever your program requires. You can use variables in loops, motor blocks, you name it!

 

ROBOTC Graphical Break and Continue

Continue Break

We’ve added two new program flow blocks, break and continue. This was a much requested feature from our more advanced users of ROBOTC Graphical. You can now create more complex programs without creating work-arounds or having to switch to ROBOTC Full.

 

Beta Channel Access

Use Beta Builds

Want to have a front row seat when it comes to upcoming features in ROBOTC? Subscribe to the beta channel through ROBOTC’s preference menu and you will be notified when a preview build (such as this one), is released. Try out new and exciting features before we release them to the general public and provide us with feedback. Help make ROBOTC better!

 

Other changes and bug fixes

New features – VEX

  • You can control an LED on the VEX EDR from Graphical and Natural Language using the new setLED block or command.

Changes and Improvements – General

  • The default colors in the Assembly window (F9) have new defaults for increased readability.
  • Function tooltips have been revised and corrected where applicable.
  • License error messages have been improved. A short explanation of the error codes is now provided.
  • #info has been added to the list of support #pragma statements, such as #error and #warn
  • The start and stop buttons on the datalogging control have been merged into a single button.
  • Deleting a file from the File Utility was not possible, this has been fixed.
  • We’ve made some visual changes to ROBOTC Graphical including new colours for enhanced readability.
  • Internal improvements to the datalogging system have been made that resolve possible data corruption and inability to disable polling for a specific data series.
  • Saving a New User Model in the Motors and Sensor Setup has been fixed.
  • Various float conversion related issues have been fixed.
  • NaN (Not a Number) detection has been fixed.
  • Sscanf with more than 7 arguments could crash the VM, this has been fixed.
  • Overloaded deprecated function no longer cause warnings.
  • A discrepancy between the compiler and VM regarding the maximum number of tasks has been fixed.
  • An issue with ROBOTC crashing due to a recursive macro has been addressed.
  • The RVW package manager now shows the correct informational icon.
  • Opening the RVW package manager no longer causes an exception under certain circumstances.
  • An issue with the debugStream window background refresh causing a hang when communications with the robot was lost, has been remedied.
  • The Program Debug window no longer crops the status line.
  • You can now use displayInverseString() in combination with a char *.
  • drawInvertRect and drawInvertEllipse were not deprecated correctly, this has been fixed.

Changes and Improvements – VEX

  • The VexIQ LCD screen has been added to the #debuggerWindows #pragma.
  • A bug in the macro parser prevented the use of the VEX EDR platform when a PLTW license was active. This has been fixed.
  • An issue with debugging and using sscanf on the VEX IQ has been addressed.
  • VEX IQ getGyroRate and getGyroRateFloat return incorrect values, this has been fixed.
  • Starting a new task on the VEX EDR no longer clears the screen.
  • Using drawTextCenteredInUserScreenArea function will no longer throw an exception on the VEX IQ.
  • An issue with the start of flash file system not showing correctly in communication debug message has been fixed.
  • The VEX EDR competition template now sets the platform correctly.

Download ROBOTC for VEX Robotics 4.53 preview here!

And let us know what you think of the new updates. Happy Programming!

Written by Xander Soldaat

March 29th, 2016 at 6:20 am

ROBOTC for MINDSTORMS 4.53 Preview Available Now!

without comments

ROBOTC 4-53
 

ROBOTC for MINDSTORMS 4.53 preview is out and it sports a myriad of awesome new features that we’re very excited about! A full list of changes and improvements appear below, but here are the highlights:

 

Create Graphs from your Datalogs

Datalog Graph

Want to know what running your robot into a wall looks like to your accelerometer? Curious about how ambient light intensity varies throughout the day? Datalogging now supports (live) plotting of incoming data gathered on the robot brain. Science experiments involving sensor and motor data can be displayed. You can easily find out by gathering the data and having ROBOTC plot the data for you, as it comes in.

Datalog Graphical

Datalogging is no longer restricted to just Full ROBOTC, we’ve added easy to use blocks that allow you to access the same functionality in a simple manner.

Additionally, logged data can even be exported for further analysis in a spreadsheet application of your choice.

 

ROBOTC Graphical Variable Support

Variable Support

You can now use variables in ROBOTC Graphical, as well as perform various operations on them. You can add, subtract, divide, multiple, whatever your program requires. You can use variables in loops, motor blocks, you name it!

 

ROBOTC Graphical Break and Continue

Continue Break

We’ve added two new program flow blocks, break and continue. This was a much requested feature from our more advanced users of ROBOTC Graphical. You can now create more complex programs without creating work-arounds or having to switch to ROBOTC Full.

 

Beta Channel Access

Use Beta Builds

Want to have a front row seat when it comes to upcoming features in ROBOTC? Subscribe to the beta channel through ROBOTC’s preference menu and you will be notified when a preview build (such as this one), is released. Try out new and exciting features before we release them to the general public and provide us with feedback. Help make ROBOTC better!

 

Other changes and bug fixes

New features – MINDSTORMS

 

  • Battery monitoring on the EV3 through the nImmediateBatteryLevel and nAvgBatteryLevel intrinsic variables has been added

Changes and Improvements – General

 

  • The default colors in the Assembly window (F9) have new defaults for increased readability.
  • Function tooltips have been revised and corrected where applicable.
  • License error messages have been improved. A short explanation of the error codes is now provided.
  • #info has been added to the list of support #pragma statements, such as #error and #warn
  • The start and stop buttons on the datalogging control have been merged into a single button.
  • Deleting a file from the File Utility was not possible, this has been fixed.
  • We’ve made some visual changes to ROBOTC Graphical including new colours for enhanced readability.
  • Internal improvements to the datalogging system have been made that resolve possible data corruption and inability to disable polling for a specific data series.
  • Saving a New User Model in the Motors and Sensor Setup has been fixed.
  • Various float conversion related issues have been fixed.
  • NaN (Not a Number) detection has been fixed.
  • Sscanf with more than 7 arguments could crash the VM, this has been fixed.
  • Overloaded deprecated function no longer cause warnings.
  • A discrepancy between the compiler and VM regarding the maximum number of tasks has been fixed.
  • An issue with ROBOTC crashing due to a recursive macro has been addressed.
  • The RVW package manager now shows the correct informational icon.
  • Opening the RVW package manager no longer causes an exception under certain circumstances.
  • An issue with the debugStream window background refresh causing a hang when communications with the robot was lost, has been remedied.
  • The Program Debug window no longer crops the status line.
  • You can now use displayInverseString() in combination with a char *.
  • drawInvertRect and drawInvertEllipse were not deprecated correctly, this has been fixed.

Changes and Improvements – MINDSTORMS

 

  • The original LEGO firmware file operations have been removed, their functionality has been superseded by ROBOTC file operations.
  • EV3 specific datalogging functions have been marked as obsolete. Users should use the new datalogging functions.
  • Restrictions on the file downloading locations on the EV3 have been relaxed a little.
  • Opening the File Utility on the EV3 will create the rc and rc-data folders, if they don’t already exist.
  • Playing a sound file from inside ROBOTC’s on-brick program folder is easier. It will check if a file with that name exists in the rc folder, before checking the built-in sounds folder.
  • A memory leak in the EV3 connection handling has been fixed; disconnecting an EV3 while the debugger was running would eventually exhaust all program memory.
  • Running a motor with a specified encoder count of 0 on the EV3 would produce unpredictable results, this has been fixed.
  • An issue with reading data from the NXT Sonar sensor in the IDE has been fixed.

Download ROBOTC 4.53 preview here!

And let us know what you think of the new updates. Happy Programming!

Written by Xander Soldaat

March 29th, 2016 at 6:15 am

Mexico’s ROBOTC and Robot Virtual Worlds Software Programming Contest

without comments

reeduca-logoIn early 2015, our partner, Reeduca, started the ROBOTC and Robot Virtual Worlds (RVW) Software Programming Contest for both public and private school students in Mexico. Reeduca started the contest as a way to introduce students, teachers, parents, and educators to computer science and its benefits.

In order to reach the ROBOTC and RVW National Championship, students had to qualify through pre-national tournaments in each zone of Mexico. The best programmers were selected to move onto the National Championship.

Check out this video to see programmers in action at Mexico’s ROBOTC and Robot Virtual Worlds National Championship!

Written by LeeAnn Baronett

March 18th, 2016 at 5:23 am

Cool Project: VEX IQ Tetris

without comments

CP VEX IQ TETRISTetris is a beloved and well-known classic game that many of us have been addicted to at one point or another. We wait patiently for that perfect “Tetrimino” that will create a horizontal line so the board continues to move down so the game keeps going. Well, our latest Cool Project does just that, but on a VEX IQ brain and programmed in ROBOTC!

Petr Nejedly created the game as an experiment to see what could be done with the VEX IQ platform outside of robotics. He says, “I have coded it ad-hoc in one night. The code is pretty … short, not really pretty. 233 lines including (rare) comments.” When we spoke through email he mentioned that game is currently not random at all. “So, my son came to me, that he has an improvement to the program. That I should use this random() function, it will be more fun to play … Teachable moment! We have discussed, how a computer, a very exact instrument that always follows the same instructions and in fact only moves numbers here and there, come up with random numbers. What is a PRNG and how you have to seed it (srand()), what are real sources of randomness and what kind of issues such a lack of true randomness could cause in real world, besides lack of fun.” At this point, Petr said he would like to leave the actual fix to the curious readers/programmers out there to see what they can do with it. (Let us know if you do!)

Check out the game in action here:

Petr was nice enough to share the souce code, which you can download here. You can also read the original VEX IQ forum discussing the project here.

Do you have a cool ROBOTC project you want to share with the world? If so, send us an email at socialmedia@robomatter.com and we’ll post it on our blog and social media pages!

Written by Cara Friez-LeWinter

December 3rd, 2015 at 6:15 am

Cool Project: EV3 Security Tank

without comments

Cool Project EV3 TankKyle M. (aka Builderdude35) created a very cool project called the EV3 Krimzon Guard Security Tank! The tank is programmed in ROBOTC too, which was the first time Kyle programmed with our software. Kyle says, “[The EV3 Tank] features proportional IR beacon tracking, and a deadly-accurate turret targeting system. If that’s not enough, it also has a massive spiked steamroller on the front!”

 

 

 

 

Watch the tank in action here:

 

 

 

The tank includes an EV3 brick, two EV3 large motors, steam roller with spikes, a rotating dual-barrel turret, and three sensors! “There is a Mindsensors SumoEyes mounted on the chassis just above the steam roller (you will see the two red LED’s) that detects the targets in zones left, right or straight ahead. Just above that is a LEGO Infrared sensor that is used for beacon tracking. Lastly, there is a LEGO Ultrasonic sensor that rotates with the turret to confirm target acquisition.” Pretty awesome!

For a more detailed breakdown of the tank and code, visit his website here.

Do you have a cool ROBOTC project you want to share with the world? If so, send us an email at socialmedia@robomatter.com and we’ll post it on our blog and social media pages!

Written by Cara Friez-LeWinter

December 3rd, 2015 at 6:10 am

Announcing the Mini Urban Challenge for Robot Virtual Worlds!

with one comment

Mini Urban Challenge

We are very excited to announce a brand new Robot Virtual Worlds Competition, Mini Urban Challenge! Our new virtual simulation is based off the national competition sponsored by The Doolittle Institute, the Air Force Research Laboratory, and Special Operations Command.

 


 

The purpose of this competition is to design and program a robotic vehicle that can autonomously navigate a mini-urban city, using a virtual LEGO® MINDSTORMS® EV3 robot. The robot must enter the mini-urban city from a home base, travel through the city to assigned parking lots, park in any parking space in each assigned parking lot, and then exit the city by returning to the home base and parking in the home base. The robot should use the optimal path (shortest distance) through the mini-urban city to visit the parking lots. While in the city, the robot should obey traffic rules by stopping at stop signs and following standard right-of-way rules when other vehicles are encountered. You can find the official rule here.

Our new Robot Virtual World features three modes for the Mini Urban Challenge:

1. Practice Mode allows students to develop and test their code for the challenge, without worrying about scoring, penalties, or the clock.

2. Competition Mode is the standard version of the challenge field, complete with timing and scoring to reflect the real world competition.

2015-10-23_15-07-45

3. City Mode is an exciting, themed version of the challenge field, which also includes timing and scoring that reflect the real world competition.

2015-10-23_15-09-32

Download and install the Mini Urban Challenge for Robot Virtual Worlds here! To submit your scores and compete with others, you will need a free account from the Computer Science Student Network!

Competing for the Future: Developing a Life-Long Interest in STEM, Part I

without comments

LiveCareer Quote
A few weeks ago, we published an infographic that illustrates the STEM Problem: there are more and more STEM jobs out there, but fewer and fewer candidates who are qualified to fill them. But, taking a look at the job market shows that employers need more than employees who simply understand science, technology, engineering or math.

Degrees and credentials are important, but the development of soft skills—skills that are more social than technical—are a crucial part of fostering a dynamic workforce and are always in high demand.”[i]

Today’s job market needs graduates who excel in the areas of Science, Technology, Engineering, and Mathematics (STEM), and who also excel in the areas of teamwork, communication, creative problem solving, project management, critical thinking, and leadership. Research shows[ii] that competitions are a fun and exciting way to combine STEM with the development of 21st century skills.

This is part one of a series of articles that will show how easy it is to host a competition at your school, in your classroom, in a club, or at your home! Over the next few weeks we will continue this article and suggest teacher-tested strategies that enable you to teach many of the competencies that you can teach via competitions and project based learning via a Virtual Competition.

Why Competitions?

IMG_7431Competitions are generally multifaceted and require participants to engage in a range of activities. Well designed competitions address academically challenging concepts and teach important 21st century skills like: research, ideation, prototype development, design reviews, presentations, and iterative design-develop- and test cycles, just to name a few. Competitions involve contextualized activities that enable kids to develop the soft skills that employers crave: leadership, written and oral communication, the ability to think on your feet, and the ability to present and defend your ideas. In competitions, these skills are nurtured in a fun and easy-to-understand manner, helping students develop competencies that they’ll use in college and future careers.

IMG_7441Research shows that after participating in competitions, students are more likely to take on additional STEM classes in high school and pursue STEM degrees and careers. Teachers also report that students who have participated in competitions are more comfortable using computers than students who haven’t participated in competitions.[iii] Research also shows that competitions increase students’ professional skills, like understanding the value of teamwork and the role of “gracious professionalism.” Competitions also increase students’ self-confidence, with 89% of students reporting more self-confidence after being part of a competition team.[iv] These are just a few of the reasons we’re big supporters of competitions and competition teams.

Compete Virtually, From Anywhere

splash-image_RECF
Our goal is to support education with multiple toolsets that engage and teach at the highest level. But, we know it can be difficult to find the requisite resources to start a team and travel to competitions, especially with the very real resource constraints so many schools face. That’s why we’ve partnered with the REC Foundation to create the VEX and VEX IQ Programming Skills Challenge for Robot Virtual Worlds!

Robomatter, VEX Robotics, and the REC Foundation are really excited about presenting low cost, high quality virtual competitions that enable students to test their problem solving and programming skills in the VEX Nothing But Net and VEX IQ Bank Shot Robot Virtual World Competitions. And, not only do these virtual competitions provide a great learning experience, you could qualify for the 2016 VEX Worlds!

This Year’s Games

3Both games simulate the single-player Robot Skills and Programming Skills modes of the physical Nothing But Net and Bank Shot competitions.

In the Nothing But Net Robot Virtual Worlds Competition, your goal is to program your virtual robot to put as many balls as you can in the Low and High goals, and by Elevating Robots in your Climbing Zone.

F3or the Bank Shot Robot Virtual Worlds Competition, your robot will need to pick up balls and make some tricky bank shots! The object of Bank Shot is to attain the highest score by Emptying Cutouts, Scoring Balls into the Scoring Zone and Goals, and by Parking Robots on the Ramp. There are a total of forty-four Balls available as Scoring Objects in the game, with one Scoring Zone, one Goal, and one Ramp on the field.

Winners Qualify for VEX Worlds!

The winners of the Robomatter sponsored VEX Nothing But Net and VEX IQ Bank Shot Robot Virtual World competition will receive an invitation to the VEX World Championship April 20-23, 2016 at the Kentucky Expo Center in Louisville Kentucky!

Important Deadlines:

  • Submissions for both contests are due by March 1, 2016.
  • Winners will be announced on March 11, 2016!

To learn more about the VEX and VEX IQ Programming Skills Challenge for Robot Virtual Worlds, visit www.robotc.net/recf and visit www.cs2n.org/competitions to sign up!

Announcing the 2016 REC Foundation & Robomatter Scholarship!

REC Foundation Robomatter Banner
Because Robomatter is so committed to advancing STEM education, we’re pleased to partner with the REC Foundation to offer one $5,000 scholarship to a high school junior or senior who will be pursuing a STEM degree in college! The deadline to apply is January 31, 2016. Learn more about the The 2016 REC Foundation & Robomatter Scholarship by reading our blog (link to blog) or visiting the REC Foundation website.

 

 

[i] “Careers | Top 10 Soft Skills in Demand | LiveCareer.” LiveCareer. LiveCareer.com, n.d. Web. 08 Oct. 2015. <http://www.livecareer.com/career-tips/career-advice/soft-skills-in-demand>.

[ii] Robotics Competition: Providing Structure, Flexibility, and an Extensive Learning Experience – http://users.csc.calpoly.edu/~jseng/papers/grimes_seng.pdf

[iii] The Impact of Participation in VEX Robotics Competition on middle and high school students – http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&ved=0CDcQFjADahUKEwj9nJmlkq7IAhXE_R4KHRpxC3Q&url=http%3A%2F%2Fwww.asee.org%2Fpublic%2Fconferences%2F8%2Fpapers%2F2994%2Fdownload&usg=AFQjCNGeCaxBzSsxmeyN7jMVLlaOFwFIXA&bvm=bv.104317490,d.dmo

[iv] More that Robots: An evaluation of the FIRST Robotics Competition – http://www.usfirst.org/uploadedFiles/Who/Impact/Brandeis_Studies/FRC_eval_finalrpt.pdf