How to Learn PROS & Mesh

Dear All,

I have started a robotics club at my school and we have split into 4 teams. Half of the teams would like to use PROS the other half would like to use Robot Mesh. For PROS how can they get started? I am aware of the “Getting Started” and “Tutorials” page on the PROS page, but they are quite shallow I feel and will be done quick and easy… how can I develop a plan to keep them busy… so far I was thinking:

  1. Make sure they understand the Basics of C and Programming
  2. Do The “Getting Started” Section
  3. Play Around with the API

However, I think they will get very bored by reading a site like this: C Tutorial - Learn C - Cprogramming.com
Do you recommend any online sites (that are free) that do it in video lesson that you would recommend (or a youtube series)… According the aforementioned site, the basics of C would be: which youtube series or online video based course would have (most) of the following topics… I’d also be looking for something that isn’t too large and intimidating (for example the pluralsight one is very intimidating…)

Intro to C
If statements
Loops in C
Functions and Program Organization
Switch case
Pointers
Structures
Arrays
C-style Strings
C File I/O
Typecasting
Command line arguments
Linked Lists
Recursion
Variable argument lists
Binary Trees

For Robot Mesh where and how can they learn how to use Robot Mesh and the python necessary for using Robot Mesh and Robots only (video tutorial would be nice) (not general python course…unneeded at this moment im guessing). Please do recommend anything to do for Mesh as well.

Sorry for such a long post, but please do help me make a plan for both PROS and MESH. Thank you!

Unfortunately, our site is not really focused on teaching C programming, but rather on introducing people to the specific ins and outs of the PROS environment.

That being said, there are numerous resources online for learning C programming (video or otherwise), all of varying levels of quality, complexity, and depth. For example, I found a well-organized, fairly thorough curriculum on GitHub, an approximately 4.5 hour-long video, and this set of video lectures that are relatively dated, but cover more advanced topics, all by searching Google for “C programming curriculum” (and also by appending the word “video” to the query).

There also seemed to be a number of paid courses, such as the ones on udemy.

As you have noted, many of the most popular tutorials seem to tend on the side of being text-based. In my opinion (I have nothing to back this up, other than my personal preference), this could be because text-based tutorials allow the reader to proceed at more of their own pace than videos (which is potentially where your point about boredom comes into play), or maybe because programming itself is text-based, and so lends itself to a text-heavy environment (again, this is speculation).

@Barin

@hotel Thank you! Once they learn C, I’m guessing the getting started, API would be a breeze because all they have to do is understand the specific functions and then use their logic and creativity??

Also, for the Robot Mesh… how would I go about that?

No problem! And yes, that’s the idea :slight_smile:

As for Robot Mesh, I’m not really sure… maybe @Rick TYler can speak to that?

Bump

For learning any programming language (like C/C++), I would strongly recommend a book. I find the content to be much more in detail and well written than most online sites. You also don’t have to deal with an eye-sore of a site like cprogramming.com. You can go to your local library and in the non fiction section there is usually a full shelf of programming books somewhere.

Well, they didn’t say they were good at web development. :slight_smile:

I probably read about 100 pages of C++ For Dummies, I should probably look at it again, as it was helpful in learning more about variable types. Would recommend reading a book. gasp

Personally I think that learning by doing is better than learning a bunch of theory and then applying it. So I would start with a simple goal and then learn what you need in order to accomplish that. Then incrementally add more and learn as you go. If you learn int, while loops, and if statements, and can follow the examples for the API functions then that’s all you need to know to get started (and do a lot).

