1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
solmaris [256]
3 years ago
15

Write a program to control the operation of the RED/GREEN/BLUE LED (LED2) as follows: 1. If no button is pressed, the LED should

remain OFF. 2. When only Button 1 is pressed, the BLUE LED should blink ON and OFF with a 1 second period. The RED and GREEN LEDs should remain OFF. 3. When only Button 2 is pressed, the RED LED should blink ON and OFF with a 4 second period. The GREEN and BLUE LEDs should remain OFF. 4. When both Buttons are pressed, the GREEN LED should blink ON and OFF with a 2 second period. The RED and BLUE LEDs should remain OFF. 5. At no time should two LEDs be on. The states of the Buttons and LEDs are described in Ta
Engineering
1 answer:
aalyn [17]3 years ago
4 0

Answer:

See explaination

Explanation:

int RED=10; int BLUE=11; int GREEN=12; int BUTTON1=8; int BUTTON2=9; void setup() { pinMode(RED, OUTPUT); pinMode(BLUE, OUTPUT); pinMode(GREEN, OUTPUT); pinMode(BUTTON1, INPUT); pinMode(BUTTON2, OUTPUT); } void loop() { int BTN1_STATE=digitalRead(BUTTON1); int BTN2_STATE=digitalRead(BUTTON2); if(BTN1_STATE==HIGH) { digitalWrite(BLUE, HIGH); delay(1000); // Wait for 1 second digitalWrite(BLUE, LOW); } if(BTN2_STATE==HIGH) { digitalWrite(RED, HIGH); delay(4000); // Wait for 4 seconds digitalWrite(RED, LOW); } if(BTN1_STATE==HIGH && BTN2_STATE==HIGH) { digitalWrite(GREEN, HIGH); delay(2000); // Wait for 2 second digitalWrite(GREEN, LOW); } }

You might be interested in
Define the Static Balancing.
liubo4ka [24]

Answer: Static Balancing is when a stationary object has the the ability to balance because its core centre of gravity is on the axis of rotation.

8 0
3 years ago
What information is usually gathered during vehicle crash tests?
aleksley [76]
Time, distance, damage
7 0
3 years ago
In a hydroelectric power plant, water enters the turbine nozzles at 800 kPa absolute with a low velocity. If the nozzle outlets
Whitepunk [10]

Answer:

The answer is VN =37.416 m/s

Explanation:

Recall that:

Pressure (atmospheric) = 100 kPa

So. we solve for the maximum velocity (m/s) to which water can be accelerated by the nozzles

Now,

Pabs =Patm + Pgauge = 800 KN/m²

Thus

PT/9.81 + VT²/2g =PN/9.81  + VN²/2g

Here

Acceleration due to gravity = 9.81 m/s

800/9.81 + 0

= 100/9.81 + VN²/19.62

Here,

9.81 * 2= 19.62

Thus,

VN²/19.62 = 700/9.81

So,

VN² =1400

VN =37.416 m/s

Note: (800 - 100) = 700

7 0
3 years ago
Read 2 more answers
The electron beam in a TV picture tube carries 1015 electrons per second. As a design engineer, determine the voltage needed to
leonid [27]

Answer:

The voltage needed to accelerate the electron beam is 2.46 x 10^16 Volts

Explanation:

The rate of electron flow is given as:

q = 1015 electrons per second

The total current is given by:

Total Current = (Rate of electron flow)(Charge on one electron)

Total Current = I = (1015 electrons/s)(1.6 x 10^-19 C/electron)

I = 1.624 x 10^-16 A

Now, we know that electric power is given as:

Electric Power = Current x Voltage

P = IV

V = P/I

V = 4 W/1.624 X 10^-16 A

<u>V = 2.46 x 10^16 Volts</u>

6 0
3 years ago
What is a heat engine? State its efficiency (a sketch would be appropriate).
dimulka [17.4K]

Answer:

\eta =\dfrac{Q_1-Q_2}{Q_1}

Explanation:

Heat engine

 Heat engine is a device which produce work while consuming some amount of energy .This engine works in cycle.In other words we can say that Heat engine is a device which covert thermal or chemical energy in to mechanical energy and after that this mechanical energy can be use for producing mechanical work.

Heat engine takes heat from high temperature and rejects heat to lower temperature and producing work.

We know that efficiency given as

\eta =\dfrac{out\ put}{in\ put}

From diagram we can say that

Q_1=Q_2+W

So efficiency

\eta =\dfrac{w}{Q_1}

\eta =\dfrac{Q_1-Q_2}{Q_1}

3 0
3 years ago
Other questions:
  • Use the predicate specifications(x, y): x beats yF (x): x is an (American) football teamQ(x, y): x is quarterback of yL(x,y): x
    13·1 answer
  • What is the difference between white and yellow line?
    14·2 answers
  • What is the De Broglie wavelength of an electron under 150 V acceleration?
    13·2 answers
  • What is Absorption in your own words
    12·1 answer
  • Design an op amp circuit to average the input of six sensors used to measure temperature in restaurant griddles for a large fast
    7·1 answer
  • A hypothetical accumulator processor uses one of the following 16-bit instruction formats, depending on the instruction.(a) (10
    6·1 answer
  • A water contains 50.40 mg/L as CaCO3 of carbon dioxide, 190.00 mg/L as CaCO3 of Ca2 and 55.00 mg/L as CaCO3 of Mg2 . All of the
    5·2 answers
  • In a certain chemical plant, a closed tank contains ethyl alcohol to a depth of 71 ft. Air at a pressure of 17 psi fills the gap
    8·1 answer
  • Thermal energy is...
    15·2 answers
  • What is the different between isometric view and isometric projection
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!