View Single Post
  #5   Spotlight this post!  
Unread 28-07-2008, 15:20
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: VEX Radio Range & Loss of Radio Fail Safe?

Chris,

I just built a 12lb battle bot with a vex controller and it is possible to enter a run away condition. The system seems to retain the last value sent by the controller and if it fails to sync it will send that to the motors. The range was about 15ft for my robot but the motors could have been causing allot of noise. The problem is very easy to fix the controller has flags to catch loss of communication. If you look at my code, I didn't include a time buffer for loss of communication. I would recommend adding this because it can cause the robot to shudder as communication cuts in and out.

Here is the code for my robot.

Code:
// Code for 2008 Fighting Robot Spare Parts v1
// Mabuchi Motors in Banebot 16:1 aka wicked slow

#include "Main.h"

void main ( void )
{
      unsigned char data; 
      unsigned char drumofdoom; 

      SetPWM ( 3 , 0 ) ;  // Arm Brushless Weapon ESC
      Wait ( 5000 ) ;       // Time to Arm ESC
      while ( 1 )
      {
            data = ReceivingData(1);   // Check if RX1 is getting data
            if ( data == 1 )   //If receiving data
            {
                  right_stick = GetRxInput ( 1 , 2 ) ;  // Data from CH2
                  left_stick = GetRxInput ( 1 , 3 ) ;   // Data from CH3
                  SetPWM(1,right_stick);     // Send data to motors             
                  SetPWM(2,left_stick);      //  Send data to motors
            }
            else  // Not receiving Data
            {
                  SetPWM ( 1 , 127 ) ;   // Stop 1
                  SetPWM ( 2 , 127 ) ;   // Stop 2
                  SetPWM ( 3 , 0 ) ;      // Stop 3 ( Brushless ESC 0 Stop)
            } 
      }
}
If you want to see my little guy here is a link: http://www.youtube.com/watch?v=xyfSHu-cpsw
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 28-07-2008 at 15:34.