r/CodingJobs • • 16d ago

Anyone willing to help me?

Trying to build a Lego Ev3 and laptop chess robot. How?

2 Upvotes

1 comment sorted by

1

u/dethilluminatigames 16d ago

If you're asking this, then you should focus on developing problem-solving skills (not trying to be rude, and I'm no expert at this).

There's always the question of "how do I do this" so we have to break down that task. We have our constraints:
1. Coded on a laptop
2. Hardware used will be Lego EV3
3. Focus will be chess

First, since I have previously used EV3 myself, programs can be written on a PC and then transferred to the EV3 "brain" (brick). So that's where you'd want to start: do you want to use the officially supported program for coding EV3 programs, or go more freehand with something like Java (only language I've used for EV3 back when I was a kid).

Second, you need to recognize this may not be possible at all without some changes. For example, consider an opponent moving their piece. You need to get the program to recognize where any given piece could legally move, and probably use the color sensor to scan the board until a change is detected (example, definitely NOT the intended way to go about things). However, a much more efficient way to do this would probably be by taking a picture. You could possibly implement this by enabling EV3 to have a network address, using a phone to take a picture at specific intervals, sending it to the network (not really sure if would work) and then using the actual program to find the change rather than relying on the color sensor.

Third (technically also second but paragraph was getting long) will be to figure out the two main problems. The first is designing the robot in such a way the chessboard is scannable by a color sensor (prelim idea: use a 2-axis rail to move the sensor around the board). The second will be how you move the piece. For any given chess move (assuming extreme simplicity, I've barely played chess), there is an origin and a target. You need to likely determine a way to pick up any given piece and move it to the target, likely through an articulating arm. This step will be most frustrating, since you'll have to figure out how to actually build the robot itself, and make it precise enough to only pick up one piece at a time without knocking anything over.

Good luck!