In an education culture that hinges on having the perfect grades and perfect SAT scores to get into the perfect colleges, I enjoy providing an environment where students are encouraged to test their own hypothesis, challenge their assumptions, and regularly fail. - Michael Corsetto [more]
 Chief Delphi Arm Turning (programming)
 CD-Media CD-Spy
 portal register members calendar search Today's Posts Mark Forums Read FAQ rules

#1
02-13-2002, 06:40 PM
 Joelster Registered User #0758 (Roboticats) Join Date: Feb 2002 Location: Blenheim Posts: 11
Arm Turning (1 button programming)

ok......i have asked several questions about the turning of the arm......slowly but surely with all of your help our control team has figured out a simple program to make the arm turn with ONE BUTTON!!!! Thanx for everyone's help and please reply here or pm me if you have any questions!!! Our team will be glad to help out. Here is the code for everyone who needs it

'-----------------------------------------
'------------- Tbar Turn -----------------
'-----------------------------------------

'--------
'-- #1 --
'--------

if logged = 1 then hopskipjump:

if count1 = 1 then skippy:
if p1_sw_top = 0 then out:
if p1_sw_top = 1 then in:
in:
relay1_fwd = 1
relay1_rev = 0
count1 = 1
goto hopskipjump:
out:
skippy:

if count1 = 0 then jumpy:
if p1_sw_top = 0 then outy:
if p1_sw_top = 1 then iny:
iny:
relay1_rev = 1
relay1_fwd = 0
count1 = 0
outy:
jumpy:

hopskipjump:
logged = p1_sw_top

Last edited by Joelster : 02-13-2002 at 06:50 PM.
#2
02-13-2002, 06:53 PM
 OddOne Registered User #0990 Join Date: Feb 2002 Location: Las Vegas, Nevada Posts: 12
That's sweet.

But why did you use outy: and jumpy:? Couldn't you use hopskipjump: instead since it goes to the same place? It would save your memory and processor from having to process those lines.

Mike
The "Odd" one
#3
02-13-2002, 06:57 PM
 Joelster Registered User #0758 (Roboticats) Join Date: Feb 2002 Location: Blenheim Posts: 11
dont know

the one who programmed it decided to use those words for the heck of it
#4
02-13-2002, 07:01 PM
 Joelster Registered User #0758 (Roboticats) Join Date: Feb 2002 Location: Blenheim Posts: 11
oh yah

The code works!!!! It doesnt need any editing if you just wanted to know!!!
#5
02-13-2002, 08:35 PM
 758controls Registered User #0758 (Roboticats) Join Date: Jan 2002 Location: Blenheim. Ontario, Canada Posts: 1
Yeah.. Now that I look at it

Now that I look at it, it is the same address.. I don't think that they were the first time I wrote it .. but now that it has been edited..

Thanks.. I'll remove those two lines from the code.

I also probably wrote it that way because I'm use to nested "if" statements so I always want to end an "if" statement. I sure wish they would get away from using PBASIC as a programming language though, me and my team all hate it.

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     User Announcements FIRST     General Forum         FIRST E-Mail Blast Archive     Rumor Mill     Career     Robot Showcase Technical     Technical Discussion     Robotics Education and Curriculum     Motors     Electrical         CAN     Programming         NI LabVIEW         C/C++         Java         Python     Control System         FRC Control System         Sensors     Pneumatics     Kit & Additional Hardware     CAD         Inventor         SolidWorks         Pro ENGINEER / Creo     IT / Communications         3D Animation and Competition         Website Design/Showcase         Videography and Photography         Computer Graphics     National Instruments LabVIEW and Data Acquisition         LabView and Data Acquisition Competition     Awards         Chairman's Award     Rules/Strategy         Scouting         You Make The Call     Team Organization         Fundraising         Starting New Teams         Finding A Team         College Teams     Championship Event     Regional Competitions     District Events     Off-Season Events     Thanks and/or Congrats     FRC Game Design     OCCRA         OCCRA Q&A         OCCRA Programming Other     Unsung FIRST Heroes     Chit-Chat         Games/Trivia             Fantasy FIRST     Car Nack's Corner     College & University Education     Dean Kamen's Inventions     FIRST-related Organizations         Western Region Robotics Forum         Southern California Regional Robotics Forum         FIRST Interactive Rural SupporT         FIRST Scouting Network         FIRSTwiki         The Blue Alliance             Video Archives     FIRST In the News...     FIRST Lego League         Lego Mindstorm Discussion     FIRST Tech Challenge     VEX         VEX Robotics Competition         VEX IQ     Televised Robotics     Math and Science         NASA Discussion ChiefDelphi.com Website     CD Forum Support     Extra Discussion Old Forum Archives     1999     2000     2001

 Similar Threads Thread Thread Starter Forum Replies Last Post Balance while turning? sanddrag Dean Kamen's Inventions 8 09-26-2003 04:18 PM Reflected Inertia? archiver 2001 9 06-24-2002 02:50 AM Controlling Arm travel - Limit Switch or Mechanical Stop? archiver 2001 8 06-23-2002 10:55 PM Correction for arm skyfw Programming 6 04-06-2002 08:59 PM telescoping arm & ten second rule Ben Mitchell Rules/Strategy 4 02-18-2002 08:37 PM

All times are GMT -5. The time now is 04:40 PM.

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

 -- English (12 hour) -- English (24 hour) Contact Us - Chief Delphi - Rules - Archive - Top