GLOSSARY

actuator

An actuator is an electronic component that is designed to act based on an input. It is an output component that is responsible for moving and controlling a mechanism or system. Examples of these are LEDs, servo motors, and buzzers.

anode

The anode is the positive (+) terminal of a component with polarity (diode). For example, the longer terminal of LED is anode.

Arduino UNO WiFi Rev2

Arduino UNO WiFi Rev2 is the Arduino board that is used throughout CTC GO!

This board is empowered with the ATMEGA4809 microprocessor to balance between processing speed and power consumption.

The board has 14 digital input/output pins (5 of which can be used as PWM outputs), 6 analog inputs, a USB connection, a power jack, an ICSP header, and a reset button.

As its name suggests, it is also able to communicate via WiFi.

algorithm

A step-by-step process to complete a task. A set of instructions that are executed in a specific order with or without a computer.

analogRead()

analogRead(pin)

This function measures the voltage value on an analog pin indicated between the brackets.

Arduino

Arduino is an open-source electronics platform that consists of hardware Arduino board, and software Arduino IDE.

array

An array is a numbered list of the same type of elements. It is a group of variables that are identified by one name, and accessed by an index number, first index being 0.

analog signal

Analog signals are continuous and have infinite values. These values can be measured and used in the code. Some examples of analog inputs are temperature, distance, pressure, and light sensors.

analogWrite()

analogWrite(pin, value)

Writes an analog value (PWM wave) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds.

arithmetic operators

An arithmetic operator is a mathematical function that takes two values and performs a calculation on them.

+ addition

- subtraction

/ division

= assignment operator

% remainder

* multiplication

binary

Only two states are possible. A typical use in electronics is: ON and OFF, or HIGH and LOW to indicate if there is current flowing through or not.

bluetooth

A type of short-range wireless connection between devices.

button

A button is a component that connects two points in a circuit when you press them. We can read the state of the button with digitalRead() function. Button is connected to ground and digital pin and does not have polarity.

breadboard

A breadboard is a piece of plastic with holes. As some of the holes are connected by metal strips inside, a breadboard allows us to build circuit without having to connect the components to each other directly.

cathode

The cathode is the negative (-) terminal of a polarized component (diode). For example, the shorter terminal of LED is cathode.

comparison operators

Comparison operators compare values to each other and return true or false statement.

!= not equal to

< less than

<= less than or equal to

== equal to

> greater than

>= greater than or equal to

circuit (electrical)

A circuit consists of a power source, various components, and the connections between them. In order to work circuits need a power source and they must be completed and closed. An open circuit means that electricity cannot flow through because there are missing connections.

conditional statement

A conditional statement is a programming concept that helps the microcontroller decide what part of the program it needs to execute based on a condition.

comment

Commenting is a great tool when writing and debugging code. When you comment out a section in a program, the section will be ignored when it is running. You can comment code by either using double slash // in the beginning of a line, or use /* */ to comment out larger sections.

component

The components are the elements of the circuit that will convert electricity into something else (for instance, light or sound).

current

Current is the flow of electric charge through a closed circuit. It flows from the positive end to the negative end of the battery. Measured in Amps.

delay()

delay(ms)

Pauses the program for the amount of time (in milliseconds) specified as parameter. (There are 1000 milliseconds in a second.)

digital signal

Digital signals have discontinuous values, always coded in 0 and 1. For example, a button can only be “pressed” or “released”, or an LED can only be ON or OFF.

digitalWrite()

digitalWrite(pin, value)

This function allows us to create digital signals through the selected pin. Digital signals have two states: ON and OFF. If the pin has been configured as an OUTPUT with pinMode(), replacing "value" with HIGH will turn it ON and to turn it OFF, we will use LOW.

digitalRead()

digitalRead(pin)

This function measures if the voltage in the digital pin, indicated between the brackets, is HIGH or LOW.

else{}

else{action}

The if...else allows greater control over the flow of code than the basic if statement, by allowing multiple tests to be grouped together. An else clause will be executed only when the if statement results in false.

flowchart

A flowchart is a visual diagram of an algorithm. In the flowcharts the rectangles indicate actions and the rhombuses indicate conditions (to check the status of something).

