Dear people who run or visit this forum,
I have two questions - the first being more of a practical issue, while the second is purely theoretical.
My practical problem concerns the programming of the allbot VR408 to receive commands from the different buttons that are available in the Allbot app. More specifically it’s about the last lines of the program sketch that’s available through Velleman manuals:
“”
//--------------------------------------------------------------
void executecommand (void) // Execute the commands that are stored in the global vars.
{
if (command == “LR”)
{
leanright(speedms*5);
resetserial();
}
}
“”
I understand that you’ll only execute the action to lean right if you receive the command “LR” from the receiver, and this command corresponds to a button in the allbot app. I guess it’s the right arrow button in the app.
My problem is the following: how do you obtain or figure out the names of the buttons from the allbot app? I only know LR through this sketch. Are the others called LL, LF, lB,…? Do you assign names to the buttons somewhere, or is there some line of code where this kind of declaration occurs? I don’t seem to be able to find that line in the sketch from the manual.
My theoretical problem is simply this: many of us have probably experienced the inability of the allbot to complete a lot of cycles with just a few AA-batteries. These power sources are limited in their current, and cannot seem to deliver the necessary power (as P = U*I). That’s probably why it falls down after a few actions, exhausted and twitching without end. Yet, it does manage to complete this small number of actions before it is really exhausted. So does that mean that the batteries do succeed in delivering sufficient power (and current) for a while by going over their limit of maximum current during this short span of time? How does this happen in a technical sense? In short, I would like to understand the working of a simple battery a little better.
That’s all. Thanks in advance to everyone,