We are trying out the 2nd generation VEX IQ brain, and we are having some issues with the motors freezing up, and the controller buttons not doing the right thing. When we were trying out our robot code, and put our 2-motor lift down, one of the motors temporarily froze up and made the whole lift misaligned. Also, sometimes when we press a button, the button does the wrong thing, and instead of it doing what it is supposed to do, it performs the same function as the previous button pressed. These issues happen quite frequently and make the robot much harder to control.
When we tried the code on a 1st generation brain, it worked just fine, so I don’t think these are coding issues. The firmware on the brain is also up to date as far as I know, so that is probably not the issue.
Is anyone else having similar problems with the new brain, or know how to fix them?
I won’t post @94568 's code, but the issue was multiple event handler registration, this is the message I sent them.
The issue is creating event handlers in a loop.
Every time you call the “pressed” or “released” function on a button, vexcode registers a new event handler for that button, so calling Controller.ButtonRUp.pressed(catSpin); in a loop registers the function catSpin many times until vexos runs out of resources. When the button is pressed, vexos will also try and call that function as many times as you have registered it, but as there are limited resources for calling functions simultaneously, not all of them will actually run. IQ1 and IQ2 will have slightly different behavior as IQ2 has more memory and can run more simultaneous event handlers.
We have the same problem with the Gen2 brain. After about 40 seconds, the reverse motor button stops working on their intake. No issue with Gen1 brain and current joystick code.
I’m new here and mostly an observer. But my kid is prepping for VeXIQ Worlds with her team and the 2nd Gen brain has been acting up.
First, it was ports dying. Three of them no longer function. Now, suddenly yesterday, in autonomous mode one side’s motors stopped working causing the robot to spin for the duration of the code. The team is freaking out. The teacher is at Vex World and is freaking out. From my very much only in the stands perspective it seems like it might be a hardware issue–a warped circuit board perhaps. Any ideas?
I’ve actually never heard of a IQ port dying on either a generation 1 or generation 2 brain, are any of the connector pins damaged ? Which ports (port number) are not working ? Has this been verified by using the devices screen or just the students code ?
Was this a single occurrence ? If cables and/or connectors are damaged (have missing locking tab) or not fully inserted, a device may lose communication, if this happens a warning would be displayed when the program is stopped. Is the firmware fully updated to vexos 1.0.4 ?
If the brain does have hardware issues, and you have no spare to use for worlds, come to tech support at the beginning of the competition and we will see what we can do to assist.
It’s ports 6 and 7, apparently. She says she remembered wrong about it being three. LOL. The teacher/coach went “all over the world today” and found brand new brain that she borrowed so they swapped it out (I thought teacher had already left, but tomorrow will be her first day gone). So, when they arrive in Dallas they’ll have a brain with two dead ports BUT they will not be using that one.
So today they uploaded their code into the new brain and controller and…same issue. So, at least that is not the brain! Yay! But they’re still flummoxed. One major issue is the teacher is leaving for Worlds for her Vex teams tomorrow AM and won’t return until after the vexIQ tournament is over. They have tried creating the code in block code and their preferred method, the method they were using when it first appeared, in C++. They also uploaded the controller code and it works fine.
They have tried multiple motors and cables and the same issue occurs. She says it goes forward a little, then spins in a circle because “half of the drivetrain turns off.” “It works perfectly with driving control, both in Blocks and C++.”
Perhaps it is because I’m a noob and the system won’t let me, perhaps because I’m a noob and can’t figure it out, but I can’t seem to find the Message button. If I click on my avatar it says if I want to send a message outside of the flow to click on the avatar and select message. However, when I click on avatars I the word message doesn’t appear. Sorry. Can you point me in the direction of that feature?