Changes

Jump to navigation Jump to search
no edit summary
Line 3: Line 3:  
===What is a micro-controller?===
 
===What is a micro-controller?===
 
A mico-controller is a compact integrated circuit that receives input from the environment, processes the input and can produce an output. It receives input from its I/O pins and processes the signals received using the CPU onboard the chip. Micro-controllers are usually embedded in larger systems and are utilized in many areas of life including vehicles, medical devices, home appliances, and more.
 
A mico-controller is a compact integrated circuit that receives input from the environment, processes the input and can produce an output. It receives input from its I/O pins and processes the signals received using the CPU onboard the chip. Micro-controllers are usually embedded in larger systems and are utilized in many areas of life including vehicles, medical devices, home appliances, and more.
 +
 +
Arduino is an open source electronics platform that provides an easy and accessible way to make robotics projects. The boards are able to receive input signals from sensors and can produce outputs through the I/O pins that will be discussed next in this section. Arduinos boards are used by a diverse subset of people, including students,hobbyists, engineers, researchers, and more due to the simple layout and programmability of the arduino boards.
    
===Arduino board sections===
 
===Arduino board sections===
Line 70: Line 72:  
|-
 
|-
 
|Integers
 
|Integers
|int  
+
|int
 
|-
 
|-
 
|non-integers (rational and non-rational)
 
|non-integers (rational and non-rational)
Line 105: Line 107:  
  .....// some lines of code}
 
  .....// some lines of code}
   −
=== Arduino IDE ===
+
===Arduino IDE===
After getting introduced to some of the basic structures of coding, its important to get to know the integrated development enviroment, or IDE that the coder will use to edit and compile the written programmes. For all arduino boards, the IDE used is the Arduino IDE, available online at: https://www.arduino.cc/en/software. <!-- Need to insert a figure here
+
After getting introduced to some of the basic structures of coding, its important to get to know the integrated development enviroment, or IDE that the coder will use to edit and compile the written programmes. For all arduino boards, the IDE used is the Arduino IDE, available online at: https://www.arduino.cc/en/software. The following figure guides the users to the basic on the basic options available on the IDE.
-->
+
 
 +
==== Blink program ====
 +
The Arduino IDE provides creators with a plethora of written programs that are fully ready to run on an arduino board. They are located in the Files>Examples folder. Amongst the most basic is the "Blink" program, which can be used to not only get to know the basic features in the software and the hardware, but are also a great way to test the connectivity between the arduino board and the user's computer. This program is located in Files>Examples>01.Basics>Blink.  
 +
 
 +
The following provides an overview of the different functions used in this program:
 +
{| class="wikitable"
 +
|+Table 4: Overview of functions used in the Blink program
 +
!Function
 +
!Description
 +
|-
 +
|Setup()
 +
|Performs any actions that are initially required to run the rest of the program, such as initializing any peripheral components and setting the communication frequency between the Arduino and the PC.
 +
|-
 +
|Loop()
 +
|The loop function acts as the program's driver, it runs on a continuous loop and specifies the order of operation the microcontroller will perform. Execution starts at the top, goes through the contents of the loop and then starts executing from the top again. This procedure is repeated forever.
 +
|-
 +
|pinMode (pin number, INPUT or Output)
 +
|Configures the pin to behave as either an INPUT or an OUTPUT.
 +
|-
 +
|digitalWrite (pin number, HIGH or LOW)
 +
|Writes a HIGH or LOW value to a digital pin. If the pin has been configured as an OUTPUT, then the signal sent over (ie the voltage) will be set as 5 V (HIGH), or 0 V (LOW). For 3.3 V output boards, the high value will be set to 3.3 V, whereas the low is the same as the 5V board, which is 0V.
 +
|-
 +
|Delay (time in milliseconds)
 +
|Pauses the program for the amount of time specified in the parameter.
 +
|}
 
<br />
 
<br />
 +
 +
== Basic Understanding of Sensors ==
 +
 +
=== 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 basic 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).
 +
 +
==== 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 ====
 +
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 ====
 +
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.
MakerRepo Staff, makerrepo-staff
27

edits

Navigation menu