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
The products of combustion from burner are routed to an industrial application through a thin-walled metallic duct of diameter D
slamgirl [31]

Answer:

Start by calculating the heat lost falling from Tm,i to Tm,o

As a first approximation use an average Cp of (Tm,i + Tm,o)/2 and an average density at (Tm,i + Tm,o)/2

Cp air at (Tm,i + Tm,o)/2 ----(1)

Density of air at (Tm,i + Tm,o)/2 : PV=nRT, V=T1/T2, air density at 293K = 1.204kg/m^3

Air density at (Tm,i + Tm,o)/2 1.204×293/(Tm,i + Tm,o)/2

Energy lost per kg for (Tm,i - Tm,o)K drop: (Tm,i - Tm,o)K × (1) =

Time of travel: t

Energy lost per kg drop/t seconds = 24.3 kW

Volume occupied by 1kg air at at mean tempera ture = 1/Air density at mean temperature

Length of pipe ( Di m diameter) needed to hold Volume occupied by 1 kg of air at mean temperature :

Cross section = π/4 Di^2, Volume occupied by 1 Kg of air at mean temp. ÷ π/4Di^2

Surface area of pipe Di m diameter by L m long = Length of pipe to hold Volume of air in m × π*Di

Q/A=k (delta T)/ thickness,

Thickness of insulation = Area × k ×dT / Q

Explanation:

6 0
3 years ago
4. When the ESC system senses oversteer,
bagirrra123 [75]
I’m pretty sure the answer is b I’m not 100% but I think
5 0
2 years ago
There are little to no benefits to supplementary field identification programs
VashaNatasha [74]

Answer:

True, supplementary field identification programs tend to limit the use of routine programs that target service delivery using routine systems.

Explanation:

When supplementary field identification programs are applied in a study, they have damaging effects to other systems and programs already in progress targeting certain/similar variables in a study group.Such programs are initiated to boost the already existing systems of programs that are in continuous application( routine basis). As a supplement , we expect more positive results in the rates per the variables included in a study.However, results has proved the opposite.For example, supplementary immunization activities applied in programs targeting demographic and health systems services reveled that such programs reduce the probability of receiving the services provided by other routine health systems conducting continuous vaccination programs to the target groups.

4 0
4 years ago
An electronic toy is powered by three 1.58-V alkaline cells, each with an internal resistance of 0.0205 Ω, and a 1.53-V carbon-z
mina [271]

Answer:

(a) The current in amperes that flows through the toy's circuit is 0.923A

(b) The power supplied to the toy is 5.78721W

(c) The internal resistance r2 of the failed dry cell is 72Ω

Explanation:

From the circuit diagram attached. We have the electric component:

B1 = 3* 1.58 = 4.74V

B2 = 1.53V

r1 = 3*0.0205 = 0.0615Ω

r2 = 0.105Ω

R = 6.625Ω

Since the internal resistances and the resistor R are connected in series, we can calculate the total resistance RT as

RT = r1 + r2 +R = 0.0615 + 0.105 + 6.625

= 6.7915Ω

Total Voltage supplied to the circuit by both batteries V = B1 + B2 = 4.74 + 1.53 = 6.27V

(a) CIRCUIT CURRENT

The current I, flowing through the circuit is  i =\frac{V}{R_{T}} = \frac{6.27}{6.7915} =0.923A

The current in amperes that flows through the toy's circuit is 0.923A

(b) THE POWER SUPPLIED TO THE TOY

Power P = I*V =0.923*6.27 = 5.78721W

The power supplied to the toy is 5.78721W

(c) THE VALUE OF r2

Due to dry cell failure, the power supplied to the toy is reduced to 0.5W

Now Power P = \frac{V^{2} }{R} . To calculate the new total resistance of the circuit we will make R the subject of the formular

R=\frac{V^{2} }{P} = \frac{6.27^{2} }{0.5} = \frac{39.3129}{0.5} = 78.6258Ω

Remember that RT = r1 + r2 + R

r1 =RT- (R +r2)

r1 = 78.6258 - 6.6865 =71.9393Ω

The internal resistance r2 of the failed dry cell is 72Ω

6 0
3 years ago
Read 2 more answers
24) A technician is load testing a fully charged battery rated at 600 cold-cranking amps (CCA). The ambient temperature is 70 F
Anvisha [2.4K]

The current draw that should be used for the test by the technician when charging the battery is C. 600 amps for 30seconds.

<h3>Who is a technician?</h3>

It should be noted that a technician simply means an individual that is in charge of a technical equipment.

In this case, since the technician is load testing a fully charged battery rated at 600 cold-cranking amps, the current draw that should be used is 600 amps for 30seconds.

Learn more about technicians on:

brainly.com/question/5122191

#SPJ1

7 0
2 years ago
Other questions:
  • How do I quickly learn javascript?
    8·1 answer
  • What will occur when the trough of Wave A overlaps the trough of Wave B?
    8·2 answers
  • An ac source of period T and maximum voltage V is connected to a single unknown ideal element that is either a resistor, and ind
    8·1 answer
  • Write a program to calculate the area of circle, rectangle using a class. The program would prompt a user to select (1) circle o
    15·1 answer
  • Determine the combined moment about O due to the weight of the mailbox and the cross member AB. The mailbox weighs 3.2 lb and th
    14·1 answer
  • Which option supports the following scenario?
    14·1 answer
  • Choose the best compression ratio for an Otto cycle reciprocating engine: a. 5 b. 10 c. 15 d. 20
    14·1 answer
  • One reason the shuttle turns on its back after liftoff is to give the pilot a view of the horizon. Why might this be useful?
    6·2 answers
  • Người ta sử dụng hệ thống cô đặc 3 nồi xuôi chiều tuần hoàn tự nhiên để cô đặc dung dịch đường có suất lượng 10 tấn/giờ từ nồng
    6·1 answer
  • If you measure the voltage across a diode and it measures 0.3 V, the diode is probably made of __________ and is __________ bias
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!