Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Assignment: Must be submitted Please note that all the programming assignments in this courses are for the mbed board with LPC1768 microcontroller that is

image text in transcribed
Programming Assignment: Must be submitted Please note that all the programming assignments in this courses are for the mbed board with LPC1768 microcontroller that is referred to in the text book and is used for labs. 1. Write a C program to control an autonomous robot. It runs on two wheels, each wheel connected to a DC motor. If both wheels run at the same speed, robot moves forward. If the right wheel runs slower, robot makes a right turn. There are two sensors mounted on the robot that can detect an obstacle, one in the front, one on the right. Once the robot is turned on, it moves forward at 80% of the maximum possible speed, when an obstacle is detected in front, if there is nothing blocking on the right side; it slows down to 40% of maximum speed and then it makes a right turn. Unless there is an obstacle on the right side too, then the robot will stop. You must use PWM to control the wheels. The sensor outputs are digital, the mbed board will detect low when no obstacle and will detect high, when there is an obstacle. This is pin conn for this robot. Right wheel pin 21 Left wheel pin 22 Front sensor pin 10 Right sensor pin 11 Use a flowchart to show the algorithm of your program. Write a C program that turns on the following LEDs depending on the input voltage that is applied to pin 20 as shown in the table. VnLED that is on 2. None LED1 LED2 LED3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions

Question

2. Identify the employees who are included in the plan.

Answered: 1 week ago

Question

7. Discuss the implications of a skill-based pay plan for training.

Answered: 1 week ago