Block F Campus
Grade: VII
Subject: STEM
Topic: Robotics
Worksheet
Name: _____________________ Section: ____________ Date: _______________
Q1. Define the terms:
Variables:
_______________________________________________________________________________________
_______________________________________________________________________________________
Sketches:
_______________________________________________________________________________________
_______________________________________________________________________________________
Loops:
_______________________________________________________________________________________
_______________________________________________________________________________________
Q2. What is the difference between setup() function and loop() function in Arduino programming?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Q3. If you want to initialize any pin as digital input or output, which command will you use?
_______________________________________________________________________________________
Q4(a). What do you understand by defining pins?
_______________________________________________________________________________________
_______________________________________________________________________________________
Q4(b). Write a code for defining pin for a LED which is connected with digital pin no. 13 of Arduino.
______________________________________________________________________________________
Q5(a). What is the difference between the terms variable declaration and variable initialization?
_______________________________________________________________________________________
_______________________________________________________________________________________
1
Block F Campus
Q5(b). How can we make variables in C++ (Arduino Programming)? Write a code for initializing
variable.
_______________________________________________________________________________________
Q6(a). Define Functions. How does function be useful in programming? Give advantages of making
functions in programming.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Q6(b). How can we make functions in Arduino C++ Programming? What is the purpose of void
keyword used in function?
_______________________________________________________________________________________
_______________________________________________________________________________________
Q7(a). Which part of robot should you have to deal if you want to drive your bot?
_______________________________________________________________________________________
Q7(b). Complete the configuration table for driving nimble bot.
Motor Right Motor Left Motor
ARDUINO PIN A0 7 4 8
STOP
RIGHT
FORWARD
LEFT
BACKWARD
Q8. What is LDR? How does it work in Darkness circuit (sensor)?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Q9. What is Monitoring? Which function will you use to do serial monitoring?
_______________________________________________________________________________________
_______________________________________________________________________________________
Q10(a). Which keyword would you use if you want to import any external library to your code?
2
Block F Campus
_______________________________________________________________________________________
Q10(b). Which library will you import if you are making mobile controlled car project having
Bluetooth connection?
_______________________________________________________________________________________
Q10(c). Which library will you import for RGB LED (Disco lights)?
_______________________________________________________________________________________
Q11. Explain the concept of these functions: digitalRead(), digitalWrite(), analogRead(),
analogWrite().
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Q12(a). See the code below and answer the questions given below.
a. What is the purpose of delay keyword given above?
_________________________________________________________________________________
b. If I change the code digitalWrite(led, HIGH) to analogWrite(led, HIGH), would it affect in
executing the code?
_________________________________________________________________________________
c. Explain in your own words, what is happening in the above code and how does it work? Write the
algorithm of above code.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Q12(b). Observe the code given below and answer the following questions.
3
Block F Campus
a. The code is taken from diving nimble bot. Why analogWrite() function is used for pins RMS and
LMS while digitalWrite() function is used for rest of the pins?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
b. Following the above code written for forward direction, rewrite the correct code for movement of the
robot in right direction.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
c. What would happen if I revert all HIGH keywords in to LOW and all LOW commands into HIGH?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Q13. How does a sensor contribute to a robot’s functionality?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Q14. Write 3 applications of RGB LED’s Disco Lights.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Q15. What is the purpose of if else statements in programming?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
4
Block F Campus