Arduino Robot Arm plays Tic Tac Toe using MATLAB and C-program
Two Link Robot Arm Model (TL_RAM)
This video is for TL_RAM Ver 3
(The older Video was TL_RAM Ver 2)
The Game:
The robot can play N x M Tic-Tac-Toe
Where K-in a line is winner
In this video N = M = 5 and K = 4
The arena shown in the video, has a provision of playing 5x5, 6x6 and 7x7 Tic-Tac-Toe
The video shows 3-matches between Human and Robot
with 5x5 Tic Tac Toe; 4 in a line wins
MATLAB program runs on PC
C-program runs on Arduino
Working:
STEP 1: MATLAB(R): Checks if Arduino is connected to PC and responding
STEP 2: MATLAB: Takes a snap-shot from camera,
converts game-arena image to 5x5 numeric matrix,
checks if one more checker is added,
repeats this step until human has played
also checks for cheating/manipulation
audio is played from time to time using opensource Text To Speech
STEP 3: MATLAB : Apply game strategy algo :
Computes cost-matrix, finds a defensive move if offensive move is NOT found.
Game difficulty levels can be set
Finally returns the row and column number where the next move is to played
STEP 4: MATLAB:
The row and column numbers are converted to Cartesian coordinates.
The checker is to be moved from the storage rack to the board by moving both the arm-links with certain angles.
The coordinate info is translated to angles using basic trigonometry
The angles are converted to Servo motor counts.
STEP 5: MATLAB: A 21-char string, named TL_RAM Protocol string is prepared containing: the servo motor counts and is passed to Arduino. The C-program (hex) process (parses) the protocol string by activating Servo(s), Electro magnet, flash light, buzzer, status-LED(s).
STEP 6: Arduino : If all is successful the Arduino returns the same string back; (this way the MATLAB program knows it can send next string now) otherwise with error codes embedded in the same string.
STEP 7: Go to STEP 2 until game reaches a conclusion
STEP 8: MATLAB: Free the resources, save log file (every thing: Images, debug info, moves etc. etc. is logged for later analysis)
Future Expansion: Ver. 4: PC will be replaced by Raspberry Pi to make it standalone in TL_RAM Ver 4
More:
A KitKat (break and make) PCB is provided. All the robot's structural parts (the links etc) are made from PCB.
A USB web cam is used. Provision is kept (on PCB) to use image sensor module directly instead of USB-web-camera.
Cost:
Around $60US OR INR3,600/-
Purpose made for students and hobbits to learn the basic concepts of robotics.
Work is in progress for a hard-bound paper book !
eBook is being developed (along with source-code) on www.WittyRobo.com
Видео Arduino Robot Arm plays Tic Tac Toe using MATLAB and C-program канала WittyRobo
This video is for TL_RAM Ver 3
(The older Video was TL_RAM Ver 2)
The Game:
The robot can play N x M Tic-Tac-Toe
Where K-in a line is winner
In this video N = M = 5 and K = 4
The arena shown in the video, has a provision of playing 5x5, 6x6 and 7x7 Tic-Tac-Toe
The video shows 3-matches between Human and Robot
with 5x5 Tic Tac Toe; 4 in a line wins
MATLAB program runs on PC
C-program runs on Arduino
Working:
STEP 1: MATLAB(R): Checks if Arduino is connected to PC and responding
STEP 2: MATLAB: Takes a snap-shot from camera,
converts game-arena image to 5x5 numeric matrix,
checks if one more checker is added,
repeats this step until human has played
also checks for cheating/manipulation
audio is played from time to time using opensource Text To Speech
STEP 3: MATLAB : Apply game strategy algo :
Computes cost-matrix, finds a defensive move if offensive move is NOT found.
Game difficulty levels can be set
Finally returns the row and column number where the next move is to played
STEP 4: MATLAB:
The row and column numbers are converted to Cartesian coordinates.
The checker is to be moved from the storage rack to the board by moving both the arm-links with certain angles.
The coordinate info is translated to angles using basic trigonometry
The angles are converted to Servo motor counts.
STEP 5: MATLAB: A 21-char string, named TL_RAM Protocol string is prepared containing: the servo motor counts and is passed to Arduino. The C-program (hex) process (parses) the protocol string by activating Servo(s), Electro magnet, flash light, buzzer, status-LED(s).
STEP 6: Arduino : If all is successful the Arduino returns the same string back; (this way the MATLAB program knows it can send next string now) otherwise with error codes embedded in the same string.
STEP 7: Go to STEP 2 until game reaches a conclusion
STEP 8: MATLAB: Free the resources, save log file (every thing: Images, debug info, moves etc. etc. is logged for later analysis)
Future Expansion: Ver. 4: PC will be replaced by Raspberry Pi to make it standalone in TL_RAM Ver 4
More:
A KitKat (break and make) PCB is provided. All the robot's structural parts (the links etc) are made from PCB.
A USB web cam is used. Provision is kept (on PCB) to use image sensor module directly instead of USB-web-camera.
Cost:
Around $60US OR INR3,600/-
Purpose made for students and hobbits to learn the basic concepts of robotics.
Work is in progress for a hard-bound paper book !
eBook is being developed (along with source-code) on www.WittyRobo.com
Видео Arduino Robot Arm plays Tic Tac Toe using MATLAB and C-program канала WittyRobo
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Digital Logic Design Part 4 : Binary Adders and Subtractors (HINDI)Board Game Playing Robot: Two Link Robot Arm Model (TL_RAM): Jimney V1.0 plays TicTacToe with humanDigital Logic Design Part 1 : Subject Introduction and Books (HINDI)MATLAB (HINDI) Part 03 : Thinking logically: 2D Matrices: Black and White ImagesArduino Programming Basics : Part 7 (HINDI): Colour Sensor TCS-230 TCS-3200PebbleBot Part 1: Release VideoFlipFlop (Hindi) Part 2a: Applications of FlipFLop: RegistersDeshI Quadcopter HINDI Part06: Prototyping and Versions 0 to 3DeshI Quadcopter HINDI Part08a: Test Flight with optimized ParametersTicTacToe Playing Robotic Arm (SCARA)DeshI Quadcopter HINDI Part01: Introduction and Block DiagramArduino Programming Basics : Part 8a (HINDI): Stepper Motor TypesDeshI Quadcopter HINDI Part03: Block Diagram Layer 2: Motors and DriversDigital Logic Design Part 2 : Switches and Logic Gates Introduction (HINDI)MATLAB (HINDI) Part 05 : Developing a GUI Tool: ROI Editor for TL_RAM RobotArduino Programming Basics : Part 3 (HINDI): Switch, IR-Sensor, PWMMATLAB (HINDI) Part 01 : Language Basics: Matrices and ArraysMATLAB (HINDI) Part 02 : Scripts and Plotting FunctionsArduino POV Persistence of Vision Propeller ClockArduino Programming Basics : Part 1 (HINDI): LEDs and Seven Segment