Announcement

Collapse
No announcement yet.

Using FTC in AP-Computer Science Principles class

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Alec
    replied
    I agree with Alan. I believe LinearOpMode was created to cater to programmers that were tainted by the old NXT programming environment.

    Leave a comment:


  • alan_16072
    replied
    My concern is that the LinearOpMode class is a hack on top of the OpMode class. LinearOpMode is derived from OpMode. Basically the init from OpMode spawns a thread for LinearOpMode.

    If you get a team to implement their classes as OpModes (instead of Linear OpModes) it is a little more difficult to begin with, but allows for some very powerful possibilities. For example, you can create a class that does things on every iteration of the loop that your classes can then derive from. The OpMode method is also much closer to how the Java works for FRC as well as most embedded systems I have worked on. You do have to think a little more about states or steps in your autonomous, but that links into teaching students about state machines.

    I think the example code is fine for example code. However, as I tell my students - they are trying to show an example not give a coding style that is easy to expand off of.

    --Alan

    Leave a comment:


  • 3805Mentor
    replied
    I'm not sure what level you are concerned about.
    At one level the rules (RS05) say that you have to use the FTCRobotController app. It has OpMode and LinearOpMode modes, so you are stuck with this standard. There are examples for both modes. One thing to be aware of is in the OpMode mode the IO happens outside of the loop method, so you can't write blocking code. The loop method is what is called repeatedly after start is pressed.

    Or is your concern that the example code isn't written in a style that you would prefer to see? There are teams that have written extensive code that they have shared. One is Titan -
    https://github.com/trc492

    Leave a comment:


  • alan_16072
    replied
    I'll offer the quick start curriculum I wrote for our team. It uses regular opModes (I think that is a much better way to do things especially if you look at how LinearOpModes are implemented....)

    https://docs.google.com/presentation...it?usp=sharing

    It took our students 2 meetings to go through the whole thing. (in pairs)

    After we had four students go through it, we had some of those students lead the next pairs.

    Leave a comment:


  • ftcsachse0
    replied
    I think it is a great idea. Having something the students find interest in helps tremendously.

    The elephant in the room for it is that you have to write the curriculum. I am developing a crash course for my group, and find most existing tutorials to be lacking. Much of it centers around linear op modes. I wouldn't want to base a robot in such myself. I would like to see my teams learn quality code that is easy to understand an maintain.

    Leave a comment:


  • jkenney
    replied
    This isn't an answer to your question, but...

    If it would be of any help, you could try this FTC Programming 2D Simulator from FTC Team 8397:

    https://www.youtube.com/watch?v=ho0f...ature=youtu.be

    It has three simple robot configurations (two-wheeled, 4-Mechanum wheel, and X-Drive) that you write op modes for, to operate DC Motors, Servo, Gyro, Color Sensor, and Distance Sensors, telemetry, and one gamepad. Adding additional robot configurations is more involved than writing op modes, but still not terribly complicated. Since the video was posted, we have modified the project to use a real gamepad (just plug it in to the computer), instead of the "virtual gamepad" shown on the video. If you try it and have any issues with it, feel free to post to our github repository.

    Leave a comment:


  • FTC2858
    started a topic Using FTC in AP-Computer Science Principles class

    Using FTC in AP-Computer Science Principles class

    I'm implementing AP-CSP in our small school next year and would like to integrate FTC as the primary project, if possible. Are there other teams already doing this?
    Thanks!
Working...
X