[go: up one dir, main page]

0% found this document useful (0 votes)
106 views2 pages

Sumoboy Quick Start en v20

This guide provides instructions to set up and program the SumoBoy 2.0 robot for sumo wrestling competitions. The setup involves assembling the robot, connecting the batteries, and plugging in the charger. The guide then explains how to connect the sensors and motors to the Arduino microcontroller board. Finally, it provides the code for a simple program to make the robot follow a white line and respond to proximity sensors using motor controls and sensor readings.

Uploaded by

NEOLL MARTIN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views2 pages

Sumoboy Quick Start en v20

This guide provides instructions to set up and program the SumoBoy 2.0 robot for sumo wrestling competitions. The setup involves assembling the robot, connecting the batteries, and plugging in the charger. The guide then explains how to connect the sensors and motors to the Arduino microcontroller board. Finally, it provides the code for a simple program to make the robot follow a white line and respond to proximity sensors using motor controls and sensor readings.

Uploaded by

NEOLL MARTIN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SumoBoy 2.

0 Quick start guide


This guide briefly introduces to SumoBoy 2.0 functionality and programming, to get you faster to robot sumo fights. For
more information check SumoBoy educational manual 2.0 and our web site www.robot-nest.com.

First time SumoBoy setup


Unscrew top 4 screws Find 2 LiFe battery Connect battery connectors
1. and take off top cover
2. connectors
3. to corresponding sockets

Plug charger and Disconnect charger when


4. Put on top cover and
5. 6. yellow light turns off
screw screws charge battery

SumoBoy 2.0 build and Arduino connections


PROX3
D4

PROX1
A0

PROX2
MOT1 MOT2
D5;11 A1
D9;10
LED1 LED2
D12 D6
ON/OFF
BTN
A2
SENB
A5 DISP
D2;3
SENL SENR
A4 A3
DIP1;2;3;4 LED3;4
D7;15;16;14 D13;17

SumoBoy programming
1. Download and install Arduino programming environment from: https://www.arduino.cc/download_handler.php
2. Download and setup display libraries from: https://learn.adafruit.com/monochrome-oled-breakouts/arduino-
library-and-examples
3. Connect SumoBoy to computer using USB cable.
4. In Arduino environment go to menu Tools/Board and choose Arduino type: ” Arduino/Genuino Micro”.
5. In Arduino environment go to menu Tools/Port and choose port with Arduino type: ” Arduino/Genuino Micro”.
6. Copy sample program from the next page to the Arduino environment.
7. Upload program, with arrow icon, and try your SumoBoy.

Good luck!
Simple Sumo-Boy program
void loop() {
// Libraries for Display
Forward(0, 0); //Stop motors
#include <Wire.h>
delay(100);
#include <Adafruit_GFX.h>
if (BTN){//Turn on program with button
#include <Adafruit_SSD1306.h> while (BTN) { }
Adafruit_SSD1306 display(4);
while (!BTN){ //stop robot if button is
void setup() { pushed again
// Display setup senState = 0; //reset variable to 0
display.begin(SSD1306_SWITCHCAPVCC, // Read sensors
0x3C, false); if (SENL) {
display.setTextSize(1); led1ON; senState = senState + 1;
display.setTextColor(WHITE); } else {
//LED led1OFF;
pinMode(12, OUTPUT); //Left LED }
#define led1ON digitalWrite(12,HIGH); if (SENR) {
#define led1OFF digitalWrite(12,LOW); led2ON; senState = senState + 2;
pinMode(6, OUTPUT); //Right LED } else {
#define led2ON digitalWrite(6,HIGH); led2OFF;
#define led2OFF digitalWrite(6,LOW); }
//Button if (senState == 0) {
pinMode(A2, INPUT); if (PROX2) {
digitalWrite(A2, HIGH); senState = +4;
#define BTN !digitalRead(A2) }
//Line sensors }
pinMode(A4, INPUT); //Display sensor results
#define SENL analogRead(A4)<32 display.setCursor(0, 0);
pinMode(A3, INPUT); display.clearDisplay();
#define SENR analogRead(A3)<31 display.print("SENL: ");
//Proximity sensors display.println(SENL);
display.print("SENR: ");
pinMode(A1, INPUT);
display.println(SENR);
#define PROX2 !digitalRead(A1)
display.print("SenState: ");
//Motor pins display.println(senState);
//Left motor display.display();
pinMode(5, OUTPUT); display.clearDisplay();
pinMode(11, OUTPUT); //robot movement according to
//Right Motor senState
pinMode(9, OUTPUT);
switch (senState) {
pinMode(10, OUTPUT);
case 0://no white line
} Forward(40, 40);
//Motor functions break;
void Forward (int lSpeed, int rSpeed) { case 1: //white line on left
analogWrite(5, lSpeed); Backward(100, 100);
digitalWrite(11, LOW); delay(300);
analogWrite(9, rSpeed); Forward(100, 0);
digitalWrite(10, LOW); delay(200);
} break;
void Backward (int lSpeed, int rSpeed) { case 2://white line on right
analogWrite(11, lSpeed); Backward(100, 100);
digitalWrite(5, LOW); delay(300);
analogWrite(10, rSpeed); Forward(0, 100);
digitalWrite(9, LOW); delay(200);
} break;
case 3://white line in front
int senState = 0; //variable for sensors Backward(150, 150);
delay(300);
break;
case 4://Middle proximity sensor
Forward(200, 200);
break;
}
}
while (BTN) {}
}}

You might also like