Write a program to operate the pololu robot

Assignment Help C/C++ Programming
Reference no: EM131669794

Introduction to Computing Assignments

Assignment 1 - Pololu Robot Line Sensors

1. Administration

Requirements  - Design and implement a C++ program for the following specification. The program is to be written using the online mbed compiler for the Pololu robot.

2. Program Overview -

Requirements

  • Write a program to operate the Pololu robot so it follows a black line on the floor.
  • Use the design in the given structure diagrams.
  • The robot should stop if it goes off the line.
  • If the line is a loop, the robot should run until you stop it by turning off its power. Suitable lines will be provided (straight line, circle and ellipse).

Program Design

A program design is provided in the given structure diagrams. Write your program from these diagrams. The diagrams only show operational program statements. You also need to write include statements, function prototypes, variable and constant definitions, etc, even though these are not shown on the diagrams.

Assessment

The assessment of your program for this assignment will be based mainly on (but may not be limited to) the following points:

  • Source code compiles and links ("builds") without any errors or (significant) warnings.
  • The program runs according to the requirements.
  • Uses the design on the given structure diagrams.
  • Source code is correctly formatted (good layout).
  • Source code is appropriately commented.
  • Uses function prototypes.
  • Uses appropriate named constants and variable names.
  • Uses local variables whenever appropriate.
  • Displays appropriate information on the PC (time, line position, sensor values).
  • The display on the PC is well formatted.

The program will be tested on a straight line, a circle and an ellipse, as available in the lab.

Assignment 2 - Voltage Divider Design

1. Administration

Requirements - Write a C++ program for the following specification and structure diagarms, using Visual Studio.

2. Program Specification

Overview

You are required to design a program to calculate the best possible standard resistors to use for a voltage divider circuit to get the required circuit gain. The circuit will contain 2 to 4 resistors as in the following circuit diagram.

429_figure.png

Requirements

  • Write a program to calculate the optimum resistor values for a voltage divider circuit.
  • Use the design in the given structure diagrams.

In this assignment, you need to demonstrate that you can:

  • write your own functions and call them correctly,
  • use arrays, including passing an array as a function parameter,
  • use reference parameters.

Some aspects of the assignment specification are designed to ensure that you meet these requirements.

Program Design

A program design is provided in the given structure diagrams. Write your program from these diagrams. The diagrams only show operational program statements. You also need to write include statements, function prototypes, variable and constant definitions, etc, even though these are not shown on the diagrams.

Sustainability Requirement

It is possible to quarter the run time of the program with a simple optimisation. If R1 and R2 have different values, it does not matter which resistor has which value, because the resistors are in series. The same applies to R3 and R4. The R1 loop should step through all the resistor array values from 1.0 to 100 k inclusive, excluding the zero value. But it is only necessary for the R2 loop to step through values from R1 (inclusive) to 100k, plus the zero value. This avoids calculating the same combination twice, with the values of R1 and R2 swapped. The same applies to R3 and R4.

4. Assessment

The assessment of your program for this assignment will be based mainly on (but may not be limited to) the following points, worth one mark each.

This scheme may change slightly, depending on the programs submitted.

1. Compiles without errors or warnings

2. Layout is appropriate (indenting, etc)

3. Commented appropriately

4. Constant definitions used appropriately

5. Variable names/types are appropriate

6. Function prototypes all correct

7. Main title is displayed

8. Function calls all correct

9. Checks for valid input

10. Input uses cin.fail to check input

11. Checks for invalid gain value

12. Loops correctly

13. Calculate loops correctly

14. Looping is optimised

15. Finds the best gain correctly

16. Sustainability implemented

17. Returns results correctly

18. Output displays entered values

19. Displays results

20. Display format is correct

Additional marks will be deducted for the use of global variables, not writing the required functions and using techniques not already taught on this course.

Attachment:- Assignment Files.rar

Reference no: EM131669794

Questions Cloud

Describe an overview of your data analysis approach : Come up with a research study, not the one you are currently plugging along studying, but another one, perhaps one that might spiral off of the one.
Research findings on cultural differences in traditions : Create a 2-slide Microsoft® PowerPoint®, research-based presentation to help employees understand the interpretation of traditions w/speaker notes.
Describe how the interpretation of the symptoms varies : Identify symptoms of your selected disorder and describe how the interpretation of the symptoms varies across cultures.
Discuss the average natural resource consumption required : Then select a specific dietary choice and discuss the average natural resource consumption required for the components for a typical meal for that diet.
Write a program to operate the pololu robot : ENSE504 Introduction to Computing Assignments. Write a program to operate the Pololu robot so it follows a black line on the floor
Provide a synopsis for each section of an iep : Provide a synopsis for each section of an IEP. Describe 3-5 team teaching models and include benefits and drawbacks of each.
How important would interpersonal skills in given position : If global business interests you, consider working for a U.S. government agency that supports or regulates international trade.
Explain the skills and experience required to serve : Explain The skills and experience required to serve in that position. The salary range advertised for the position. A description of position and its duties.
How many japanese yen does one us dollar buy right now : Companies involved in international trade have to watch the foreign exchange rates of the countries in which they do business.

Reviews

len1669794

10/6/2017 1:53:22 AM

Hi, so this for engineering honors level , name of course " ENSE504 Introduction to Computing ". I have 2 assignments, I want you to use used mbed compilers it is similar to C++ however the libraries are different note this is only for assignment 2 and assignment 3 is a program about ohms law use visual studio for this and if you don’t know mbed complier use for all of them. Use C++ coding. If you want I can give you all my lecture notes that I have done so far if you need them.

len1669794

10/6/2017 1:53:21 AM

Hi, so this for engineering honors level , name of course " ENSE504 Introduction to Computing ". I have 2 assignments, I want you to use used mbed compilers it is similar to C++ however the libraries are different note this is only for assignment 2 and assignment 3 is a program about ohms law use visual studio for this and if you don’t know mbed complier use for all of them. Use C++ coding. If you want I can give you all my lecture notes that I have done so far if you need them.

len1669794

10/6/2017 1:53:14 AM

You must upload a copy of your C++ program source code (.cpp) file to Turnitin. To make a submission to Turnitin: Make a text file copy of your C++ program code: copy the entire contents of your C++ (cpp) file from the mbed website, paste it into a text file on the PC, save the text file, with your ID number in the file name.

len1669794

10/6/2017 1:53:06 AM

It is your responsibility to ensure you submit the correct file. Only the cpp file is acceptable. Do not submit any other Visual Studio files such as the solution or project files or executable file or other text files. They will not be marked. After uploading the file, be sure to click the "Submit" button before leaving Turnitin. If you do not click the Submit button, the upload will not be complete. After the upload is complete, you will see a Turnitin Digital Receipt. You can save or print this as evidence that you have submitted your file successfully. You can upload the file more than once. I will only receive the last file you upload. This means, if you upload a file and then decide to modify it, you can upload the modified file and it will replace the file uploaded earlier.

len1669794

10/6/2017 1:52:57 AM

In Assignment 2 - Use a while or do-while loop to check that the input gain is valid, and repeat the input until a valid value is entered. (Using an if statement is not correct, because after an incorrect entry, the next entered value may also be incorrect.) Use for loops to step through the resistor values for the gain calculations, because the number of loop repetitions is known. Use a single array of standard resistor values from 1.0 to 100 k (inclusive) plus the zero value. The values of R1 and R3 can be any of the E12 standard values in the range from 1.0 to 100 k inclusive, but cannot be zero. The values of R2 and R4 can be any value in the array.

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd