Changes

Jump to navigation Jump to search
no edit summary
Line 94: Line 94:  
=== Serial Monitors: ===
 
=== Serial Monitors: ===
   −
==Basic Understanding of Programming==
+
==Introduction to Programming Syntax and Conceptualization==
 
  −
===Introduction to coding===
   
The process of programming includes designing and executing code in an integrated development environment, otherwise known as an IDE. Many different IDEs exist and are adopted for different usages, and allow programs to edit, debug, and execute (or compile) their code. In order to program an Arduino, one must have the Arduino IDE downloaded, which can be accessed from here: <nowiki>https://www.arduino.cc/en/software</nowiki>. The Arduino IDE provides users with a programming editor as well as a way to easily upload and compile programs onto the Arduino board. Programs in the Arduino IDE are called sketches, and are normally saved with the .ino extension. The language used to program the Arduino board is based on the C++ language, which is a general use Object Oriented language. Like any common language, in order to start coding, one must be aware of the grammar rules and vocabulary that is used. An important word that will be often encountered is a “function”, which is a block of code that takes in an input, processes the input, then returns an output.  
 
The process of programming includes designing and executing code in an integrated development environment, otherwise known as an IDE. Many different IDEs exist and are adopted for different usages, and allow programs to edit, debug, and execute (or compile) their code. In order to program an Arduino, one must have the Arduino IDE downloaded, which can be accessed from here: <nowiki>https://www.arduino.cc/en/software</nowiki>. The Arduino IDE provides users with a programming editor as well as a way to easily upload and compile programs onto the Arduino board. Programs in the Arduino IDE are called sketches, and are normally saved with the .ino extension. The language used to program the Arduino board is based on the C++ language, which is a general use Object Oriented language. Like any common language, in order to start coding, one must be aware of the grammar rules and vocabulary that is used. An important word that will be often encountered is a “function”, which is a block of code that takes in an input, processes the input, then returns an output.  
   Line 119: Line 117:  
|}
 
|}
 
It is also important to be aware that the Arduino editor is case sensitive, meaning that the words “DOOR” and “Door” are not understood to be the same word by the compiler. Furthermore, to make writing and editing code more friendly, the Arduino IDE will color code important functions, comments, etc. This will be seen later in this section.  
 
It is also important to be aware that the Arduino editor is case sensitive, meaning that the words “DOOR” and “Door” are not understood to be the same word by the compiler. Furthermore, to make writing and editing code more friendly, the Arduino IDE will color code important functions, comments, etc. This will be seen later in this section.  
 +
 +
=== Pseudocode and Flowcharts ===
 +
 +
== Introduction to Variables and Conditional Statements ==
    
===Variables===
 
===Variables===
Line 184: Line 186:  
  ///instructions }
 
  ///instructions }
   −
==Basic Understanding of Sensors==
+
==Introduction to Electronics and Circuitry==
 
  −
===Introduction to Sensors===
  −
Sensors enable the microcontroller to sense the surrounding environment. Many sensors exist on the marker, including but not limited to buttons, temperature sensors, pressure sensors, photoresistors, humidity and moisture, and many more. The output of the sensor (a voltage) changes based on the measured environment properties, and sends that signal over to the Arduino board.
      
===Introduction to Circuits===
 
===Introduction to Circuits===
Line 196: Line 195:  
There are three arrangements of circuits, series, parallel, and combination. In a series circuit, the amount of current flowing is the same at all points in the circuit, whereas the voltage supplied by the battery is equal to the voltage drop across each component. A series circuit has only one path for electricity to flow, so if any component fails in the circuit, all other components will also stop operating, as the circuit is now open. In a parallel circuit, the voltage is the same in all branches, whereas the current is different in each branch.  
 
There are three arrangements of circuits, series, parallel, and combination. In a series circuit, the amount of current flowing is the same at all points in the circuit, whereas the voltage supplied by the battery is equal to the voltage drop across each component. A series circuit has only one path for electricity to flow, so if any component fails in the circuit, all other components will also stop operating, as the circuit is now open. In a parallel circuit, the voltage is the same in all branches, whereas the current is different in each branch.  
   −
===Introduction to basic electronic components===
+
=== Breadboard ===
 +
