Brain seems to not be taking changes?

So I am going to have to try to relate what my daughter has been experiencing. I do not currently have screen shots, but I don’t think they are needed once I describe what seems to be going on.

In her autonomous she uses a When Started hat to set several touch sensors to colors, sets motor brakes to hold., etc She then uses 3 When hats to execute 3 different scoring portions. In one of those the robot just goes forward, lifts the green cube, puts it on the low platform then back away and puts the arm down. This works fine.

Another When hat is supposed to go forward, make a 90 degree turn to grab the blue cube then back up, make a slight turn and grab the last green cube. This is where the problem starts.

The robot would not turn a full 90 degrees. It would turn about 75. We tried moving the gyro, swapping out the gyro, changing the gyro port and using all 3 of the turn commands and the turn was exactly the same. So I told her, ok, just add some more to the turn so that it ends up at 90 degrees. So she set the turn to 110 degrees but it still stopped in the same place. I them told her to try 360 degrees and still the turn did not change. She then deleted all the programs from the brain and loaded her code again, with the turn still set to 360. It still only turned 75 degrees.

Each time it will execute the next part of the code, reversing towards the green cube, making a turn and lifting the elevator but changes to any of those commands do not seem to actually be getting used either.

I’m really confused at how it is making exactly the same turn AFTER she deleted the program.

Also, somewhere in there she tried just changing the color one of the touch sensors is set to and that DID work. It also worked when she changed it back. So I thought the problem could be somewhere in the When Started hat, but then I’m still confused about why it would do any of the When hats at all.

It’s like there is an old program in the brain that is not being written over?

She is using a Chromebook. She also says she doesn’t have to save each time, she just downloads and it automatically saves. In each of the tests she kept the program name the same and always loaded to slot 2.

Any ideas?

Thank you!

Attach the project, only way to know what’s going on.

1 Like

image
image

image

Ok, well what I really wanted to do was download and run it in case it wasn’t actually compiling and just downloading an old copy, bit hard with a screen shot.

2 Likes

Oh… she has gone to bed so we will have to try that tomorrow :wink:

1 Like

This may seem obvious, but I’ll say it anyway. (because I’ve done it, myself)

Make sure she’s testing the button she’s changing.

There are 3 TouchLEDs. From what you said and what you posted, she may be changing the “purple” led, but running the “RedCub” LED which is blue.

This sort of thing often happens, right before I go to bed. Turns out it works fine the next day.

Thanks for the suggestions. I appreciate them, but after her initial frustration, I was observing what went on and looked at the code. She was making changes in the Purple group and pushing the purple button. I made her turn the robot off and back on and check it again several times for each different change she made. This same problem of changes not being taken is occurring in both the purple and red sections because she made changes there, too, and they didn’t take.

In now thinking about it, she did not touch the green section, because it was working, but perhaps she should have made a small change there to help diagnose. Something else I didn’t think of until we got home was trying to put the same program in a different slot

It sounds like what jpearman has said… it’s somehow downloading an old version over and over, EXCEPT, that one time she changed the color being sent to one of the touch sensors, THAT did take. The difference being that’s in the When Started hat, not the When hats. That, too me seems even more confusing.

Well, I won’t argue with jpearman.

If you made changes (LED) that you saw on the robot, I very much doubt your other changes are not also on the robot. That makes me think you’re not changing what you think you are.

1 Like

One possible but low probability issue. Unless we can reproduce what you are seeing it’s all guessing.

1 Like

She changed the color of the button in the same program she is trying to change the turn. I don’t think she is getting things confused. Maybe it’s her method for uploading, but she has been doing the same thing all season. This is her first year as the programmer, so I’m completely open to it being anything,

As soon as she sends the file, I’ll post it here. On the negative side, we only have practice on Tuesdays. But next week is Spring break, so I told her to be prepared to bring the robot home on Friday so that we can be trying any help we get here on the kitchen floor at home :smiley:

You can always do the “load the stock firmware” and start over with downloading the program. That’s one way to make sure that things start over.

Just to verify, that’s a standard VEX kitchen floor you are going to practice on right? :slight_smile:

Yeah, we may have to do that, which is why I’m kind of glad next week is Spring break. It gives me time to figure that all out.

I’m just hoping there is some kind of explanation that makes sense. I really hate it when things start working again and there is no clear understanding why. Then we’ve learned nothing :unamused:

My only pro-tip when working with roboteers is the read-aloud method. Read the code out loud as you do things. “Press the Green Button” “When Green …” it makes you slow down and think about things going on. You have lots of events going on, and sometimes event programming isn’t that simple to track. Good luck!

1 Like

@jpearman here is the file. Auto2.0.iqblocks (17.9 KB)

Thank you for your patience and help

Does 18K seem right or did she send me the wrong thing?

Well, I don’t see any issues. I tried building on both Mac and Chromebook and the program downloads and runs as expected. I would perhaps suggest adding a while forever loop under the when started hat and print some useful info like drive heading, she could also add some print statements during the run so you know where the code has got to, that’s always helpful for debugging.

2 Likes

Thank you! We will try those things and see what happens. Probably won’t be able to until this weekend.