1 of 17

Hands-on Robotics Workshop

INSTRUCTORS: DR. FATH,

 COOPER DUGGAN, ALEXANDER HOEFER, LANHJAMIN TRAN

1

WORKSHOP 6.27.2025

2 of 17

Robot Hands-on Activities by Programming using a Phone

SECTION 2

2

3 of 17

Downloading the Application�from the App Store� or Google Play

3

4 of 17

Main Menu in the App

4

5 of 17

Control the Car with App

5

6 of 17

Programming Interface

6

7 of 17

Basic Movement Control

  • Forward slowly for 1 second
  • Backward slowly for 1 second
  • Turn Left slowly for 1 second
  • Turn Right slowly for 1 second

7

8 of 17

Move When Car Picked Up

8

9 of 17

Rotate right and left if phone is up and down

9

10 of 17

Move Forward when the phone is up and Backward when obstacle in the front

10

11 of 17

Obstacle avoidance

11

12 of 17

Obstacle Avoidance

12

Now, using the cardboard boxes the robot cars came in, construct a small course for your vehicles to navigate through.

Using the sonar sensor on the front of your cars, build a program that allows your car to navigate through the course.

13 of 17

Hints:

13

Hint: the MATH tab allows you to compare values in your IF statement. This can let your car detect an obstacle at whatever distance (approximately in centimeters) you would like it to turn at.

By using the servo control feature in the movement tab (and some IF statements), you can have your car look left and right to choose which direction to turn.

Sometimes, the cars like to get "stuck" on movement commands. This is a bug, and if it occurs, simply restart your program.

  • Based on your speed (Recommended Slow) use the appropriate time for turning to the desired direction.

14 of 17

Hints:

14

For the servo motor: 90° is straight ahead, 0° is to the right, 150° is to the left

After adjusting the servo angle let the car wait for a second for the sensors to update  

You will need to use multiple if, else loops

15 of 17

Flowchart

15

start

Obstacle

Look Forward

Move Forward

No

Yes

Look Right

Obstacle

No

Yes

Turn Right

Look Left

Obstacle

No

Turn Left

Yes

Move Backward

Turn Right

16 of 17

16

Example program #1

  • Note the use of the "wait" command. This is implemented because the polling rate of the ultrasonic sensor is low, so we want to give it time to update.

17 of 17

17

Example program #2

  • Note the use of the "wait" command. This is implemented because the polling rate of the ultrasonic sensor is low, so we want to give it time to update.