OCCRA
Go to Post After talking with the students on these teams I could see the light in their eyes. These were their robots! Inspired? That would be a definate YES! - Steve W [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-11-2018, 12:33 PM
BenjaminRowe's Avatar
BenjaminRowe BenjaminRowe is offline
Registered User
FRC #5147 (Hornets)
Team Role: Programmer
 
Join Date: Jan 2017
Rookie Year: 2016
Location: Fulton, MO, USA
Posts: 62
BenjaminRowe is a splendid one to beholdBenjaminRowe is a splendid one to beholdBenjaminRowe is a splendid one to beholdBenjaminRowe is a splendid one to beholdBenjaminRowe is a splendid one to beholdBenjaminRowe is a splendid one to beholdBenjaminRowe is a splendid one to beholdBenjaminRowe is a splendid one to behold
Command Based

Does anybody have any examples of java command based for robots a bit on he simpler side? I'm trying to transition our team but all of the releases I can easily find are more advanced and hard to follow, thanks in advance!
Reply With Quote
  #2   Spotlight this post!  
Unread 10-11-2018, 12:51 PM
Brian Selle's Avatar
Brian Selle Brian Selle is offline
Software/Mechanical Mentor
FRC #3310 (Black Hawk Robotics)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Texas
Posts: 233
Brian Selle has a reputation beyond reputeBrian Selle has a reputation beyond reputeBrian Selle has a reputation beyond reputeBrian Selle has a reputation beyond reputeBrian Selle has a reputation beyond reputeBrian Selle has a reputation beyond reputeBrian Selle has a reputation beyond reputeBrian Selle has a reputation beyond reputeBrian Selle has a reputation beyond reputeBrian Selle has a reputation beyond reputeBrian Selle has a reputation beyond repute
Re: Command Based

The WPI IDE plug-in includes a simple project that includes one subsystem and one command. I typically start teaching with this project on a control system test board, takes 3 steps:

1) add a motor controller and a setSpeed() method to ExampleSubsystem
2) call the setSpeed() method from the ExampleCommand initialize() method
3) add a button on the SmartDashboard to trigger the command in OI.java.

If you are using the 2018 libraries in Eclipse, go to File->New->Other->WPILib Robot Java Development->Robot Java Project then select Command-Based Robot. You can also create it using the new Alpha libraries in VS code (can't remember the exact path... start with button in the upper right corner).
__________________
http://www.team3310.com/
Reply With Quote
  #3   Spotlight this post!  
Unread 10-11-2018, 12:53 PM
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 2,386
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Command Based

Try this presentation:

http://team2363.org/2016/11/command-based-java-for-frc/
Reply With Quote
  #4   Spotlight this post!  
Unread 10-11-2018, 03:08 PM
gixxy's Avatar
gixxy gixxy is offline
Programming Mentor
AKA: Gustave Michel III
FRC #3468 (MAGNATech)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 243
gixxy is on a distinguished road
Re: Command Based

Brad Miller's Tutorial from 2013 is still a very good walkthrough of the Command-Based Structure, even if a few things have changed since then (most namely, the removal of the CommandBase, in favor of initializing subsystems in the main Robot class.
https://www.youtube.com/watch?v=k7Pa...lgn vhGObeKzp

Here is my "data-flow" diagram I use when trying to explain the Command-Based Structure:
https://drive.google.com/open?id=1wH...wEHbQEw92H No

and here is the code repository for 3468's T-Shirt Cannon. It should be more than simple enough to get the idea across (perhaps too simple?):
https://github.com/frc3468/CharlotteAirCannonJava

Best of Luck! I welcome any comments, suggestions, or questions.
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 2018 - 3946 - Programming Mentor
2014, 2018 - Present - 3468 - Programming Mentor
Reply With Quote
Reply


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 01:21 AM.

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


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi