Unit 2 Programming Fundamentals

Oct 17 Learn how to learn

Oct 10 Readings

Oct 3 Quiz Prep

Arduino Reference


switch case
do… while


Programming is where you create a set of instructions that Define the steps for a computer to perform a task. With programming a robot we will use a variety of languages depending on the robot platform.


The languages are as follows:

  • Lego EV3 – block based software provided by Lego and created by National Instruments
  • Arduino – the Arduino IDE used the C programming language
  • VEX robot – RobotC a variant of the C language
  • FIRST – Java. Uses Eclipse IDE with custom libraries.
  • App Inventor – block based language that runs in a web browser, can be used to program Android devices that can control Lego ev3 robots
  • Vision recognition – we have a variety of options: Nvidia Jetson, Raspberry Pi, Android

Oct 10 Challenges

  • Create pseudocode for programs
  • Create a program that can manoevure one FLL challenge when a button is pressed.
  • Create a program that uses multiple sensors

Challenges – basic

  • Create an ev3 program that has the motor go forward and stop at a black line using the colour sensor
  • Create an Arduino program. That uses the line following sensor and will output the value it reads to the serial monitor the value
  • Create an autonomous FRC or VEX program that will move the robot four feet
  • Create an App Inventor App that has a button and when you press the button the button changes colour

Challenges – intermediate

  • Create an autonomous FRC or VEX program that will move the robot 4 feet, turn 90 degrees to the right, move three feet, turn 90 degrees to the left and more three feet.
  • Create an EV3 program that moves forward, when a green line is reached it speeds up, it slows down for a yellow line and stops on a red line
  • Create an Arduino program that will turn on a motor when the line following sensor is on black and turn it off when on white
  • Create an EV3 program that will move forward until the robot is 30cm away from an object then it will turn right