Saturday, July 30, 2011

July 30, 2011 Practice

Today we finished our TETRIX creations from last week. Jared was on vacation so Jaret was working alone. After our countless minutes of constructing, we started programming our robots. We started with making the robots go forward, which was all we could do with our starter-robots.

Near the end of the practice, we had a mini sumo challenge Jaret has been dreaming of since day one. The robot that could push the other one out of an area. Jaret won the competition while his robot played a "battle tone". Below is a video from the challange.

Saturday, July 16, 2011

July 16, 2011 Practice

Ian and I work on our robotic creation
featuring "brains".
This week we began an exploration in to the TETRIX system. Despite not beginning to program, we learned many part names and building stratagies. We also formed mini-teams to see how our robots compared. The teams were Ian and I, and Jaret and Jared. Jaret was also fixated on making a killer robot instead of complying with FTC rules.


Jared and Jaret worked on a robotic
creation featuring mechanics and
"sumo skills".
The "mini teams" had different stratagies when constructing the robots. Ian and I got a fair foundation with a NXT brick and TETRIX power supply. The other team focused more on "cool looks" and motors. Today's meeting began a new age for J2IT. We will continue the robot construction and programming skills for the new hardware.

Saturday, July 9, 2011

July 9, 2011 Practice

Our new robot design with treads.
Today Ian and I worked on two different things. I worked on programming code to complete tasks based on colors detected with our robot's color sensor. The program also used logical sequences to run the code. Ian worked on improving the robot by giving it treads. After Ian left early, I added sensors to the robot and got it working with some of our previous code. I personally learned a lot of new logic statements for the RobotC language. This was my most enjoyable and productive meetings yet. I can not wait to see what the future holds for our RobotC adventures. The full program I made at today's practice is below:




#pragma config(Sensor, S2,     FloorColor,          sensorCOLORFULL)
#pragma config(Motor,  motorB,          RightWheel,    tmotorNormal, PIDControl, encoder)
#pragma config(Motor,  motorC,          LeftWheel,     tmotorNormal, PIDControl, encoder)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//
void color_read();
void white_task(int forward_speed);
void black_task(int reverse_speed);
int read_output;
task main()
{
  int universal_speed = 25;
  while(1 == 1)
  {
    color_read();
    switch(read_output)
    {
      case 6 :
        white_task(universal_speed);
        break;
      case 1 :
        black_task(universal_speed);
        break;
    }
  }
}
void color_read()
{
  bool value_ready = false;
  while(!value_ready)
  {
    int A = SensorValue[FloorColor];
    int B = SensorValue[FloorColor];
    int C = SensorValue[FloorColor];
    if(A == B && B == C && C == A)
    {
      read_output = C;
      value_ready = true;
    }
    else
    {
      value_ready = false;
    }
  }
}
void white_task(int forward_speed)
{
  motor[RightWheel] = forward_speed;
  motor[LeftWheel] = forward_speed;
}
void black_task(int reverse_speed)
{
  motor[RightWheel] = 0 - reverse_speed;
  motor[LeftWheel] = 0 - reverse_speed;
}