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
state & prove parallelogram law of vector addition &Also determine magnitude &direction of resultant vector.​
ludmilkaskok [199]

Answer:

Parallelogram law of vector addition states that if two vectors are considered to be the adjacent sides of a parallelogram, then the resultant of the two vectors is given by the vector that is diagonal passing through the point of contact of two vectors.

8 0
3 years ago
Steam enters a turbine steadily at 7 MPa and 600°C with a velocity of 60 m/s and leaves at 25 kPa with a quality of 95 percent.
Rufina [12.5K]

Answer:

a) \dot m = 16.168\,\frac{kg}{s}, b) v_{out} = 680.590\,\frac{m}{s}, c) \dot W_{out} = 18276.307\,kW

Explanation:

A turbine is a steady-state devices which transforms fluid energy into mechanical energy and is modelled after the Principle of Mass Conservation and First Law of Thermodynamics, whose expressions are described hereafter:

Mass Balance

\frac{v_{in}\cdot A_{in}}{\nu_{in}} - \frac{v_{out}\cdot A_{out}}{\nu_{out}} = 0

Energy Balance

-q_{loss} - w_{out} + h_{in} - h_{out} = 0

Specific volumes and enthalpies are obtained from property tables for steam:

Inlet (Superheated Steam)

\nu_{in} = 0.055665\,\frac{m^{3}}{kg}

h_{in} = 3650.6\,\frac{kJ}{kg}

Outlet (Liquid-Vapor Mix)

\nu_{out} = 5.89328\,\frac{m^{3}}{kg}

h_{out} = 2500.2\,\frac{kJ}{kg}

a) The mass flow rate of the steam is:

\dot m = \frac{v_{in}\cdot A_{in}}{\nu_{in}}

\dot m = \frac{\left(60\,\frac{m}{s} \right)\cdot (0.015\,m^{2})}{0.055665\,\frac{m^{3}}{kg} }

\dot m = 16.168\,\frac{kg}{s}

b) The exit velocity of steam is:

\dot m = \frac{v_{out}\cdot A_{out}}{\nu_{out}}

v_{out} = \frac{\dot m \cdot \nu_{out}}{A_{out}}

v_{out} = \frac{\left(16.168\,\frac{kg}{s} \right)\cdot \left(5.89328\,\frac{m^{3}}{kg} \right)}{0.14\,m^{2}}

v_{out} = 680.590\,\frac{m}{s}

c) The power output of the steam turbine is:

\dot W_{out} = \dot m \cdot (-q_{loss} + h_{in}-h_{out})

\dot W_{out} = \left(16.168\,\frac{kg}{s} \right)\cdot \left(-20\,\frac{kJ}{kg} + 3650.6\,\frac{kJ}{kg} - 2500.2\,\frac{kJ}{kg}\right)

\dot W_{out} = 18276.307\,kW

6 0
3 years ago
While discussing the testing of a Hall-effect switch:
sergejj [24]

Answer:

your answer is technician A

6 0
3 years ago
Air in a piston–cylinder assembly, initially at 3 bar, 142 K, and a volume of 2 m3. The air undergoes a process to a state where
Archy [21]

Answer:

mass of the air = 14.62kg

Workdone = 415.88 kJ

Heat transfer = 415.88 kJ

Explanation:

Please find the attached files for the solution

6 0
3 years ago
Read 2 more answers
What are the characteristics of carbon fibre?
nexus9112 [7]

Answer:

high tensile strenth

high stiffness

Explanation:

5 0
3 years ago
Other questions:
  • What happens when a larger force is applied?
    9·1 answer
  • The emissivity of galvanized steel sheet, a common roofing material, is ε = 0.13 at temperatures around 300 K, while its absorpt
    7·1 answer
  • Determine the maximum volume in gallons​ [gal] of olive oil that can be stored in a closed cylindrical silo with a diameter of 3
    12·1 answer
  • Air expands through an ideal turbine from 1 MPa, 900 K to 0.1 MPa, 500K. The inlet velocity is small compared to the exit veloci
    10·1 answer
  • The three resistors in the circuit shown have values of 4ohms 4ohms and 2ohms. The battery has a value of 12 volts. What is the
    11·1 answer
  • Tim was recently released from his last job. He was very rigid and would not change a product design once he began a project. He
    7·1 answer
  • How many grams of perchloric acid, HClO4, are contained in 37.6 g of 70.5 wt% aqueous perchloric acid? How many grams of water a
    10·1 answer
  • A large class with 1,000 students took a quiz consisting of ten questions. To get an A, students needed to get 9 or 10 questions
    10·1 answer
  • Air is compressed in an isentropic process from an initial pressure and temperature of P1 = 90 kPa and T1=22°C to a final pressu
    7·1 answer
  • At a retirement party, a coworker described terry as dedicated
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!