Robocode Skills Challenge (RSC) was a mini project branding name for microcontroller course which is fully organized by student to create a mini event based on robot battle oriented to enhanced student programming knowledge as well as design skills in basic electronics and robotic system.
Here are a few questions that can help jump-start brainstorming:
- How can we speed up the robot?
- How might we better control of robot?
- How could we improve the design of the robot?
- How could we track and protect rival robot from winning the game?
AJK RSC'16: FOOTBALL GAME - THERATEAM (JD16)
###################THE COMPETITION RULES!!!################
###################THE COMPETITION RULES!!!################
1 - The robot should control by android based apps via Bluetooth connection.
2 - The robot should be programmed either Arduino or PIC Microcontroller.
3 - The robot should use a motor driver rated 2 Amp only.
4 - The robot should use a DC Motor rated 3 Volt only. (Ex. Tamiya, Polulu etc)
5 - The overall weight of the robot not exceed 1kg only. (Plastic and thick metal sheet)
6 - The battery voltage not exceed 12 Volt.
Download Apps Here: Arduino BT Controller
/*
Programming: Arduino Bluetooth Android
Nik Md Hafizul @Ockt 2016
wiring Diagram:
Arduino Motor Driver
Pin 5 -----> ENA
Pin 6 -----> ENB
Pin 8 -----> IN1
Pin 9 -----> IN2
Pin 10 -----> IN3
Pin 11 -----> IN4
Arduino Bluetooth
Pin 0 RX -----> TX
Pin 1 TX -----> RX
+5v -----> +5v
Gnd -----> Gnd
*/
int state;
void setup() {
Serial.begin(9600); // Default communication rate of the Bluetooth module
pinMode(5,OUTPUT);//PWM A
pinMode(6,OUTPUT);//PWM B
pinMode(8,OUTPUT);//DIR A
pinMode(9,OUTPUT);//DIR A
pinMode(10,OUTPUT);//DIR B
pinMode(11,OUTPUT);//DIR B
}
void loop()
{ //Serial.println(state);
if(Serial.available() > 0){
state = Serial.read();
}
if (state == '1')
{
forward(255,255);
Serial.println("Forward");
}
else if (state == '2')
{
reverse(255,255);
Serial.println("Reverse");
}
else if (state == '3')
{
turnleft(255,255);
Serial.println("TurnLeft");
}
else if (state == '4')
{
turnright(255,255);
Serial.println("TurnRight");
}
else if (state == '0')
{
stopp(); // No movement
Serial.println("Stop");
}
}
void turnleft(int x, int y)
{
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
digitalWrite(10,HIGH);
digitalWrite(11,LOW);
analogWrite(5,x);
analogWrite(6,y);
}
void turnright(int x, int y)
{
digitalWrite(8,LOW);
digitalWrite(9,HIGH);
digitalWrite(10,LOW);
digitalWrite(11,HIGH);
analogWrite(5,x);
analogWrite(6,y);
}
void reverse(int x, int y)
{
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
digitalWrite(11,HIGH);
analogWrite(5,x);
analogWrite(6,y);
}
void forward(int x, int y)
{
digitalWrite(8,LOW);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
digitalWrite(11,LOW);
analogWrite(5,x);
analogWrite(6,y);
}
void stopp()
{
analogWrite(5,0);
analogWrite(6,0);
}


