Go to Post [*]"Dewtoxification" is a real plague among teenagers. - JesseK [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
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 19-01-2017, 11:38
ckpash88 ckpash88 is offline
Registered User
FRC #5637
 
Join Date: Jan 2017
Location: Minneapolis
Posts: 13
ckpash88 is an unknown quantity at this point
First time with programming Java

Hello,

My team has basically started from the beginning and we are not sure how to program with Java. We were able to get everything downloaded and on the RoboRio. We are now trying to program our testbot that has 4 motor, 4 victor, tank drive, with one joystick.

The problem we have no one that really understands coding but we have a coach that can muddle himself through is he has video or tutorials to follow.
Reply With Quote
  #2   Spotlight this post!  
Unread 19-01-2017, 11:51
MuskieProgramme MuskieProgramme is online now
Registered User
FRC #6420
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2014
Location: Muscatine, IA
Posts: 19
MuskieProgramme is an unknown quantity at this point
Re: First time with programming Java

One really helpful resource is the Javadocs. Navigating it is pretty simple, you click on the class on the lower left and it displays information about the class. You'll probably want to look at the Victor and RobotDrive classes for what you're specifically using right now.

If you need specifically "How do I Java" rather than "How do I write robot code" I recommend Oracle's tutorials. It takes quite a bit of effort to learn if it's your first language, but it'll be significantly easier if you have prior experience with text-based programming (eg. not scratch).
Reply With Quote
  #3   Spotlight this post!  
Unread 19-01-2017, 12:30
ckpash88 ckpash88 is offline
Registered User
FRC #5637
 
Join Date: Jan 2017
Location: Minneapolis
Posts: 13
ckpash88 is an unknown quantity at this point
Re: First time with programming Java

To be more specific:
Is there a place where we can find videos, example of drive code and so forth.
Reply With Quote
  #4   Spotlight this post!  
Unread 19-01-2017, 12:45
MuskieProgramme MuskieProgramme is online now
Registered User
FRC #6420
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2014
Location: Muscatine, IA
Posts: 19
MuskieProgramme is an unknown quantity at this point
Re: First time with programming Java

So, you want this page of the WPILib documentation? I don't think there are any official videos or many official examples, but you can certainly search youtube or google.
Reply With Quote
  #5   Spotlight this post!  
Unread 19-01-2017, 13:05
Skyehawk's Avatar
Skyehawk Skyehawk is offline
Nuts N' Bolts
AKA: Skye Leake
FRC #0876 (Thunder Robotics)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2011
Location: Northwood, ND
Posts: 263
Skyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to all
Re: First time with programming Java

Quote:
Originally Posted by ckpash88 View Post
Hello,

My team has basically started from the beginning and we are not sure how to program with Java. We were able to get everything downloaded and on the RoboRio. We are now trying to program our testbot that has 4 motor, 4 victor, tank drive, with one joystick.

The problem we have no one that really understands coding but we have a coach that can muddle himself through is he has video or tutorials to follow.
Programming a robot is not a whole lot different than writing code for any other reason. Assuming you are sticking with the default project structure you will not need to get too in depth. There are some basic skills that everyone needs to understand for java, and by extension just about every other programming language.

First thing first: try to get default code running, nothing will frustrate you more than not knowing why your seemingly correct code isn't working. Default code is a great way to eliminate variables in the pipeline.

Look for tutorials on:
Java IDEs (familiarize yourself with the tools of the IDE you are using)
Data types
Logic
Imports (and later external libraries (libs))
Methods (functions)
Loops (and timing)
Java WPI robotics Library (for java)

Once you have those skills look into Java specific tutorials (object based languages):
Objects (classes)
Inhertance
Interfaces

At this point you should know enough to explore on your own, you will have a better handle on what you need to learn.

The 2017 control system paper should provide information on compiling and uploading code to the RoboRio

Community, please feel free to add/disagree with my java skills basics list.

Good Luck,
Skye Leake
__________________
My time in FIRST has made me a better person, frankly I don't know where I'd be without it.



2011 Lake Superior Regional Champs (Thanks 2512 & 3747)
2015 Central Illinois Regional Engineering Inspiration Award recipients
2016 Central Illinois Regional Champs (Thanks 2481 & 2220)

Last edited by Skyehawk : 19-01-2017 at 13:34. Reason: Update
Reply With Quote
  #6   Spotlight this post!  
Unread 19-01-2017, 13:17
Rangel's Avatar
Rangel Rangel is online now
John Rangel
FRC #0842 (Falcon Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Phoenix, AZ
Posts: 745
Rangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond repute
Re: First time with programming Java

I highly recommend following tutorials from FIRST on how to get started with programming in Java:
https://wpilib.screenstepslive.com/s/4485/m/13809

I would start with the following:
  1. Setting up the Development Environment
  2. Creating and Running Robot Programs
  3. FRC Java Basics
  4. Using actuators (motors, servos, and relays)

The other advice is good but I get the feeling you guys won't have the time to sit down and learn all the basics of Java. These guides should help you to get started and if you need help with anything, be sure to ask for help here detailing your problem. Feel free to message me directly as well if you would like.
__________________
2012 Dean's List Winner
2011-2014 Arizona Regional Winners
2016 Las Vegas Regional Winner
2014-? 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 13:15.

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