Write a program including any necessary subroutines

Assignment Help Computer Engineering
Reference no: EM132153472

In one competition, the robot was required to use a color sensor to distinguish one object from another object. The color sensor returned three analog values on three wires.

The first signal represented the amount of red seen. The second wire represented the amount of green seen.

The third wire represented the amount of blue seen. The voltage levels on the three analog signals are bounded to ov-2.5V.

Assume red is on pin PTB0, green on PTB1, and blue on PTB2. You are to write a program, including any necessary subroutines or interrupts, that will update a global variable called "object type" at least 10 times per second.

If the colors seen are 70% of maximum red, 30% of maximum green and 10% of maximum blue, all within 5% of maximum on each channel, the object type should have a value of 1.

If the colors seen are 40% of maximum red, 80% of maximum green and 70% of maximum blue, all within 5% of maximum on each channel, the object type should have a value of 2. If red, green, and blue are all below 10% of maximum or all above 90% of maximum, the object type should have a value of 0. In any other case, the object type should have a value of -1.

Reference no: EM132153472

Questions Cloud

What are important characteristics of a cryptographic key : What are two most important characteristics of a cryptographic key in determining the strength of a cryptographic system?
What is twitters network architecture : What is Twitter's network architecture? How connection is established and how tweets transfer and apper for followers
Total economic cost of taking the ski trip : They estimate your share of the gas, motel, lift tickets, and other expenses to be around $50. What is your total economic cost of taking the ski trip?
Combination of inputs that minimizes the cost of producing : Suppose that Q = K1/2L1/2, w = $2 and r = $2. The combination of inputs that minimizes the cost of producing 2000 units and the total cost are:
Write a program including any necessary subroutines : Write a program, including any necessary subroutines or interrupts, that will update a global variable called "object type" at least 10 times per second.
Could a black market help with the shortage : Does the government create housing shortages unintentionally through policy sometimes. Could a black market help with the shortage
Write a program that will take inputs and store in text file : Write a program that will take 3 inputs and store in a text file. Input one will be a song title, two will be its highest place .
Why would we expect rising risk premiums : Why would we expect rising risk premiums to occur at the same time a yield curve inverts?
Show how they compute the shared secret : A trusted third party defines a secret line y = ax + b, and sends one point on the line to each of Alexis and Barry Alexis gets the point.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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