V0.5 PIC transmitter connection issue

Hello, I recently bought a Vex V0.5 PIC beginner kit (second hand) on eBay, and I’m having trouble getting the PIC controller to connect/respond to the transmitter.

When I first received the kit, I was able to turn on the controller and transmitter and it actually worked just fine! It was only once updated the firmware on the PIC controller and uploaded my own RobotC code, that suddenly the transmitter could no longer communicate with the PIC controller. My code includes sensor-based motor commands (like, if a bumper switch is pressed, move motor 1 forward) and those functions are working just fine on the robot, I just can’t get the transmitter to communicate with the controller.

I am using the code “motor[port1]=vexRT[ch1]”
And I even have a tether cable I can hook up between the controller and transmitter, but still no control, even though the rest of the code clearly works because the motors respond to sensor input.

I think this must be a programming mistake on my part, or I must have downloaded a firmware update to the PIC microcontroller that messed it up. Either way I am really struggling to find information specific to this issue. @Foster and @Quazar, I have seen you both post on similar discussions and would greatly appreciate and help you might be able to offer. Thank you.

@Eli_Osornio this is the post I made relating to my transmitter not working with my PIC controller.

It looks like your sonar sensor isn’t doing what you want. It has to have a value of 5 for it to move.

If you change the line with the sonar to

if (SensorValue[in1] == 0 ) {

does that let you drive the robot?

3 Likes

Hey Foster,

Thank you so much for the reply. I cannot test your idea (“if(SensorValue[in1]==0){”) right now, because I am at work, but in a few hours I will absolutely try that!

I am a little confused though because in my code I wrote “if(SensorValue[in2]>5)” so I thought that means if the sonar value is greater than 5, not equal to 5.

Something I did try yesterday was this code shown below. It also did not give me any control from the transmitter, even when directly tethered!


Thank you again for your help.

1 Like

OK, so that sample code with the driver stuff was my next choice for you to try.

Just to confirm that the sensor code works. So

if (SensorValue[in1] == 0) motort[port1] = 100;

has the motor move when you press the button?

I’ll need to dig around for the PIC version, this PC only has the Cortex one.

1 Like

@Foster , Okay, I tried your code, and yes, when I push the button the motor does turn.

1 Like

Can you try setting

bIfiAutonomousMode = true;

or maybe

bIfiAutonomousMode = false;

There is a feature that if the the robot doesn’t see the transmitter it stops moving and I think this overrides it.

2 Likes

you have just made my day!!! the code below worked!!!

1 Like

Super happy to hear there was a happy ending!

2 Likes