for(){}

for(condition){action}

The for statement is used to repeat a block of statements enclosed in curly braces. An increment counter is usually used to increment and terminate the loop. The for statement is useful for any repetitive operation, and is often used in combination with arrays to operate on collections of data/pins.

frequency

Frequency is the number of occurrences of a repeating event per unit of time. The frequency of a signal measures how fast it is.

function

Function is a block of code that executes a specific task and can be called later by writing its name. Once a function is written, it can be used over and over again. They are used to combine several lines of code into a single line.

A programming language generally consists of many predefined functions, such as digitalWrite() in Arduino code.

ground

The ground is the point of a circuit where there is 0 potential electrical energy. Without a ground, electricity will not have a place to flow in a circuit. In the Arduino board, the ground pin is marked GND.

IDE

IDE stands for “Integrated Development Environment”. The Arduino IDE is the place where you write software to upload to an Arduino board. The IDE checks the code written and interprets it to a machine language that the microcontroller can handle.

IoT

IoT stands for Internet of Things and refers to devices that are connected to the internet and are communicating with each other. The Arduino UNO WiFi Rev2 is an example of a device that can be connected to the internet.

if(){}

if(condition){action}

The condition inside of the if's parentheses can only return true or false. When it is true, the action inside of the curly brackets { } is executed. When false, everything inside those brackets is skipped. See else().

input

Inputs are the signals or instructions sent to a computer when the board is receiving information from any external component. It means that the information flows IN towards the microcontroller. Components that detect information and send it to the board are called inputs, such as button, potentiometer, and phototransistor.

LED

LED, stands for light-emitting diode is a small light source that converts eletrical energy into light. LEDs have polarity and two terminals. The longer terminal is called anode, which needs to be connected to the positive (+) end of the circuit, power. The shorter terminal is called cathode and needs to be connected to the negative (-) side, ground.

logical operators

Logical operators are used to compare Boolean values to each other and they will return true or false.

! logical not

&& logical and

|| logical or

loop()

The loop(){} function does precisely what its name suggests, and loops consecutively, allowing your program to change and respond. Every command we write between the curly brackets is going to be repeated as long as the board is powered.

map()

map(value, fromLow, fromHigh, toLow, toHigh)

The map() function allows us to transform the range of a variable. It re-maps a number from one range to another. That is, a value of fromLow would get mapped to toLow, a value of fromHigh to toHigh, values in-between to values in-between.

microcontroller

A microcontroller is the brain of the Arduino, a small computer that we will program to listen for, process, and display information. It is capable of controlling outputs and reading input values, as well as processing these pieces of information by a processor built into it.

noTone()

noTone(pin)

When we use the tone() function in one pin, it is playing a sound until we tell it to stop playing, and to do that we use the function noTone().

Ohm's law

Ohm is an unit of measurement of resistance. Ohm's law is a mathematical equation that demonstrates the relationship between resistance, current and voltage. Usually stated as V (voltage) = I (current) x R (resistance).

open-source

Being open-source means that anyone can peek inside the blueprints and softwares, add modifications to them and distribute the content.

output

An output is when the microcontroller sends information to the components, it means that the information flows OUT from the microcontroller. Components that receive information from the microcontroller and react to it are called outputs, such as LED, servo motor, and piezo.

phototransistor

A phototransistor is a light sensor that can be used to measure the amount of light reaching the component. The phototransistor has polarity and needs a 10KΩ resistor for the circuit.

power source

A source of energy used to have electricity run through a circuit, usually a battery, transformer, or even the USB port of your computer.

program

A program is a set of coded instructions organized in a certain way. A program contains one or more commands that are executed sequentially from top to bottom. The program tells the microcontroller what to do to achieve a certain outcome.

piezo

A piezo converts electrical energy into sound. Piezos can be used both to play tones and to detect tones. Piezos do not have polarity.

polarity

If a component has polarity (is polarised) it means that it has a positive (+) and a negative (-) end. Some of the polarised components break, cause problems or do not work if they are connected in the wrong way.

PWM

PWM, stands for "Pulse Width Modulation" and is a way to simulate a varying static voltage. A PWM signal is a digital signal that turns on and off very very fast. The different voltage values generated by using a PWM signal depends on the time the signal is in high state.

pinMode()

pinMode(pin, mode)

pinMode() is a function that allows us to select what the behavior of a pin will be, either an input or an output.

potentiometer

Potentiometer is a simple knob that provides a variable resistance, which can be read by the Arduino board as an analog value. By turning the shaft of the potentiometer, we change the amount of resistance, controlling the amount of voltages (from 0 to 5) going to the pin.

random()

random(min, max)

We can use the random() function to generate a random integer from the range between values min and max-1. The bottom limit is inclusive and the top is exclusive, so that random(1,4) would give us a value of 1, 2 or 3.

resistance

Resistance is a measure of how efficiently a material will conduct electricity. In particular, resistance can be calculated by Ohm’s Law as: R = V / I.

resistor

A resistor is an electronic component that regulates the amount of current in a circuit. The bigger the resistance value of a resistor, the less current will go through it.

schematic

A schematic drawing is a type of circuit diagram that represents the elements of a system with graphic symbols instead of realistic figures.

serial communication

Serial communication is a type of serial protocol between two devices. The main property of serial communication is that all the data is sent bit by bit one after the other, and it happens at a very high speed.

setup()

The setup() function is the part of the code which is executed at the beginning when a sketch starts. Use it to initialize variables, pin modes, start using libraries, etc. The setup() function will only run once, after each powerup or reset of the Arduino board.

sketch

Sketch is the term given to programs written in the Arduino IDE.

sensor

A sensor is a component that measures one form of energy (like light or heat or mechanical energy) and converts it to voltage or current. It is used to detect events or changes in an environment and send the information to other electronic parts, such as the Arduino board.

Serial Plotter

The Serial Plotter works similarly to the Serial Monitor, but instead of printing out data as text, it visualizes in real-time as a graph.

short circuit

Connecting the positive and negative terminal of a battery directly or in a circuit, without any other components, it will consume electricity, causing a short circuit. When this happens, there is a high chance the battery won’t work anymore.

syntax

The syntax of a code is the set of rules that we need to follow in order to secure the readability of the code. As an example, it is part of the syntax of the Arduino language to differentiate between lower-case and upper-case letters. This means that if we type inputLED and inputLed, they will be seen different from each other.

Serial buffer

A place in your computer’s and microcontroller’s memory where information received in serial communication is stored until it is read by a program.

Serial Monitor

The Serial Monitor is a separate terminal that is used to send and receive data from a connected board. It is a tool built into the Arduino IDE and a great tool for debugging and testing out sketches.

Serial.print()

It prints text, any combination of characters or value of a variable to the Serial monitor. Adding ln to the command will add a linebreak at the end and next print will go in a new line.

Serial.print("text")

Serial.println("text")

Serial.print(variable)

Serial.println(variable)

tone()

tone(pin, frequency)

The tone() function creates an analogic signal that allows us to play sounds by using a piezo. Only one tone can be generated at a time. The sound continues until a call to noTone().

ultrasonic sensor

An ultrasonic sensor can be used to measure the distance of an object. In the middle ultrasonic has four pins:

VCC to power the sensor,

Range to select the distance and precision of the sensor,

Out for measuring, and

GND for ground.

USB

USB, stands for Universal Serial Bus. USB port in a computer is used to upload programs as well as to power the Arduino board. It’s a generic port that is standard on most computers today. With a USB cable, it’s possible to program and power an Arduino over a USB connection.

variable

Variable is a data type that stores values which are likely to change as our program runs. For each variable you need to specify the type of data it will contain, the name of the variable, and the value to assign to it. A variable’s type depends on the type of information we want to store, and the maximum size of the information; for example, a byte can store 256 different values, but an int can store up to 65,536 different values.

variable types

Examples of different variable types:

int = integers(whole numbers)

float = decimal numbers

long = large numbers

char = single quote characters, 'A'

string = text/multiple characters, "ABC"

bool = true or false

voltage

Voltage is an electromotive force or potential difference that is measured in volts (V).

WiFi

WiFi is a type of wireless connection allowing devices to connect to the Internet or communicate with each other in a particular area.