Updated: January 06th, 2019 | Sunday
_______________________________________
About this course: The Arduino is an open-source computer hardware/software platform for building digital devices and interactive objects that can sense and control the physical world around them. In this class, you will learn how the Arduino platform works in terms of the physical board and libraries and the IDE (integrated development environment). You will also learn about shields, which are smaller boards that plug into the main Arduino board to perform other functions such as sensing light, heat, GPS tracking, or providing a user interface display. The course will also cover programming the Arduino using C code and accessing the pins on the board via the software to control external devices.
Upon completing this course, you will be able to:
1. Outline the composition of the Arduino development board
2. Describe what it means to program the board’s firmware
3. Read board schematics
4. Install Arduino IDE
5. Describe what “shields” are and how they are used
6. Specify the role of libraries in the use of shields
7. Compile and run a program
8. Name C Variables and Types
9. Name common C operators
10. Use conditionals and loops
11. Explain functions, their definition, and invocation
12. Explain the implications of global variables
13. Undertake the Arduino build process
14. Describe the role of the tools behind the IDE
15. Describe how to invoke functions in classes
16. Explain the structure of an Arduino sketch
17. Access the pins of the Arduino
18. Differentiate between digital and analog pin
and all of it through a very creative learning way, I am sure that it is going to be a short and sweet learning process for you.
If you would love to start making what you have in your mind of creative ideas, enroll and best of luck.
Best Wishes to all of you: ].
See you in class: ].
Introduction
Hello my dear student, :)
in this quiz, we can make sure that your mind and lovely spirit is here. take it easy, this quiz is just to ensure that you got the basic information.
Introduction to programming and Arduino
In this lecture, we will explore what the void setup() does.
it is the first function that gets executed in the code.
In this lecture, we will explore what the void loop() does.
it is the second function that gets executed in the code.
Start Building | Inspiring journey
Code:
// Include the Servo library
#include <Servo.h>
// Create a servo object
Servo Servo1;
void setup() {
// We need to attach the servo to the used pin number
Servo1.attach(6);
}
void loop(){
// Make servo go to 0 degrees
Servo1.write(0);
delay(1000);
// Make servo go to 90 degrees
Servo1.write(90);
delay(1000);
// Make servo go to 180 degrees
Servo1.write(180);
delay(1000);
}
Explanation :
- Button
Pushbuttons or switches connect two points in a circuit when you press them.
When the pushbutton is open (unpressed) there is no connection between the two legs of the pushbutton, so the pin is connected to ground (through the pull-down resistor) and we read a LOW. When the button is closed (pressed), it makes a connection between its two legs, connecting the pin to 5 volts, so that we read a HIGH.
- Resistors
Each color has a number, as follows:
- Black 0
- Brown 1
- Red 2
- Orange 3
- Yellow 4
- Green 5
- Blue 6
- Purple 7
- Gray 8
- White 9
The first two striped are the first two digits of the value, so red, purple means 2, 7. The next stripe is the number of zeros that need to come after the first two digits, so if the third stripe is brown, as it is in the photograph above, then there will be one zero and so the resistor is 270Ω.
Code:
long duration, distance;
const int echoPin = 5;
const int trigPin = 6;
void setup() {
// put your setup code here, to run once:
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration/57.8;
Serial.begin(9600);
Serial.println(distance);
delay(500);
}
Code:
int pir = 2;
int value;
void setup() {
// put your setup code here, to run once:
pinMode(pir, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
value = digitalRead(pir);
Serial.println(value);
delay(500);
}