2 questions (programming)

  1. How does one go about changing the team #, we know that theres dip switches on the OI, but when we change them, the RC and OI don’t talk to each other. How do we change the team #?

  2. When we turn our robot on, the RC Hardware light is solid red, indicating a RC Fail. What does this mean, and how do we get it to go away?

Thanks for all your help.

  1. When you set the team number using the dip switches, connect the OI to the RC with the red Tether cable. Doing this allows the RC to “know” that the number of the OI that it is supposed to “listen to” has changed.

  2. As for the red light on your rc, it could be caused by several things.
    -Is the OI on and communicating with the RC?
    -Is there a code error?
    -Is your battery charged?
    -Another thing that could cause this light to be red is a short somewhere in your circuit. (This happened to us earlier). Check all of your connections to be sure that there is no short.

Thats usualy because your backup battery is dead

We are running our RC w/o the backup with no troubles…

i’l put this here…

would you happen to know where to find what the asignment of each input pin on the ports on the OI are. I am looking to make a switch that controls the auto mode form the OI. also, when the OI is disabled in the begining of each match, does the RC still process data from the OI… (can i code something into my autonomous function that looks for input pins on the OI?)

all of the switching is in main.c
you can force it into auton mode or disable it or whatever.
but doing so for the compitition is highly illigal and i would not advise it.
if you want a OI switch that puts it into auton mode i would sugest just getting a mockup-compition port and pluging it in to the OI. that way your code is still koshar for the compitition.

that is not the question i had… i was wondering if the RC processes data from the OI when in disabled or autonmous mode. If it does, i wanted to make a switch that would switch our auto programs (ex go for ball, hang, etc)

when the OI is in disabled mode, the robot sees it as off and no data at all is transmited or received. when it is in auton mode, it does send and recieve data, but because of the construction of the RC (i.e. 2 pics that talk to eachother) you cant get to any of the data while the auton bit is high. i believe if you call the getDataFromMasterRc() all of the vars will return 127. however if you got a second RS232 reciever you may be able to snatch some values. i doubt this is legal tho. your best bet is to put a switch on your robot and run out just before the match and flip it.

What we did last year and had sucess with and what we will be doing again this year is to just use some spst switches on some digital inputs and have the dude that puts it out on the field set them. For instance

switch 1 2
on on == hang
off on == release balls
on off == get large ball
off off == get moveable goal

I was under the impression that the RC was disabled at the beginning of the match, not the OI. I even wired a switch based on this. Like this
T RC Status
-xx:xx Disabled
00:00 Auton
00:15 regular

what?
The OI (I assume your talking about the “operator interface”) is “enabled” BUT your not allowed to read anything on it durring the autonomus period, like last year. The robot is to run entirly on its own (using rc inputs/sensors) or on its own dead reaconing. If you want an autonomus mode selector switch, it MUST be on the robot itself, it doenst matter how the rc reads the switches as long as you dont go over your $300 electronics limit (it was changed from $200 in one of the updates if you missed it). If the judges notice anything odd on your OI or in your code, they wont let you pass inspection.

Can you read it before the match? We wired a Left/Right switch on the OI to save weight. Plus, I made a cool little panel for it.

Basically, you put the code that sets the variable in user_rountines.c, and the auton code reads the variable, which would NOT be changed during auton mode because User_Autonomous_Code() has it’s own loop.

i dont know wether or not this would work. my understanding is that the robot must be off when it is placed on the field. also, i believe that the OI must be off (well duh) before power is aplied. the power is suplied thught the compititon port. therfore, as soon as the OI is powerd, it puts the robot in disabled mode, and no data, from swtiches or joystics or whatever, is send to the RC.

so i would say nope. but i may be wrong

That’s not how it’s working for me. When our competition port dongle is set to disable the robot and the yellow “disabled” light is on, communication happens as normal, and the RC sees the OI just fine. It just can’t set its outputs to control the actual robot hardware. When the dongle is set to “autonomous” and the yellow light is blinking, all data from the OI is read as default values.

I’m expecting this to be the case before a real match, so the robot can read our IO’s autonomous options switches in the time before autonomous mode is activated.

i think this would be worth a vistit to FIRST q&a because i know there have been at least 2 revisions to the OI - interface system sence it was released, thus the problems in DC. you may be apsolutly right, and i hope you are becasue we could eliminate a lot of confusion by getting rid of needless switches on our bot. but last year our team tried something similar and it resulted in bad stuff. like, we went barrling into the wall and got a warning for field damage :confused:

Rule book 4.3.1ish

AUTONOMOUS PERIOD - During this 15-second period, the ROBOTS operate and react only to sensor
inputs and to commands programmed by the team into the onboard robot control system. Human control of
the ROBOT will not be possible during this time. During this period, ROBOTS may perform any activities
that would be permissible when operated under human control. All ROBOT operation and safety rules
applicable during the operator control period are also applicable during this period.

You could test if you can get control input by creating your own competition port which is in one of the innovation first documents…

In a real match, the full competion port will be used.

Wow …

If you don’t know the answer to a question, PLEASE don’t respond.

When the robot is set to disabled mode by the Operator Interface, data IS transmitted and data IS received. The ONLY thing that is different when the robot is in disabled mode is that all PWM outputs are set to 127 and all Relay outputs are set to 0. Operator Interface inputs can still be read in by the robot.

During the autonomous period, the reverse happens – outputs function normally, but the robot sees all OI input as 0 for switches/buttons and 127 (neutral) for joystick axes and pots.

This means, YES you can put switches on the control board to choose autonomous programs and all will work wonderfully.

thats what I figured.

Human control of the ROBOT will not be possible during this time.

The way they worded it suggests that

okay my bad.