This is an extension of the previous video demonstrating a usable application. The RCX controls movement as well as touch and light sensors, while the Scout controls the arm movement.
For testing purposes the RCX movement was disabled and only the touch sensors were active. The right and left touch sensors were each given a specific code to send to the Scout when these codes, or messages were received it then translated them to run either the "pick up" or "put down" command.
Each command has a set run time for each action, for example: Turn the motor that lowers the arm on for 8.1 seconds. That is a number I came up with that gets the claw close enough to the ground to grab an object. However, if this was run over and over and over again the gaps in the gears would eventually make the arm go out of sync with the numbers I entered. In short, for the "pick up command" to work the arm has to start at its maximum height with the claw open, if it is lowered at all it will hit the desk and try to keep going.
Solution (next step) is learning how to program in variables so that it can figure out what position the arm is in on its own. This way, even if its not all the way up, it can counteract by shortening the motor run time when it lowers an object back down.
This is my first real attempt at programing these robots with NQC and getting them to talk to each other, so the actual design was all based on sets, slightly modified.
Sweet, nice work! I'm sure this wasn't easy, but when do we get to see lasers or some other pryotechnic related stuff? Do you get to that in a later chapter, if so then let's skip ahead! ;)
emlarge1 2 years ago