Question: ROBOT 1 - PROGRAM Develop a program that will prompt the user, take button input, draw a path on the screen, move your EV3 lego
ROBOT 1 - PROGRAM
Develop a program that will prompt the user, take button input, draw a path on the screen, move your EV3 lego robot, and play sounds, all using leJOS and Java. Build a Lego EV3 Robot that can do all of those things in leJOS and Java. Follow the following steps:
Prompt the user to run a program where your robot will either perform a turn or veer. Take user input by having them press buttons and checking what button was pressed, or by using button listeners. So if a certain button was pressed, perform a turn, if another certain button was pressed, perform a veer.
Using graphics, draw on the screen the users pick for the path your robot will take by drawing lines and arcs. The paths will be similar to the image below. So if the user wants to perform a turn, draw the turn graphic, and if the user wants to perform a veer, draw the veer graphic. Then draw your name in a larger font on the screen using pixel coordinates. Then start your robot.
Use the robots motors to control the left and right wheels to follow the path chosen by the user. Use Motor methods to change speed, go forward, go backward, veering, and floating to a stop setSpeed, forward, backward, flt, etc .
As your robot makes turns, veers, moves backward, or finishes, play different sounds, tones, or playable .wav files, that you have uploaded to your EV3 brick.
Use lejos in Eclipse to build and upload your program onto your EV3 brick. Then run your lejos program on your EV3 robot. Demonstrate your program to me and show both possible paths.
Document your .java program with at least name, exercise number, and at least 4 - 5 lines at the top explaining what the program does. Then add 5 lines of comments throughout the code explaining what some of the sections of the code are doing. Submit your source code .java file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
