Activity Stream

@madden to Paul Knox North Augusta, SC

Is anybody else here?

@madden to Paul Knox North Augusta, SC

Is that supposed to have "#"'s before the "define"? Also, do we add this to our code?

@jgore5 to Paul Knox North Augusta, SC

include <Motor.h>

define leftSensor A1

define rightSensor A2

define IREmitter 6

define echoPin A0

define pingPin 3

define IRthreshold 990

define USthreshold_cm 35 //attack if an object is within 35cm

define maxSpeed 255

define minSpeed -255

define buzzer 5

Motor motor; void setup() { Serial.begin(9600); pinMode(leftSensor, INPUT); pinMode(rightSensor, INPUT); pinMode(IREmitter, OUTPUT); pinMode(echoPin, INPUT); pinMode(pingPin, OUTPUT); pinMode(buzzer, OUTPUT); motor.setupRight (10 , 8); motor.setupLeft (9 , 4); }

void loop() {

//tone(buzzer, 1000, 250); // delay(500); // tone(buzzer,500 , 250); // delay(500); // tone(buzzer, 800, 250); // delay(500); // tone(buzzer,1000 , 250); // delay(500); // tone(buzzer,850 , 250); // delay(500); // tone(buzzer, 999, 250); // delay(500); // tone(buzzer, 500, 500);

IsCloseToOpponent(); if (IsWhite() ) { //backup and turn motor.right (-200); motor.left (-200); delay(1000); motor.right (200); delay(400); } else { //search motor.right (250); motor.left (100); if (IsCloseToOpponent() > 0) { //attack or push or full speed ahead motor.right(maxSpeed); motor.left(maxSpeed); } /else { move forward } / } }

boolean IsCloseToOpponent() { int distance = ping() / 29 / 2; Serial.println(distance); boolean closeToOpponent = distance < USthreshold_cm;

return closeToOpponent; }

boolean IsWhite() { digitalWrite(IREmitter, HIGH); int rightInput = analogRead(rightSensor); int leftInput = analogRead(leftSensor); Serial.print("Left/"); Serial.println(leftInput); Serial.print(" - Right/"); Serial.println(rightInput); delay(5); boolean whiteBoolean = rightInput < IRthreshold; return whiteBoolean; }

long ping() { long duration; digitalWrite(pingPin, LOW); delayMicroseconds(2); digitalWrite(pingPin, HIGH); delayMicroseconds(10); digitalWrite(pingPin, LOW); duration = pulseIn(echoPin, HIGH); return duration; }

@KnightC3 to Paul Knox North Augusta, SC

Hey

@madden to Paul Knox North Augusta, SC

helloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

@madden to Paul Knox North Augusta, SC

That's my code.

@madden to Paul Knox North Augusta, SC

Your welcome

@madden to Paul Knox North Augusta, SC

include <Motor.h>

define button 2

boolean pressed; int lastRead;

define leftSensor A1 //left ir sensor

define rightSensor A2 //right ir sensor

define IREmitter 6

//Ultasonic

define pongPin A0 //Listen for distance

define pingPin 3 //Emit signal

Motor motor;

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

Serial.begin(9600);

pinMode(button, INPUT_PULLUP);

//load left and right color sensors pinMode(leftSensor, INPUT); pinMode(rightSensor, INPUT); pinMode(IREmitter, OUTPUT);

motor.setupRight(10, 8); motor.setupLeft(9, 4); }

const int FAST = 255, SLOW = 220; int step = 0;

void loop() { lastRead = digitalRead(button);

if (pressed && lastRead == 0) { stopMotors(); pressed = false; return; }else if (!pressed) { return; }

if (!pressed && lastRead == 1) { pressed = true; delay(3000); driveStraight(-FAST); delay(1321); stopMotors();

turnLeft(-FAST); delay(144); stopMotors();

turnRight(-FAST); delay(233); stopMotors(); } if (isWhiteRight() && isWhiteLeft()) { stopMotors();

//Backup for 2 secobds at full speed
driveStraight(-FAST);
delay(2000);
stopMotors();

//Turn left in reverse for half a second
turnLeft(-FAST);
delay(500);
stopMotors();

//Turn right forwards for 3/4's of a second
turnRight(FAST);
delay(750);
stopMotors();

//  driving straight and waiting 2 seconds and turning

} else if (isWhiteRight () && !isWhiteLeft()) { stopMotors();

//Turn left in reverse for half a second
turnLeft(-FAST);
delay(500);
stopMotors();

//Turn right forwards for 3/4's of a second
turnRight(FAST);
delay(100);
stopMotors();

} else if (!isWhiteRight () && isWhiteLeft()) { stopMotors();

//Turn left in reverse for half a second
turnLeft(-FAST);
delay(500);
stopMotors();

//Turn right forwards for 3/4's of a second
turnLeft(FAST);
delay(100);
stopMotors();

} else { //There is an object in front of us if (distanceInCentimeters() <= 12) { driveStraight(FAST); } else { driveStraight(SLOW); } }

}

void stopMotors() { driveStraight(0); }

void driveStraight(int speed) { if (speed >= -255 && speed <= 255) { motor.right(speed); motor.left(speed); } }

void driveStraight(int speed, long timeInMillis) { driveStraight(speed); delay(timeInMillis); stopMotors(); }

void turnLeft(int speed) { if (speed >= -255 && speed <= 255) { motor.right(speed); } }

void turnRight(int speed) { if (speed >= -255 && speed <= 255) { motor.left(speed); } }

//TODO boolean isWhiteRight() { digitalWrite(IREmitter, HIGH); int rightInput = analogRead(rightSensor); return (rightInput < 1000); }

//TODO boolean isWhiteLeft() { digitalWrite(IREmitter, HIGH); int leftInput = analogRead(leftSensor); return (leftInput < 1000); }

long checkPing() { digitalWrite(pingPin, LOW); delayMicroseconds(2); digitalWrite(pingPin, HIGH); delayMicroseconds(10); digitalWrite(pingPin, LOW); return pulseIn(pongPin, HIGH); } long distanceInCentimeters() { return checkPing() / 58; }

@madden to Paul Knox North Augusta, SC

Hi

@Eridan to Paul Knox North Augusta, SC

Yooooooo what up guys

@botbuster1 to Lake Forest Hills Elementary Augusta GA

I hope y'all come next yearπŸ˜€

@botbuster1 to Lake Forest Hills Elementary Augusta GA

Hey guys, awesome representing LFH. Next year we will win it for sure. His was our first time and we saw how the weighted people won. See you on Monday! Quick as the 🐺. Strong as the πŸ‚. Working without a 😠. To make robots rumble.

@stitch632 to 2017Tournament_L

@stitch632 to 2017Tournament_L

@wbyu2006 to 2017Tournament_L

Judging: Joe Kirstein

@wbyu2006 to 2017Tournament_K

Juding: Luke Stephens

@wbyu2006 to 2017Tournament_G

New Judge: Taylor Cook

@wbyu2006 to 2017Tournament_J

Judging: Bill Gray

@wbyu2006 to 2017Tournament_I

Juding: Melinda Lowe

@wbyu2006 to 2017Tournament_F

Juding: Brenda Balliet

@wbyu2006 to 2017Tournament_E

Juding: Zach Lowe

@wbyu2006 to 2017Tournament_D

Judging: William Parker

@wbyu2006 to 2017Tournament_C

Judging; Graham

@wbyu2006 to 2017Tournament_B

Judging: Sharon Alias

@wbyu2006 to 2017Tournament_A

Juding: Ivy Brown

@Viola to TheClubhou.se Student Team Augusta GA

define leftSensor A1

define rightSensor A2

define IREmitter 6

define rmdirection 8

define lmdirection 4

define rmspeed 10

define lmspeed 9

define echoPin A0

define pingPin 3

int rightValue; int leftValue;

void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(rmspeed, OUTPUT); pinMode(rmdirection, OUTPUT); pinMode(lmspeed, OUTPUT); pinMode(lmdirection, OUTPUT);

pinMode(leftSensor, INPUT); pinMode(rightSensor, INPUT); pinMode(IREmitter, OUTPUT); Serial.begin(9600); pinMode(rmspeed, OUTPUT); pinMode(rmdirection, OUTPUT); pinMode(echoPin, INPUT); pinMode(pingPin, OUTPUT); delay(1000);

}

void loop() { digitalWrite(IREmitter, HIGH); delay(1); rightValue = analogRead(rightSensor); leftValue = analogRead(leftSensor); Serial.print("Left/"); Serial.print(leftValue); Serial.print(" - Right/"); Serial.println(rightValue); // delay(500);

if (rightValue <= 1005) { Serial.println("It's white."); //backup turn left // left turn: digitalWrite(rmdirection, LOW); analogWrite(rmspeed, 255); digitalWrite(lmdirection, LOW); analogWrite(lmspeed, 255); Serial.println("left turn"); delay(1000); //wait before turning off the motors analogWrite(lmspeed, 0); analogWrite(rmspeed, 0); } else { Serial.println("Not white."); //search // delay(1000); //wait before turning off the motors analogWrite(lmspeed, 0); analogWrite(rmspeed, 0);

if (leftValue &lt;= 1005) {
  Serial.println(&quot;It's white.&quot;); //backup turn right
  // right turn:
  digitalWrite(rmdirection, HIGH);
  analogWrite(rmspeed, 255);
  digitalWrite(lmdirection, HIGH);
  analogWrite(lmspeed, 255);
  Serial.println(&quot;right turn&quot;);
  delay(100); //wait before turning off the motors
  analogWrite(lmspeed, 0);
  analogWrite(rmspeed, 0);
} else {
  Serial.println(&quot;Not white.&quot;); //search
  //    delay(1000); //wait before turning off the motors
  analogWrite(lmspeed, 0);
  analogWrite(rmspeed, 0);

  if ( ping() &lt; 70 ) {
    // yes attack
    digitalWrite(rmdirection, LOW);
    analogWrite(rmspeed, 255);
    digitalWrite(lmdirection, HIGH);
    analogWrite(lmspeed, 255);
    Serial.println (ping());
  } else {
    //no move a bit
    digitalWrite(rmdirection, HIGH);
    analogWrite(rmspeed, 255);
    digitalWrite(lmdirection, HIGH);
    analogWrite(lmspeed, 255);
    Serial.println (ping());

  }

}

}

}

long ping() { long duration; digitalWrite(pingPin, LOW); delayMicroseconds(2); digitalWrite(pingPin, HIGH); delayMicroseconds(10); digitalWrite(pingPin, LOW); duration = pulseIn(echoPin, HIGH); return duration / 29 / 2; }

@wbyu2006 to 2017Tournament_G

Juding: Steve Duckworth -- has to leave at 11:30

@wbyu2006 to 2017Tournament_H

Judging: Michelle Lyon

@69SlimShady420 to Paul Knox North Augusta, SC

hey guys, hows it rollin bbbbboooooyyysss

@saucyBOY to Paul Knox North Augusta, SC

boi

@price to Paul Knox North Augusta, SC

;ljas

Recently Created Teams

2017Tournament_M

Created on 6 May 2017 with 6 members.
Team Captain: @wbyu2006

M - the 13th bracket

2017Tournament_L

Created on 5 May 2017 with 5 members.
Team Captain: @wbyu2006

tournament preliminary

2017Tournament_K

Created on 5 May 2017 with 6 members.
Team Captain: @wbyu2006

tournament preliminary

2017Tournament_J

Created on 5 May 2017 with 6 members.
Team Captain: @wbyu2006

tournament preliminary

2017Tournament_I

Created on 5 May 2017 with 5 members.
Team Captain: @wbyu2006

tournament preliminary

2017Tournament_H

Created on 5 May 2017 with 7 members.
Team Captain: @wbyu2006

tournament preliminary

2017Tournament_G

Created on 5 May 2017 with 6 members.
Team Captain: @wbyu2006

tournament preliminary

2017Tournament_F

Created on 5 May 2017 with 6 members.
Team Captain: @wbyu2006

tournament preliminary

2017Tournament_E

Created on 5 May 2017 with 6 members.
Team Captain: @wbyu2006

tournament preliminary

2017Tournament_D

Created on 5 May 2017 with 7 members.
Team Captain: @wbyu2006

tournament preliminary