subject

Task 1 - Specific task • Set up a circuit with 6 LEDs and either a button or an analog sensor. Write a code (starting with a blank Arduino sketch) that does the following.
• Does not have any digitalWrite functions used in the void setup or void loop.
• Write one function that does not return a value.
• The function will have 3 inputs (controlling 3 LEDs).
• The function will complete the same thing as Homework 1 Task 1.
• In the void loop read the button or sensor.
• Use some type of conditional statement (if, while, switch, etc.) to either have once set of 3 LEDs blink or the other set.
• Only one function should be needed, just change the inputs for different LEDs.
Task 2 - Students choice Write either a non-value returning function or a value returning function to do whatever you want (you may also use more components or any previous syntax). You design not only how to build the circuit and write the code, but also what the code/circuit will do. 1 const byte lede 2; // the red led is connected to digital pin 2
2 const byte ledB = 3; // the blue led is connected to pin 3
3
4 void setup() the setup runs once and first
5 {
6 pinMode(ledr, OUTPUT); pin 2 is setup to be an output
7 pinMode (lede, OUTPUT); pin 3 is setup to be an output on
8 {
9
10 void loop() repeats forever
11 {
12 digitalWrite(ledR, HIGH) : turn on Eed led
13 digitalWrite(ledB, LOM) : turn off blue led
14
15 delay(1000); // wait for 1000 milliseconds
16
17 digitalWrite(ledB HIGH);
18 digitalWrite(lede, LOVE turn on blue led
19
20 Cuen edo delay(1000); // wait toe 1 second
21 }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
When you mouse over and click to add a search term this(these) boolean operator(s) is(are) not implied. (select all that apply)?
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
You know the right answer?
Task 1 - Specific task • Set up a circuit with 6 LEDs and either a button or an analog sensor. Wr...
Questions
question
Mathematics, 05.08.2020 16:01
question
Mathematics, 05.08.2020 16:01
Questions on the website: 13722362