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
Jack has been concerned about the rapidly changing green regulations in his state and his ability as a mechanical engineer to ke
uysha [10]

Answer:

Option A, B and D

Explanation:

Jack can easily convince boss if he focus around two major aspects of the company

a) Revenue enhancement - Jack must outline the benefits of his research that can be used to improvise customer offerings and  hence can be further used to devise more energy-efficient options to customer

b) Reduction in mistakes - Issues such as poor implementation can be avoided with better approach and understanding.

Hence, option A, B and D are correct

3 0
3 years ago
Are ocean currents always cold
swat32

Answer:

The surface ocean currents have a strong effect on Earth's climate. ... However, these areas do not constantly get warmer and warmer, because the ocean currents and winds transport the heat from the lower latitudes near the equator to higher latitudes near the poles.

8 0
3 years ago
In the construction of a large reactor pressure vessel, a new steel alloy with a plane strain fracture toughness of 55 MPa-m1/2
sp2606 [1]

Answer:

l=24mm

Explanation:

From the question we are told that:

Plane strain fracture toughness of T=55 MPa-m1/2

Y value Y=1.0

Stress level of\sigma =200 MPa

Generally the equation for length of a surface crack is mathematically given by

l=\frac{1}{\pi}(\frac{T}{Y*\sigma})^2

l=\frac{1}{3.142}(\frac{55}{1*200})^2

l=0.024m

Therefore

in mm

l=24mm

6 0
3 years ago
Is the ASUS ROG Strix B450-F Gaming amd ryzen 5 3600 ready?
Ulleksa [173]

Answer:

yep

Explanation:

7 0
3 years ago
Read 2 more answers
A silicon carbide plate fractured in bending when a blunt load was applied to the plate center. The distance between the fractur
Amanda [17]

Question in order:

A silicon carbide plate fractures in bending when a blunt load was applied to the plate center. The distance between the fracture origin and the mirror/mist boundary on the fracture surface was 0.796 mm. To determine the stress used to break the plate, three samples of the same material were tested and produced the following. What is the estimate of the stress present at the time of fracture for the original plate?

Mirror Radius (mm) Bending Failure Stress (MPa)

0.603                         225

0.203                         368

0.162                         442

Answer:

191 MPa

Explanation:

Failure stress of bending is Inversely proportional to the mirror radius

Bending Stress = \frac{1}{(Mirror Radius)^{n}}

At mirror radius 1 = 0.603 mm   Bending stress 1 = 225 Mpa..............(1)

At mirror radius 2 = 0.203 mm  Bending stress 2 = 368 Mpa...............(2)

At mirror radius 3 = 0.162 mm   Bending stress 3 = 442 Mpa...............(3)

comparing case 1 and 2 using the above equation

\frac{Stress 1}{Stress 2} = ({\frac{Radius 2}{Radius 1}})^{n_1}

\frac{225}{368} = ({\frac{0.203}{0.603}})^{n_1}

0.6114 = (0.3366)^{n_1}

Taking the natural logarithm of both side

ln(0.6114) = n ln(0.3366)

n₁ = ln(0.6114)/ln(0.3366)

n₁ = 0.452

comparing case 2 and 3 using the above equation

\frac{Stress 2}{Stress 3} = ({\frac{Radius 3}{Radius 2}})^{n_2}

\frac{368}{442} = ({\frac{0.162}{0.203}})^{n_2}

0.8326 = (0.7980)^{n_2}

Taking the natural logarithm of both side

ln(0.8326) = n ln(0.7980)

n₂ = ln(0.8326)/ln(0.7980)

n₂ = 0.821

comparing case 1 and 3 using the above equation

\frac{Stress 1}{Stress 3} = ({\frac{Radius 3}{Radius 1}})^{n_3}

\frac{225}{442} = ({\frac{0.162}{0.603}})^{n_3}

0.5090 = (0.2687)^{n_3}

Taking the natural logarithm of both side

ln(0.5090) = n ln(0.2687)

n₃ = ln(0.5090)/ln(0.2687)

n₃ = 0.514

average for n

n = \frac{n_1 + n_2 + n_3}{3}

n = \frac{0.452 +0.821 + 0.514}{3}

n = 0.596

Hence to get bending stress x at mirror radius 0.796

\frac{Stress x}{Stress 3} = ({\frac{Radius 3}{Radius x}})^{0.596}

\frac{Stress x}{225} = ({\frac{0.603}{0.796}})^{0.596}

\frac{Stress x}{225} = 0.8475

stress x = 191 MPa

3 0
3 years ago
Other questions:
  • an adiabatic compressor receives 1.5 meter cube per second of air at 30 degrees celsius and 101 kpa. The discharge pressure is 5
    11·1 answer
  • Which of the following describes fibers? a)- Single crystals with extremely large length-to-diameter ratios. b)- Polycrystalline
    10·1 answer
  • Consider two water tanks filled with water. The first tank is 8 m high and is stationary, while the second tank is 2 m high and
    12·2 answers
  • The price of a single item within a group of items is
    8·1 answer
  • SEICUL UC CULTELL allsvel.
    9·2 answers
  • Who is using welding symbols to to communicate the detailed information necessary for welders to complete the weld?
    6·1 answer
  • Three bars each made of different materials are connected together and placed between two walls when the temperature is 12 oC. D
    9·1 answer
  • Limestone scrubbing is used to remove SO2 in a flue gas desulfurization (FGD) system. Relevant reactions are given below. A lime
    8·1 answer
  • An engine has been diagnosed with blowby.
    12·1 answer
  • Technician a says that personal protective equipment (ppe) does not include clothing. technician b says that the ppe used should
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!