tinyBotSetDown

tinyBotSetDown

tinyBotPlaceBlock

 

tinyBotSetDown causes tinyBot to interact with her human to gently place a block on the floor. This experiment requires the user to find just the right position for channel 3 to place the block. It's not as simple as just copying the text this time! Positive numbers close the gripper, negative numbers open it. Like moving servos fast, the robotGrab command requires a dely.

Commands used:

robotMove(<channel>,<position>)

robotGrab(<force>)

delay(<time>)

What We Learn:

Sometimes we need to tune our robots to their environment. In this experiment each robot may have a slightly different channel 3 position to release the block, depending on robot setup and the surface it's sitting on.

Instructions:

Download the program images HERE or click the images below. The file includes both the mimicBlock and Arduino versions of the tinyBotSetDown program. Copy the program using your computer, then find the perfect Channel 3 position to make it work. Does your robot move like the robot in the GIF at the top of the page?

Click to View Full Size

Download Files:

Don't feel like copying the files? Download the complete program here.

Download tinyBotSetDown.ino for Arduino

Download tinyBotSetDown.adp for mimicBlock

Cut and paste code:

#include <robot.h>

void setup() {
  // put your setup code here, to run once:
  robotActivate();

}

void loop() {
  // put your main code here, to run repeatedly
  //Move robot to HOME position
  robotMove(2,127);
  robotMove(3,127);
  delay(5000);  //this command waits for 5000 milliseconds, which is the same as 5 seconds.
  robotGrab(100);   //The higher the number, the harder the robot grabs. 127 is the maximum
  delay(2000);  //let's wait 2000 milliseconds (2 seconds) to make sure the robot has a good grip
  robotMove(2,75);
 
  //This next step is incomplete. You need to add your channel three position
  robotMove(3,??? );  //<--- PUT YOUR CHANNEL 3 POSITION HERE
  //Good job!
 
  robotGrab(-100);  //the negative number will open the gripper
  delay(1000);
  robotGrab(0);  //we need to turn off the gripper by resting to zero. That keeps it from wearing out.
 

}