A breadboard is used to prototype a temporary circuit. The user can build, test and analyze a circuit without any permanent connections. It is made up of terminal strips and power rails. The terminal strips are used to hold any number of components in place and make electrical connections in a horizontal row. The power rails are the long vertical strips and are used to facilitate power (+) and ground (-) connections by placing them all in one column.
   −
====LED====
+
== Introduction to Electronic Components ==
 +
 
 +
===LED===
 
A Light Emitting Diode, or LED, is a semiconductor device that lights up when an electric current passes through it. They come in many different colors and shapes, and are very versatile. LEDs are diodes, which means that current flows through the element in only one way, from the positive to the negative end. On an LED, the cathode end can be identified by either a flat edge on the body, or as the shorter leg. As such, the anode is the other end (the longer leg on the LED).
 
A Light Emitting Diode, or LED, is a semiconductor device that lights up when an electric current passes through it. They come in many different colors and shapes, and are very versatile. LEDs are diodes, which means that current flows through the element in only one way, from the positive to the negative end. On an LED, the cathode end can be identified by either a flat edge on the body, or as the shorter leg. As such, the anode is the other end (the longer leg on the LED).
   −
====Pushbutton====
+
===Pushbutton===
 
A pushbutton is an electronic switch component that completes the circuit only when pressed. In an electric circuit, electricity needs to flow continuously through the circuit in order for all parts to function. The pushbutton interrupts this circuit and forms a gap, so that electricity doesn't flow to the other side of the pushbutton. When the pushbutton is pressed. a small spring is activated that is made of conducting material so that electricity flows through the spring to the other side of the pushbutton.
 
A pushbutton is an electronic switch component that completes the circuit only when pressed. In an electric circuit, electricity needs to flow continuously through the circuit in order for all parts to function. The pushbutton interrupts this circuit and forms a gap, so that electricity doesn't flow to the other side of the pushbutton. When the pushbutton is pressed. a small spring is activated that is made of conducting material so that electricity flows through the spring to the other side of the pushbutton.
   −
====Resistor====
+
===Resistor===
 
A resistor is an electrical component which creates electrical impedance, or resistance to current flow. The amount of resistance a resistor provides can be read from the bands of color on the resistor, which are read left to right. For four bands resistors, the first and second bands represent digits, while the third band represents a multiplier to multiply the digits of the first and second band by. The fourth band is the tolerance, it represents how much the resistor may deviate from the value indicated by the bands. The value of the resistor can also be determined using the ohmic function of a multimeter. Resistors are often used in series with components to reduce the amount of current flowing through a circuit, often to protect components rated for lower current amounts. Pull-up and pull-down resistors are used to bias an input on the Arduino to be either HIGH or LOW respectively. This needs to be done as the resting level of the input isn’t necessarily 0. This is especially useful when working with sensors that have an analog output.
 
A resistor is an electrical component which creates electrical impedance, or resistance to current flow. The amount of resistance a resistor provides can be read from the bands of color on the resistor, which are read left to right. For four bands resistors, the first and second bands represent digits, while the third band represents a multiplier to multiply the digits of the first and second band by. The fourth band is the tolerance, it represents how much the resistor may deviate from the value indicated by the bands. The value of the resistor can also be determined using the ohmic function of a multimeter. Resistors are often used in series with components to reduce the amount of current flowing through a circuit, often to protect components rated for lower current amounts. Pull-up and pull-down resistors are used to bias an input on the Arduino to be either HIGH or LOW respectively. This needs to be done as the resting level of the input isn’t necessarily 0. This is especially useful when working with sensors that have an analog output.
   −
====Breadboard====
+
===Introduction to Sensors===
A breadboard is used to prototype a temporary circuit. The user can build, test and analyze a circuit without any permanent connections. It is made up of terminal strips and power rails. The terminal strips are used to hold any number of components in place and make electrical connections in a horizontal row. The power rails are the long vertical strips and are used to facilitate power (+) and ground (-) connections by placing them all in one column.
+
Sensors enable the microcontroller to sense the surrounding environment. Many sensors exist on the marker, including but not limited to buttons, temperature sensors, pressure sensors, photoresistors, humidity and moisture, and many more. The output of the sensor (a voltage) changes based on the measured environment properties, and sends that signal over to the Arduino board.  
    
===Arduino in Tinkercad===
 
===Arduino in Tinkercad===
MakerRepo Staff, MakerRepo Volunteers
240

edits

Navigation menu