Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   New Programming Manual (http://www.chiefdelphi.com/forums/showthread.php?t=85836)

rhoads2234 05-18-2010 09:03 AM

New Programming Manual
 
Hi Everyone!
I am creating a programming manual/tutorial/ how-to book for people getting started in Java.

I want to make sure that I am including all of the important points and references.
So far, I have
- link to FIRST's instructions on how to download NetBeans
-How to open and download Default code
-Set IP Address and reimage
-download your code
-Creating your own Drive code (This section needs work. I bring up all the premade functions, but am working on how to describe other possible drivetrains)
-Basic custom control (Joystick to motor. -- might end up including Joystick to servo)
-Set up your radio/wireless system
-inverting a motor
-Basic vocabulary (syntax, servo... Things that a rookie might not know)
-How to set up your own motors,sensors, and other objects. Along with Variables and constants

Is there anything more that people want to see? (I have more sections that I plan to add, but these are the ones I am working on or have finished)

Eventually, I plan to post the completed thing here and on our website (It's not on this computer.)

DonRotolo 05-18-2010 08:58 PM

Re: New Programming Manual
 
Quote:

Originally Posted by rhoads2234 (Post 962694)
Eventually, I plan to post the completed thing here and on our website

Think about posting draft versions of each section as you go along; we'll critique it for you, no charge.

Let me start out by saying that I know almost nothing about programming an FRC robot. And even less about Java.

The section on hardware- driver station, wireless, IP, and such should also include a troubleshooting guide, what are common problems one might see and where can I start looking. Include info on what to do when the router (for example) is totally farkled. Also, links to detailed info about the item, such as voltage and other specs (owners manuals?)

Consider the real beginner who might have nothing but your guide. Spend 3 or 4 pages on a step by step going from nothing to installing some code (supplied) that will at least make one motor respond to a joystick. And a basic wiring diagram (or link to one) so the programmer has some basis in reality.

How to read a digital input (and a sample circuit), how to set a digital output, how to read an analog input (and a sample circuit - use a potentiometer). Knowing that, I can read any sensor on the planet.

Last but not least, a half page on good programming practice: Commenting code as you write it, compartmentalizing/modularizing code, etc.

rhoads2234 05-19-2010 09:35 AM

Re: New Programming Manual
 
1 Attachment(s)
So here it is so far. It still need a lot of help with wording, and I am concerned that I don't have all the major points. Please comment on anything you think would be good to include, change or take out!

The last section is only half done, and I think if I rearranged the Sections, it would make more sense. (But I don't know what order would make the most sense. - Help please?)

rhoads2234 05-19-2010 10:46 AM

Re: New Programming Manual
 
Has anyone worked out Version Control on Netbeans? I know its built-in, but I didn't quite figure it out, instead I just made a new project....

rhoads2234 05-20-2010 10:49 AM

Re: New Programming Manual
 
I've just begun adding section on how to read a sensor to control a motor (analog or digital and on the driverstation or off of it)
Sensors included are limit switches, potentiometers, general analog, analog sensor on DS, and buttons on the DS. Is there anything else I should include?

It includes code. I haven't worked with an accelerometer myself, so I don't know when or how you would use it. How it is normally used?

Jared Russell 05-21-2010 07:52 AM

Re: New Programming Manual
 
Quote:

Originally Posted by rhoads2234 (Post 963045)
I've just begun adding section on how to read a sensor to control a motor (analog or digital and on the driverstation or off of it)
Sensors included are limit switches, potentiometers, general analog, analog sensor on DS, and buttons on the DS. Is there anything else I should include?

It includes code. I haven't worked with an accelerometer myself, so I don't know when or how you would use it. How it is normally used?

There are three "common" uses for accelerometers that I know of:

1. Setting an "acceleration threshold" and getting alerted when the vehicle experiences a sudden acceleration greater than this. This is how they are used for deploying airbags, for example.

2. With a 3-axis accelerometer that is stationary, you can determine the direction of gravity. Accelerometers measure acceleration relative to a free fall, so on a stationary platform, you will always read a total acceleration of +1G upwards (the normal force of the ground pushing back on you). If the Z axis is the up-down axis, then when your accelerometer is flat on the ground you expect to read +1G on the Z accelerometer, and 0G on the X and Y accelerometers. But if you are pitched 45 degrees into the X axis, you would instead expect to read +sqrt(2) G in both the X and Z axes, and 0G in Y.

3. By integrating the output of an accelerometer, you obtain a speed estimate (since acceleration is the time derivative of velocity). If you integrate it again, you obtain position (since velocity is the time derivative of position). So accelerometers can be used (typically along with gyros, magnetometers, and/or compasses for angular measurements) as part of an IMU, or inertial measurement unit. However, these systems tend to drift over time - if your acceleration measurement is noisy at all, the noise will be compounded over time by your (double) integration.

rhoads2234 05-21-2010 10:13 AM

Re: New Programming Manual
 
1 Attachment(s)
It seems to me that an accelerometer wouldn't be a common sensor for a beginner programmer to use.
- That said, does anyone have an excerpt of code I could use?

And here is a more recent copy of the manual. (accelerometer section is blank. Working on a good way to explain it. I think I might use Jared's explanation)

rhoads2234 05-21-2010 10:32 AM

Re: New Programming Manual
 
Sorry. I didn't realize that moving the document from word 2007 to 2003 compatable would make the page numbers be all funky. I've fixed it for the next version, but I am going to wait until I have a few more changes before post the new one.

rhoads2234 05-21-2010 11:39 AM

Re: New Programming Manual
 
I realized I forgot to add encoders on the sensor list. They are now included!

Robototes2412 05-21-2010 10:00 PM

Re: New Programming Manual
 
I know this is a nerd turf war thing (http://xkcd.com/743), but can you please use a more open document format? It is about 1.5 times faster for Word to read OpenDocument Text than its own format (ROFL).

And I use OO.O, and disabled m$ compatibility.

rhoads2234 05-24-2010 09:30 AM

Re: New Programming Manual
 
1 Attachment(s)
Here's the newest version - I've started adding in pictures.

Note: I will move the Tabbing section. I just wrote it, so right now it is at the bottom. It will soon be higher up.

I'm still looking for accelerometer code - If you have it in C++, I can just do the small changes to make it into Java.

If you have anything you'd like to see added or clarified, please PLEASE tell me!

rhoads2234 05-24-2010 09:33 AM

Re: New Programming Manual
 
Quote:

Originally Posted by Robototes2412 (Post 963338)
I know this is a nerd turf war thing (http://xkcd.com/743), but can you please use a more open document format? It is about 1.5 times faster for Word to read OpenDocument Text than its own format (ROFL).

And I use OO.O, and disabled m$ compatibility.

How do you convert it from a Word doc to OpenDocument? I didn't see how.
I can easily convert it to a pdf if that would work for you. - Why would you disable ms compatablity? A lot of places send their stuff in MS office formats.

rhoads2234 05-24-2010 09:44 AM

Re: New Programming Manual
 
I don't recommend printing it out yet, I thought that the page references would automatically update, but turns out that they don't, they still link to the right spots in the text, but the numbers themselves are wrong. That'll be difficult to fix, but it should be good (mostly) by the next version.

Robototes2412 05-24-2010 02:20 PM

Re: New Programming Manual
 
hit ctrl-shirt-s, choose odt

Daniel_LaFleur 05-24-2010 03:17 PM

Re: New Programming Manual
 
Quote:

Originally Posted by rhoads2234 (Post 963594)
How do you convert it from a Word doc to OpenDocument? I didn't see how.
I can easily convert it to a pdf if that would work for you. - Why would you disable ms compatablity? A lot of places send their stuff in MS office formats.

You seem to be using an older version of Word (hence the .Doc and not .Docx format). Word 2003 and prior doesnt convert to OpenDoc format. I'd suggest you not convert to openDoc anyways as the formatting can become Borked, and instead convert it to a .PDF (use CutePDF writer, it's free and works great ... to the PC it's just another printer) and post it in that format since most can get an acrobat reader free, if they don't alreadyt have it.


All times are GMT -5. The time now is 08:07 AM.

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