Your issue may be that when you call the function you have to be holding both buttons. So the function works but you aren’t able to hold both buttons while the function activates. I would add a while loop to the function. Inside the while loop you have the if statement. So while the function activated it will loop through checking. You can also and that if statement to your driver control while loop instead. An easier solution may be to run the function when those buttons are pressed instead of running the function then pressing those buttons.
I have the function inside user control I.e. batterycheck();. The code format is literally jsut a while loop with all my code functions running and then a wait 20 mile seconds function. All my other code runs fine, its jsut that this specific one doesn’t run.
We’re basically just waiting for him to go to school and send his code. Until then, we really don’t know what he did or didn’t do. @UvuvwevweOnyetenye You should upload your code to Google drive and share it with your mom or someone at home so it’s not only on your computer.
I have my class that I can code in (I just kinda take the laptop from the robotics room) in 40 minutes. I’ll do what you said since that’s actually smart. If you want to steal any aspects of my code for your own btw, I’d be happy to tell you what certain code does (since I don’t really comment my code well)
The V5 brain is a touchscreen, so you could also draw buttons on the screen during driver control or something so that when someone touches the button it prints the battery level. You could do something simple, like
while (touch is inside this position) {
print Battery capacity to row 1 on the brain;
}
or something more complicated like, have one screen to touch the battery level button, and it takes you to another screen where it prints the battery level, and there’s an Exit button that takes you back to the main screen. Here is a site with a good explanation of switching between scenes. That would probably be more work than it’s worth, though.
Unless you’re like me and you enjoy it and have lots of free time. (I would guess not, since you have a limited amount of time with access to your computer.)
i had deleted the maintenance function previously, since i thought that it hurt performance, but it didnt work when i had it. dont worry im not that dumb lol. i made the code in like october or something
Sorry. I don’t have the V5 code app. I can’t open the file. Can you send a screenshot? Or it would be better if you copy and pasted it. You format code with ``` at the beginning and end. It comes out like this: