Finals 1 Flashcards
SR / RS
Set and Reset
most basic type of flip flop
SR FLIP FLOP
What is a programming language?
A formal set of instructions that can be used to produce various kinds of output.
What is the vocabulary size of a programming language compared to a spoken language?
The vocabulary of a programming language is far smaller than that of a spoken language.
What is meant by the term ‘syntax’ in programming?
The punctuation and way the words are formed in a programming language.
Why is case sensitivity important in programming names?
Names must be written exactly as defined, with the correct case.
What are ‘arguments’ in the context of a function?
The information passed to a function when it is called.
What does the function digitalWrite do?
It sets an output pin on the Arduino board to HIGH or LOW.
What is the first step that occurs when the Upload button is pressed in the Arduino IDE?
Compilation.
What does compilation do?
It translates the written code into machine code that the Arduino understands.
What are the two mandatory functions in every Arduino sketch?
- setup
- loop
What keyword is used to define a function that does not return a value?
void.
What does the setup function do in an Arduino sketch?
It runs once when the sketch starts.
What is the purpose of the loop function in an Arduino sketch?
To execute code continuously after the setup function has run.
How do you define an integer variable in C?
Specify the type and assign a value, e.g., int ledPin = 13.
What is a common naming convention for variables in programming?
Start with a lowercase letter and use camel case for subsequent words.
What is the effect of modifying the delayPeriod variable in the Blink example?
It changes the speed of the LED blinking.
Fill in the blank: The function pinMode sets a particular pin to be either an _______ or an output.
input
True or False: You can place spaces in function names in Arduino programming.
False.
What happens if you do not include any lines of code in the setup or loop functions?
The sketch will not perform any actions.
What is meant by ‘boilerplate’ code in Arduino programming?
The essential code structure that must be present in every sketch.
What does the delay function do in an Arduino sketch?
Pauses the execution of the program for a specified period.
What is a block of code?
Code enclosed within curly braces that defines what happens when a function is called.
How can you make the blinking rate of an LED gradually slow down in an Arduino sketch?
By adding a value to the delayPeriod variable each time the loop is called.