Suggest ways to make the code more efficient

Assignment Help Electrical Engineering
Reference no: EM13230242

Write an Arduino program that requests a floating point number from the user console that is between -1000 and 1000. The program is to input the number character-by-character and then assemble them together so that the original number is put into a floating point variable and displayed back to the monitor.

1. Do the computing in a function that is passed the floating point number. The number should be passed from the main function. 

2. A check should be made to see if the number is in the appropriate range.

3. This should be done using the Serial.read() command. (The comparable C command is gets()).

4. The program is intended to be used in a larger program that receives the floating point number from the console to be used within the Arduino program.

 5. Carefully comment your code.

6. Suggest ways to make the code more efficient.

Reference no: EM13230242

Questions Cloud

What approaches can be taken to develop a supply chain : What approaches can be taken to develop a supply chain infrastructure that provide an accurate view of overall channel performance?
What is the velocity of propagation in the cable : A certain transmission line is 10 meters long. Measurements indicate that the total inductance of the cable is 16 uH. Standing wave measurements indicate that the voltage reflection coefficient at the load is 0.5 + j0
Explain what is the concentration ratio of the free toxic : what is the concentration ratio of the free (and potentially toxic) Pb^2+(aq) in the blood to the much less toxic Pb^2+ -EDTA complex?
Describe impact of culture on managerial decision-making : Describe the impact of culture on managerial decision-making and describe the dimensions of power distance, uncertainty avoidance, individualism/collectivism, and masculinity/femininity.
Suggest ways to make the code more efficient : The program is to input the number character-by-character and then assemble them together so that the original number is put into a floating point variable and displayed back to the monitor.
Fifth annual clean hands report card survey : The soap and detergent association issued its fifth annual clean hands report card survey for 2009.
The injury severity between younger and older children : A study in pediatric emergency care compared the injury severity between younger and older children.
Mpg for pickup trucks is not the same for all four engine : Random samples of 2009 pickup trucks with 4 cylinder, 5 cylinder, 6 cylinder, and 8 cylinder engines were obtained. Each pickup truck was tested for miles per gallons in highway driving
Bargains on the menu-and a side of jitters : Boston Globe article "bargains on the menu-and a Side of Jitters" reported concerns

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Define asynchronous and synchronous communication mode

What are the respective advantages and disadvantages of the asynchronous and synchronous communication modes from a reliability perspective?

  Electricity and circuit theory

Assessment on Electricity and Circuit Theory,  What part of a cable are insulators and conductors? Describe, in terms of charged particles, why some objects are electrically attracted to each other, while others repel each other?

  Derive an expression for the incremental work

A positive charge of magnitude q1 lies at the origin. Derive an expression for the incremental work done in moving a second point charge q2 through a distance dx from the starting position (x, y, z) in the direction -ax.

  Determine the efficiency of a high frequency induction

determine the efficiency of a high frequency induction furnace which takes 10 minutes to melt 1.815 kg of aluminium the input of the furnace being 5 KW and the initial temperature 15 deg.

  Determine the self inductance of coil 1-l11

a) Determine the self inductance of coil 1, L11 b) Determine the self inductance of coil 2 L22 c) Determine the mutual inductance between the two coils, L12 or L21

  Estimate the worst case variation in film thickness

A wafer 100mm in diameter is mounted in an electron-beam evaporation system in which spherical radius is 40cm. Estimate the worst case variation in film thickness between the center and edges of the wafer for an evaporated aluminium 1micro meter t..

  What is the magnitude and direction of the current flowing

what is the magnitude and direction of the current flowing through the cross section?

  Explain the principles of electromagnetic radiation

Explain the structure and nature of the ionosphere with reference to daily, seasonal and long-term changes and explain the modes of propagation of radio waves of different frequencies

  Determine the bandwidth of the fm modulator output

A sinusoidal message signal has a frequency of 10 Hz. The signal is the input to an FM modulator with an index of 8. Determine the bandwidth of the modulator output if a power ratio, Pr = 0.8 is required.

  Determine angular frequency and period for undamped cases

The following 4 differential equations describe mass spring systems. Identify each system as either undamped, overdamped, underdamped, or critically damped (Justify your answer). Determine the angular frequency and period for the undamped and the ..

  At what time will the voltage across the capacitor

Signal generator‘s internal impedance is purely resistive and has an open-circuit voltage of 3.5 V. When the generator is loaded with 22 ohms of resistance, its terminal voltage drops to 2.8 V. What is the generator's output impedance (pure resist..

  Find the average value of the function

A generator provides the following voltage signal: v(t) = 2 + 3 sin(100pi) + 4 cos(250pi). Find the average value of the function. Note: pi = 3.1416 in this equation.

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