WorksheetsArduino programing
Total questions: 31
Worksheet time: 18mins
How do you write a pinmode function correctly
(a)
What is one way you begin the Serial monitor correctly?
serial.begin(9600)
Serial.println(msg);
Serial.print()
Serial.begin(9600);
Can you change the name of an int?
No
Yes
Only sometimes
Always
How do you write a string variable?
(a)
What is a way without using a string that you can display text?
(a)
Is the labeling of the breadboard correct?
Yes
No
What is a float?
A decimal number
a whole number
a int
a float
What is this circuit componet?
led
LED
RGB led
RGB LED
What function turns an led on?
digitalRead( led1, High);
digitalWrite(led1, HIGH)
DigitalWrite(led1, HIGH);
digitalWrite(led1, HIGH);
What function slows down code or an object?
a delay
a wait
a stop
a hold
How do you turn an led off?
digitalWRite(led1, LOW);
writeDigital(led1, LOW):
Serial.begin(9600);
digitalWrite(led1, OFF);
int LED1= 4;
What statement is this?
Void Loop
Void Setup
Declaration
C language
int LED1=4;
What is 'int= integer' used for?
Alphabets
Capital and small letters
Combination of Numbers and Alphabets
Numbers
int LED2=8;
What is number eight is referring in the coding above?
Analog Pin
5V
Ground
Digital Pin
LED is setup-up to blink. LEDs is an
Output
Input
pinMode
digitalWrite
delay (1000);
1000 in delay is equivalent to how many second?
10s
2s
60s
1s
digitalWrite (LED1, HIGH);
delay(1000);
digitalWrite (LED1, LOW);
What does the program do?
LED Switch Off at the beginning, wait for 60s and then switch ON.
LED Switch ON at the beginning, wait for 10s and then Switch OFF.
LED Switch ON at the beginning, wait for 1s and then switch ON.
LED Switch ON at the beginning, wait for 1s and then switch OFF.
R1: int Led1=4;
R2: void setup(){
R3: digitalWrite (LED1, High);
R4: }
LED1 was not declared above void setup. Which row is the error?
R1
R2
R3
R4
A==7 means
A is equal to 7
7 is assigned as an int A
A is not equal to 7
A is greater than 7
int Led1=4;
void setup(){
digitalWrite (LED1, High);
}
Find the errors?
LED 1
DigitalWrite
HIGH
Void Setup
What is one correct way of reading a value of a potentiometer without using the Serial montior?
int potPin = A0;
int potVal = 13;
void setup(){
pinMode(potPin, OUTPUT);
}
void lop(){
potPin = analogWrite(potPin)
}
int potPin = A0;
int potVal;
void setup(){
pinMode(potPin, INPUT);
}
void loop(){
potVal = analogRead(potPin);
}
Do you have to assign a number to an int all of the time or can you just declare it like this int redled;?
Yes, you have to assign a value
No, you don't have to assign a value
What function is used to read an analog Pin?
Hint: a function includes ()
(a)
Which of the following are outputs?
LED
Push Button
Photoressitor
