Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Introducing FRC Blocks - A starter program for FRC coding novices (http://www.chiefdelphi.com/forums/showthread.php?t=140553)

nickbrickmaster 23-12-2015 14:48

Introducing FRC Blocks - A starter program for FRC coding novices
 
FRC Blocks is a web interface that allows you to code FRC robots using an intuitive drag-and-drop interface. It compiles to Python in real time, allowing you to see the code that you "write". FRC Blocks is intended to be a bridge between drag-and-drop languages (scratch, labview) and more traditional programming languages.

FRC Blocks is great for:
  • Workshops
  • Demonstrations
  • Novice Programmers

I started this project as a way to get more members of my team involved in programming the robot, even if they have no prior experience or build season is only 3 weeks away.

Try it out (no persistence or runner)

View on GitHub

It's simple to install and use.
  1. Download FRC Blocks off github
  2. Install pyfrc on development computer and robot
  3. Start webserver (run.bat)
  4. Navigate to localhost:8000/cgi-bin/index.py
  5. Start coding! Use procedures named robotInit, teleopPeriodic, etc as starting points. All blocks are very similar to their robotpy counterparts.

Pneumatics, motors, some sensors, and joysticks are implemented. The live version does not spit out runnable code, as it needs a bootstrap IterativeRobot class, which is provided in the _runner.py file.

Disclaimer: I have not tried this on a robot yet. However, it works on the pyfrc simulator. I'll update this soon with info on robot testing.

DrWaSaBi 23-12-2015 15:22

Re: Introducing FRC Blocks - A starter program for FRC coding novices
 
Wow. Very cool. thanks for sharing. Will have to check it out in more detail tonight.

Dr W

Ari423 23-12-2015 16:04

Re: Introducing FRC Blocks - A starter program for FRC coding novices
 
This looks really cool! It's a little confusing at first without any instructions, but I got the hang of it after a few minutes. I will have to show this to my new programmers to introduce them to robot programming (as opposed to regular programming). I would love to see a good set of instructions, and pneumatic control.

Foster 23-12-2015 16:41

Re: Introducing FRC Blocks - A starter program for FRC coding novices
 
Blockly is cool, interesting the way that you've changed/extended it.

I've been using Snap! recently since it also allows you to create your own blocks.

How did you pick Blockly as your base?

nickbrickmaster 23-12-2015 17:09

Re: Introducing FRC Blocks - A starter program for FRC coding novices
 
Quote:

Originally Posted by Foster (Post 1514471)
Blockly is cool, interesting the way that you've changed/extended it.

I've been using Snap! recently since it also allows you to create your own blocks.

How did you pick Blockly as your base?

I've never heard of Snap! before now. I got this idea from MIT App Inventor 2, which uses Blockly.

Actually, after looking it up, I realize that I once used BYOB, a long while ago. Does that also compile to some language that uses wpilib?

Foster 23-12-2015 19:25

Re: Introducing FRC Blocks - A starter program for FRC coding novices
 
If you run Snap! and go into the examples look for Codification. It's a short example that produces C, Smalltalk, Javascript and Python.

virtuald 23-12-2015 23:50

Re: Introducing FRC Blocks - A starter program for FRC coding novices
 
Needs some refinement, but very cool.


All times are GMT -5. The time now is 02:57.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi