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
Give me an A please!!!¡!!!!¡
Andrei [34K]

Answer:

I am in 6th grade why am i in high school things.

Explanation:

8 0
3 years ago
A TPMS (tire pressure monitoring system) instrument panel indicator lamp is on. Technician A says the most likely cause is low t
zheka24 [161]

Answer:

Actualmente estoy trabajando en una pregunta diferente en este momento.

Explanation:

Actualmente estoy trabajando en una pregunta diferente en este momento.

6 0
3 years ago
Find the mechanical average of a wheel axle System of the wheel has a radius of 1.5 feet in the accident has a radius of 6 inche
kvasek [131]

Answer:

Mechanical average of a wheel = 3

Explanation:

Given:

Radius of wheel = 1.5 ft = 1.5 x 12 = 18 inches

Radius of axle = 6 inches

Find:

Mechanical average of a wheel

Computation:

Mechanical average of a wheel = Radius of wheel / Radius of axle

Mechanical average of a wheel = 18 / 6

Mechanical average of a wheel = 3

4 0
3 years ago
Car B is traveling a distance dd ahead of car A. Both cars are traveling at 60 ft/s when the driver of B suddenly applies the br
vagabundo [1.1K]

Answer:

Explanation:

Using the kinematics equation v = v_o + a_ct to determine the velocity of car B.

where;

v_o = initial velocity

a_c = constant deceleration

Assuming the constant deceleration is = -12 ft/s^2

Also, the kinematic equation that relates to the distance with the time is:

S = d + v_ot + \dfrac{1}{2}at^2

Then:

v_B = 60-12t

The distance traveled by car B in the given time (t) is expressed as:

S_B = d + 60 t - \dfrac{1}{2}(12t^2)

For car A, the needed time (t) to come to rest is:

v_A = 60 - 18(t-0.75)

Also, the distance traveled by car A in the given time (t) is expressed as:

S_A = 60  * 0.75 +60(t-0.75) -\dfrac{1}{2}*18*(t-0.750)^2

Relating both velocities:

v_B = v_A

60-12t = 60 - 18(t-0.75)

60-12t =73.5 - 18t

60- 73.5 = - 18t+ 12t

-13.5 =-6t

t = 2.25 s

At t = 2.25s, the required minimum distance can be estimated by equating both distances traveled by both cars

i.e.

S_B = S_A

d + 60 t - \dfrac{1}{2}(12t^2) = 60  * 0.75 +60(t-0.75) -\dfrac{1}{2}*18*(t-0.750)^2

d + 60 (2.25) - \dfrac{1}{2}(12*(2.25)^2) = 60  * 0.75 +60((2.25)-0.75) -\dfrac{1}{2}*18*((2.25)-0.750)^2

d + 104.625 = 114.75

d = 114.75 - 104.625

d = 10.125 ft

3 0
3 years ago
NO LINK plsssss just answer
solmaris [256]

Answer:

Explanation:

4 0
2 years ago
Other questions:
  • Two balanced Y-connected loads in parallel, one drawing 15kW at 0.6 power factor lagging and the other drawing 10kVA at 0.8 powe
    13·1 answer
  • A heavy ball with a weight of 100 N is hung from the ceiling of a lecture hall on a 4.3-m-long rope. The ball is pulled to one s
    12·1 answer
  • 2 Consider airflow over a plate surface maintained at a temperature of 220°C. The temperature profile of the airflow is given as
    13·1 answer
  • ¿Cuándo se formarán cristales en una mezcla que se está evaporando?
    9·1 answer
  • Which line from "On Becoming an Inventor" supports the idea that Dean's time at Worcester Polytechnic Institute was very useful
    13·2 answers
  • Help Please!!!!!!!<br><br> Whatever3443<br> Please help!
    9·2 answers
  • A compressed-air drill requires an air supply of 0.25 kg/s at gauge pressure of 650 kPa at the drill. The hose from the air comp
    6·1 answer
  • 6. Question
    13·1 answer
  • A soil element is subjected to a minor principle stress of 50 kPa on a plane rotated 20 ° counterclockwise from vertical. If the
    10·1 answer
  • Technician A says that the use of methanol in internal combustion engines has declined over the years. Technician B says that th
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!