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
Design a filter that has infinite DC gain, a gain of one from 1Hz to 100 Hz and filters (1storder) any signals above 100 Hz.a) S
EastWind [94]

Answer:

Attached below are the  sketches

answer :

c) G(s) = 100 / ( s + 100 )

d) y'(t)  + 100Y(s) = 100 X(s)

e) g(t) = e^-100t  u(t)

Explanation:

a) Sketch the bode plot

The filter here is a low pass filter

b) Sketch the s-plane

attached below.     pole ( s ) is at 100

c) write the transfer function of the filter

Transfer function ; G(s) = 100 / ( s + 100 )

d) write the differential equation

Y(s) / X(s) = 100 / s + 100

Y(s) [ s + 100 ] = 100 X(s)

= sY(s) + 100Y = 100 X(s)

∴ differential equation = y'(t)  + 100Y(s) = 100 X(s)

e) write out the unforced transient response

g(t) = e^-100t  u(t)

f) write out the frequency response

attached below

4 0
3 years ago
HELP! It’s for an architecture class on PLATO
vredina [299]

Answer:

ICC

Explanation:

The International Building Code (IBC) is a model building code developed by the International Code Council (ICC). It has been adopted for use as a base code standard by most jurisdictions in the United States.

7 0
3 years ago
Read 2 more answers
We have a parallel-plate capacitor, with each plate having a width W and a length L. The plates are separated by air with a dist
Vesnalui [34]

Answer:

k

Explanation:

8 0
3 years ago
Explain jack plane. please dont copy from go ogle<br>​
Ksju [112]

Jack Plane is designed to take off heavy shavings and squares up rough timber to correct size and quickly removes waste wood.

4 0
3 years ago
Read 2 more answers
Can I just say the spelling error that Odyssey had XD. They said “$15 dollars AND hour” instead of “15 dollars AN hour.” XD
slega [8]

Answer:

mini spelling error

Explanation:

haha

5 0
3 years ago
Read 2 more answers
Other questions:
  • A manufacturer makes integrated circuits that each have a resistance layer with a target thickness of 200 units. A circuit won't
    5·1 answer
  • The amount of phase shift between input and output signal is important when measuring ____ circuit​
    9·1 answer
  • Which two word pairs to locate the word vicious in the dictionary
    15·1 answer
  • I WILL GIVE 20 POINTS!!
    11·2 answers
  • What are the conditions for sheet generator to build up its voltage?
    12·1 answer
  • What is the activation energy (Q) for a vacancy formation if 10 moles of a metal have 2.3 X 10^13 vacancies at 425°C?
    9·1 answer
  • A particle is emitted from a smoke stack with diameter of 0.05 mm. In order to determine how far downstream it travels it is imp
    9·1 answer
  • Is a street the same as a avenue
    10·2 answers
  • PLEASE ANSWER ASAP!
    11·2 answers
  • A thin aluminum sheet is placed between two very large parallel plates that are maintained at uniform temperatures T1 = 900 K, T
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!