Go to Post I'm missing JVN's build log this year ! - lynca [more]
Home
Go Back   Chief Delphi > Competition > OCCRA > OCCRA Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 30-09-2008, 15:11
iwanttodunk iwanttodunk is offline
Registered User
None #1188
 
Join Date: Sep 2008
Location: Royal Oak
Posts: 26
iwanttodunk is on a distinguished road
[OCCRA]: Template

We are trying to use the new template required for the vex to program in a push button, we are having difficulty getting this to work in the autonomous part of the template. Are there any tips or advice to help us with this and using the template in general? The problem we think is that when attempting to use the push button to start it always jumps to the else statement. Could someone please post an example on using a push button to start autonomous with this new template?
Reply With Quote
  #2   Spotlight this post!  
Unread 01-10-2008, 06:17
Mike Martus's Avatar Unsung FIRST Hero
Mike Martus Mike Martus is offline
Registered User
FRC #0051 (Wings of Fire)
Team Role: Coach
 
Join Date: May 2001
Rookie Year: 1996
Location: Pontiac Michigan
Posts: 1,187
Mike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond reputeMike Martus has a reputation beyond repute
Re: [OCCRA]: Template

Unless I am wrong you are NOT required to use the template......

This question will be forwarded to the creator Marc Center.
__________________
Mike Martus
Reply With Quote
  #3   Spotlight this post!  
Unread 01-10-2008, 10:59
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Talking Re: [OCCRA]: Template - autonomous

Mike,
I think you are wrong. I have not personally used the template before, however, FTC has used similar templates before. The template allows us to automatically jump from 15 second autonomous (no remote control operation) to remote control operation for the 120 second period.

I imagine that the programming blocks used for remote control operation will
not work in the autonomous program block. Whether you can actually copy and paste them, and then they don't operate as expected or Easy_C doesn't even allow you to copy the remote control functions into the autonomous template - I will do some experimentation when I get home.

Can you post your program so I can look at it? You will need to find two files associated with our program, zip them together and then post with your message. At first blush, once autonomous is activated, reading a switch
should operate without much issue. Are you using an IF statement like
(If variable = pressed ) [ This is always true and the ELSE statement will never be run], rather than the proper statement (IF variable == pressed) [ Note the double equal sign].

Last year there was no need to use a template because we were running autonomous operation only. With this year's introduction of remote controlled period, use of the template became meaningful.
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
Reply With Quote
  #4   Spotlight this post!  
Unread 01-10-2008, 16:47
iwanttodunk iwanttodunk is offline
Registered User
None #1188
 
Join Date: Sep 2008
Location: Royal Oak
Posts: 26
iwanttodunk is on a distinguished road
Re: [OCCRA]: Template

To clarify for the 2008 football frenzy for vex, do we or do we not need to use the new template for our Vex programs?
Reply With Quote
  #5   Spotlight this post!  
Unread 01-10-2008, 21:17
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Lightbulb Re: [OCCRA]: Template

Please download the OCCRA programming Basic workshop (in Microsoft Powerpoint format) held September 13, 2008 contained in this forum. You will find your answer on page 2, item #6. This is the official answer until otherwise notified. Can you upload your code so I can look at what you have programmed so far to see if I see any issues?

P.S. Last night I read in the VEX instructions that the VEX transmitter must be turned on (enabled) in order to
enable autonomous operation with a template. Have you tried adding the receiver module to the robot, enabling
the Transmitter, and the pushing the button to start your program?
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377

Last edited by marccenter : 02-10-2008 at 09:42. Reason: Added last sentence
Reply With Quote
  #6   Spotlight this post!  
Unread 06-10-2008, 14:46
iwanttodunk iwanttodunk is offline
Registered User
None #1188
 
Join Date: Sep 2008
Location: Royal Oak
Posts: 26
iwanttodunk is on a distinguished road
Re: [OCCRA]: Template

Could you please explain how to upload the program so we can post it to you?
Reply With Quote
  #7   Spotlight this post!  
Unread 06-10-2008, 14:52
iwanttodunk iwanttodunk is offline
Registered User
None #1188
 
Join Date: Sep 2008
Location: Royal Oak
Posts: 26
iwanttodunk is on a distinguished road
Re: [OCCRA]: Template

pushbuttontrial.zip
Our programming for our push button is in the zipped folder that should be posted with this..
Reply With Quote
  #8   Spotlight this post!  
Unread 06-10-2008, 15:05
iwanttodunk iwanttodunk is offline
Registered User
None #1188
 
Join Date: Sep 2008
Location: Royal Oak
Posts: 26
iwanttodunk is on a distinguished road
Re: [OCCRA]: Template

Sorry, the last posted zipped folder does not contain both required folders.
pushbuttontrial.zip
Reply With Quote
  #9   Spotlight this post!  
Unread 07-10-2008, 09:25
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Talking Re: Digital Switch input configured as analog input

Dear RO Ravens,
Thanks for being brave and posting your question on CD.

Your controller configuration is configured as an analog input for channel 1. You need to change it to a digital input. Will attach powerpoint pdf file showing information. Have you worked your way through the VEX inventors manual?
If you cannot find the VEX manual at your school, you can download it from the VEX website directly. I think you will find the 4 hours you invest in working through the manual extremely beneficial - it would have shown you how to select the digital input for your simple example.

Please let me know if you find any other issues after spending the time going the VEX inventors manual.
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377

Last edited by marccenter : 19-11-2012 at 17:13.
Reply With Quote
  #10   Spotlight this post!  
Unread 08-10-2008, 14:41
iwanttodunk iwanttodunk is offline
Registered User
None #1188
 
