Go to Post Thanks, that clears things up a lot, and should probably have been obvious. - Branden Ghena [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-12-2015, 14:48
nickbrickmaster's Avatar
nickbrickmaster nickbrickmaster is offline
Not Allowed Near Power Tools
AKA: Nick Schatz
FRC #3184 (Blaze Robotics)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Eagan MN
Posts: 165
nickbrickmaster is an unknown quantity at this point
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.
__________________
I have approximate knowledge of many things.

FRC 3184: 2014-, FTC 10648: 2015-

Last edited by nickbrickmaster : 23-12-2015 at 23:56. Reason: Update to current version
  #2   Spotlight this post!  
Unread 23-12-2015, 15:22
DrWaSaBi's Avatar
DrWaSaBi DrWaSaBi is offline
Registered User
FRC #1711 (The RAPTORS)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Traverse City, Mi. USA
Posts: 9
DrWaSaBi is an unknown quantity at this point
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
  #3   Spotlight this post!  
Unread 23-12-2015, 16:04
Ari423's Avatar
Ari423 Ari423 is offline
LabVIEW aficionado and robot addict
AKA: The guy with the yellow hat
FRC #5987 (Galaxia)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2012
Location: Haifa, Israel
Posts: 658
Ari423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud of
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.
__________________
2017-present: Mentor FRC 5987
2017-present: CSA for FIRST in Israel
2012-2016: Member FRC 423
2013: Programmer
2014: Head Programmer, Wiring
2015: Head Programmer, Wiring
2016: Captain, Head Programmer, Wiring, Manipulator, Chassis, CAD, Business, Outreach (basically everything)


  #4   Spotlight this post!  
Unread 23-12-2015, 16:41
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,394
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
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?
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
  #5   Spotlight this post!  
Unread 23-12-2015, 17:09
nickbrickmaster's Avatar
nickbrickmaster nickbrickmaster is offline
Not Allowed Near Power Tools
AKA: Nick Schatz
FRC #3184 (Blaze Robotics)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Eagan MN
Posts: 165
nickbrickmaster is an unknown quantity at this point
Re: Introducing FRC Blocks - A starter program for FRC coding novices

Quote:
Originally Posted by Foster View Post
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?
__________________
I have approximate knowledge of many things.

FRC 3184: 2014-, FTC 10648: 2015-
  #6   Spotlight this post!  
Unread 23-12-2015, 19:25
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,394
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
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.
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
  #7   Spotlight this post!  
Unread 23-12-2015, 23:50
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,102
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Introducing FRC Blocks - A starter program for FRC coding novices

Needs some refinement, but very cool.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:14.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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