@Highwayman @Ashwin Gupta @Aponthis @Rick TYler → How should they go about learning mesh, especially if we want them to code in python but they do not know python… For learning python on a video series… would treehouse (https://teamtreehouse.com) be good?

Same advice applies: go to the library and get a python book… I personally own a copy of “Learning Python 2nd Edition” which is pretty good but a little outdated, there is probably a newer edition.

If you chose to buy instead of check out, you always have it as a reference too. I don’t do a lot of python, so its handy too have for when I do and I need to refresh on some simple stuff like syntax.

+1 this goes right along with my answer. I personally learned by doing the following: Choosing a project (that was probably way to hard as a first project), getting a programming book, learning the language basics I needed, and then learning the specifics in that subject.

People often forget: programming is just a tool or a skill. Its useless if you don’t know how to apply it to something useful in the real world like science or engineering or marketing. Its easy to learn, but harder to apply. The aproach Highwayman is illustrating is the absolute best thing you can do to truly learn programming. Books or websites are just nice for reference but mastery comes from experience.

@Ashwin Gupta The thing is… we are a club and the books in our library are long, boring, and outdated… this is why I am looking for great video tutorials (perhaps like on Treehouse) that can teach the python basics… and anyways if you’ve ever used mesh you’ll see the python is used somewhat differently then what they teach in a book… please check it out before commenting.

Look, I’m just giving you my opinion. Take it or leave it, I don’t care either way. :wink:

OFC it is going to be slightly different, so are RobotC and C, but the basic concepts and syntax are the same. Loops, boolean logic, if/else, functions, etc. are all going to carry over. The content on Treehouse is going to be no different then the content in a decent book, it simply is a different way of presenting that content.

I’m not saying Treehouse won’t work, I’ve never personally used it. I was just saying that books are usually really nice with lots of detail. They are also freely obtainable, which is a big plus.

Also, if you are looking at books as “long, boring, and outdated”, I wish you the best of luck with actually programming, which is a tedious, time-consuming, and high discipline/patience type of task that will require hard work and dedication.

@TitanRey15
For learning C to use with PROS, I would suggest the approach suggested by @Highwayman: start with a simple goal, and work toward it.

Before trying to make a program to run a robot, though, I would suggest going through the following. They aren’t videos, but there isn’t that much to go through, and there are interactive elements (I recommend completing the exercises at the bottoms of some of the pages - these will serve as the ‘goals’ for now).


printf()


<<=

(left shift AND assignment operator)

After getting through those, you can now program a basic driver control. For now, put all code in the


opcontrol.c

file. Treat the


operatorControl()

function like the


main()

function referenced in the guides above, just without the


return

at the end. Note the importance of the infinite loop (driver control shouldn’t just exit) and


delay()

(PROS background tasks run during this).

Sample goals, in order, to help become familiar with the PROS API and practice programming in C (assuming you have a classic 4-motor, tank drive robot):

  1. Make the robot drive forward at max speed all the time
  2. Make the robot drive forward at max speed if a specific controller button is pressed (otherwise stop driving)
  3. Make the robot drive at the speed set by a specific joystick channel (with forward on the joystick corresponding to the robot driving forward)
  4. Make the robot drive at the speed set by a specific joystick channel, with a deadband (only drive if the joystick channel returns greater than +15 or less than -15; otherwise stop driving)
  5. Make the deadband code cleaner by using absolute value (

abs()

function)
6. Implement a typical tank-style drive control scheme (separate control of the 2 sides of your drivetrain to 2 separate joystick channels, maintaining the deadband, etc.)

If you are unsure about what I mean by something, feel free to ask.

@Rick TYler Do you have anything to add regarding Robot Mesh?

@Ashwin Gupta. I was interested in your method of learning programming through books as I learnt Python fully through online course. I was wondering if you could recommend any good books for learning Python/C/C++. Thanks,
Atlantis

@Atlantis Where did you learn your python?

Hello TitanRey15, and sorry for the delay. We are busy getting a new version of Robot Mesh Studio ready for release, which includes Mimic CAD for EDR. This will be out shortly.

We are planning a V5 curriculum using Python, but it was delayed when the V5 was pushed back. We have Blockly curriculum for IQ, which includes lots of Python coding examples. You can read more about it at this link.

All Robot Mesh Studio programming options for both EDR and IQ generate Python, and you can always see the Python by clicking “Generated Code.” Except for the native Python option, which always show the Python. For beginning programmers I suggest starting with Blockly, looking at the Python, and as confidence grows, transition to pure Python. You can also take an existing Blockly project and copy it into a native Python project.

Our mimic builder allows you to build a robot in our CAD window, and then program it using any of our languages, which include Flowol (flow charts to program robots), Blockly (similar to Scratch), or Python. We are currently building a library of “template” robot models, which you can import to a project and then modify and program them. Our first templates will be available this week, so stay tuned for the announcement. We are producing videos now for the Mimic CAD release.

Usually I just check out whatever is available at my local library. Books tend to have a higher quality threshold then websites because they go through such a significant editing/publishing process. So you can’t really go wrong by just picking a book with decent reviews on Amazon.

For python specifically, I managed to obtain a free copy of “Learning Python” which is a really nice book for python specifically. I have the 2nd edition which is quite a few years old, but it looks like there is a 5th edition now which is updated for newer python 3 releases.

For C/C++ I have never personally read a book. By the time I got around to learning those languages I was well versed in OOP and the basics so I just used trial/erorr, online function definitions, and stackoverflow q and a to figure stuff out. However, I’ve heard good things about The C++ Programming Language