Join Date: Sep 2008
Location: Royal Oak
Posts: 26
iwanttodunk is on a distinguished road
Re: [OCCRA]: Template

We changed the analogue input to digital input and when we downloaded it to the robot, the push button still didn't work. We've been trying to fix this for a while. We'll repost our program with the input changed.
Attached Files
File Type: zip pushbuttontrial.zip (1.4 KB, 82 views)
Reply With Quote
  #11   Spotlight this post!  
Unread 08-10-2008, 22:38
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Re: [OCCRA]: Template

This template and pushbutton work on my VEX robot at home. Please try it on yours. You will need to wire the Start Button to digital input 5 in order to make the program work.

Here were the issues I found with your program

1) Your configuration template still had input one configured as analog and not digital. The default configuration uses input 5 as a digital input. Whatever you are doing will be fixed by wiring a Start push button switch to input position 5.

2) You did not latch or save the value of the switch. The program runs very fast. Your original program would have run for two seconds after you pressed start switch (only because of your 2000 msec wait loop). On the next loop, once you let off the switch, the program would now read a one (not pressed) and stop the motors. The solution is shown and once the switch reads a zero (0 = pressed), you need to latch or save the value in a variable that is different than just reading the value (which happens in only one place and is very fast). The variable should be initialized as the not pressed state in order to not have the software think that at start up initialization that it has already been pressed.

3) I added a remote control tank function block in both autonomous and operator control. The tank works only in operator control as expected.

4) After you program the robot, you always need to cycle the power (turn it off then on). Using the terminal window for debugging, I turned on the robot and quickly pressed the Start Button. Watch the print statements that I have added to help debug the program. The autonomous program starts[Print] , the Start Switch is pressed [Print] and the robot moves forward [Print] (with 800 msec wait loop for print statement) . If you don't press the Start Switch, you receive another print message in the terminal window (Motor Stop) [Print].

5) The terminal window will also show when the Autonomous mode is operational (15 seconds), and show when Operator Control Mode becomes active (120 seconds). I watched the terminal window while cycling the power on, and quickly pressing the start switch. I ended up counting 15 print statement messages indicating that the motor was moving forward for the 15 seconds of the autonomous period.
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377

Last edited by marccenter : 19-11-2012 at 17:13.
Reply With Quote
  #12   Spotlight this post!  
Unread 10-10-2008, 15:55
iwanttodunk iwanttodunk is offline
Registered User
None #1188
 
Join Date: Sep 2008
Location: Royal Oak
Posts: 26
iwanttodunk is on a distinguished road
Re: [OCCRA]: Template

Thank you, and i will take a look at the program and adjust to see if that will work. Now for the OCCRA competition we need to use the template correct? cuz i thought we do but then if so do we need to use the push button to start? Or may we have it start on its own from the template? I know they stressed before about using the push button to start but does that still apply now that we have the template to use? Thank you for your time spent with ur guidance
Reply With Quote
  #13   Spotlight this post!  
Unread 11-10-2008, 07:40
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Smile Re: [OCCRA]: 3 stage start sequence for autonomous

RO Raven,
Yes. We should still use the start push button inside of the autonomous template for safety reasons. So, the start sequence becomes a three stage sequence: 1) turn on the VEX controller, 2) turn on the VEX transmitter to
activate the autonomous portion of the OCCRA VEX template, 3) press the start switch for the robot to start the autonomous program.
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
Reply With Quote
  #14   Spotlight this post!  
Unread 29-10-2008, 14:43
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Smile Re: [OCCRA]: V1 Template

Dear Teams,
If some of you are just opening up your VEX robots and programming them to use the new OCCRA template, please take a look at this program. I have programmed some basic features into both the autonomous and operator controlled sections to provide a starting spot for you.

1) Autonomous Control and Operator Control operation have print statements to show you how the the software operates - see the terminal window

2) In order for the OCCRA VEX template to work properly you must use the VEX transmitter and matching receiver module or the tether cable. In this example, you must turn on the Vex transmitter and then hit start button (wired to digital input 5) to start the program.

3) Digital input 6 has been configured to stop program operation in both autonomous and operator control. You should be able to stop and then restart autonomous control (within the 15 second window). You cannot restart operator control as written.

4) This may become the starting OCCRA VEX template for 2009. Please email me if you are successful with using this program.

Thanks,
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377

Last edited by marccenter : 09-05-2016 at 22:12.
Reply With Quote
  #15   Spotlight this post!  
Unread 29-10-2008, 21:02
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Thumbs up Re: [OCCRA]: Template Example V2

Teams,
Here is an enhanced version of V1, OCCRA_2008_V2, that includes the use of a Timer to allow you to see, in time, when:
1) Autonomous starts
2) After VEX transmitter is turned on, Press Start Button
3) As autonomous runs
4) If stop is pressed during autonomous, see the time
5) If run is pressed again, after stop, in autonomous, see the time

6) Operator control time start and run
7) Time if stop switch is pressed in operator control mode

Please remember that after downloading a new program using the base 2008 OCCRA template that you need to cycle (turn off, turn on) the power to
the VEX microcontroller in order for it to start the program you have just
downloaded.

Cheers, Go OCCRA Teams!
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377

Last edited by marccenter : 09-05-2016 at 22:11.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[OCCRA]: 2008 OCCRA Easy_C Programming Template marccenter OCCRA Programming 2 22-11-2008 22:11
PHP template engine Ryan M. Website Design/Showcase 4 26-11-2004 18:22
Template Project Astronouth7303 Programming 10 30-05-2004 20:05
Project Template File Jon Abad General Forum 1 12-01-2002 18:04
Microsoft Project Template Jordan A. General Forum 1 06-01-2002 14:40


All times are GMT -5. The time now is 21:44.

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