Arduino Day 2019 AIC@36INC
Topics 1. Introduction of Arduino Day 2. Introduction of Internet of Things 3. What is Open Source Platform? 4. What is Arduino? 5. Basics Arduino software (IDE) 6. Arduino Board Layout & Architecture 7. Embedded C language 8. Arduino Programming & Interface of Sensors. 9. Application of Sensor. 10. Cloud Interfacing with Arduino.
About Arduino Day •Arduino Day is a worldwide birthday celebration of Arduino. It's a 24 hour-long event – organized directly by the community, or by the Arduino founders – that brings people together to share their experiences and learn more about the open-source platform. What Can You Do During Arduino Day? •You can attend an event or organize one for your community. It doesn’t matter whether you are a Maker, an engineer, a designer, a developer or an educator: Arduino Day is open to anyone who wants to celebrate the amazing things that have been done (or can be done!) with the open-source platform. The events will feature different types of activities, tailored to local audiences all over the world.
Introduction of Internet of Things The Internet of Things is simply "A network of Internet connected objects able to collect and exchange data." It is commonly abbreviated as IoT. The word "Internet of Things" has two main parts; Internet being the backbone of connectivity, and Things meaning objects / devices . In a simple way to put it, You have "things" that sense and collect data and send it to the internet. This data can be accessible by other "things" too.
Open Source Software/Hardware and Platform Open-source software is a type of computer software in which source code is released under a license in which the copyright holder grants users the rights to study, change, and distribute the software to anyone and for any purpose. Open-source software may be developed in a collaborative public manner
What is Arduino? The Arduino is an open-source electronics platform based on easy-to-use software and hardware. Arduino boards are able to read inputs – light on a sensor, a finger on a button, or a Twitter message – and turn it into an output – activating a motor, turning on an LED, publishing something online.
Arduino Boards ARDUINO MKR WIFI 1010
Arduino UNO
Getting Started 1. Download & install the Arduino environment (IDE) 2. Connect the board to your computer via the USB cable 3. If needed, install the drivers 4. Launch the Arduino IDE 5. Select your board 6. Select your serial port 7. Write Sketch (Program) 8. Upload the program
Arduino IDE
In Arduino IDE there are 6 Buttons which is used for following:- The check mark is used to verify your code. Click this once you have written your code. The arrow uploads your code to the Arduino to run. The dotted paper will create a new file. The upward arrow is used to open an existing Arduino project. The downward arrow is used to save the current file. The far right button is a serial monitor, which is useful for sending data from the Arduino to the PC for debugging purposes.
Arduino IDE Arduino IDE is JAVA Based Code Compile in C and C++ Save and execute in .ino Arduino code called Sketches
Arduino Programming Variables Like any other high-level language, a variable is used to store data with three components: a name, a value, and a type. For example, consider the following statement: int pin = 10; Here, pin is the variable name that is defined with the type int and holds the value 10. Later in the code, all occurrences of the pin variable will retrieve data from the declaration that we just made here.
Constants In the Arduino language, constants are predefined variables that are used to simplify the program: HIGH, LOW: While working with digital pins on the Arduino board, only two distinct voltage stages are possible at these pins. false, true: These are used to represent logical true and false levels. false is defined as 0 and true is mostly defined as 1. INPUT, OUTPUT: These constants are used to define the roles of the Arduino pins. If you set the mode of an Arduino pin as INPUT, the Arduino program will prepare the pin to read sensors. Similarly, the OUTPUT setting prepares the pins to provide a sufficient amount of current to the connected sensors.
Data types float: This data type is used for numbers with decimal points. These are also known as floating-point numbers. float is one of the more widely used data types along with int to represent numbers in the Arduino language: float varFloat = 1.111; char: This data type stores a character value and occupies 1 byte of memory. When providing a value to char data types, character literals are declared with single quotes: char myCharacater = 'P'; array: An array stores a collection of variables that is accessible by an index number. If you are familiar with arrays in C/C++, it will be easier for you to get started, as the Arduino language uses the same C/C++ arrays. The following are some of the methods to initialize an array: int myIntArray[] = {1, 2, 3, 4, 5}; int tempValues[5] = { 32, 55, 72, 75}; char msgArray[10] = "hello!"; An array can be accessed using an index number (where the index starts from number 0): myIntArray[0] == 1 msgArray[2] == 'e'
Data types The declaration of each custom variable requires the user to specify the data type that is associated with the variable. The Arduino language uses a standard set of data types that are used in the C language. A list of these data types and their descriptions are as follows: void: This is used in the function declaration to indicate that the function is not going to return any value: void setup() { // actions } boolean: Variables defined with the data type boolean can only hold one of two values, true or false: boolean ledState = false;
Data types byte: This is used to store an 8-bit unsigned number, which is basically any number from 0 to 255: byte b = 0xFF; int: This is short for integers. It stores 16-bit (Arduino Uno) or 32-bit (Arduino Due) numbers and it is one of the primary number storage data types for the Arduino language. Although int will be used to declare numbers throughout the book, the Arduino language also has long and short number data types for special cases: int varInt = 2147483647; long varLong = varInt; short varShort = -32768;
My First Program(LED Blink) int led = 13; void setup() { pinMode(led, OUTPUT); } void loop() { digitalWrite(led, HIGH); delay(500); digitalWrite(led, LOW); delay(500); }
Temperature and Humidity Sensor #include <dht.h> dht DHT; #define DHT11_PIN 7 void setup() { Serial.begin(9600); } void loop() { int chk =DHT.read11(DHT11_PIN); Serial.print("Temperature = "); Serial.println(DHT.temperature); Serial.print("Humidity = "); Serial.println(DHT.humidity); delay(1000);}
PIR Motion Detector and Analytics with Python int pirPin = 7; void setup() { pinMode(pirPin, INPUT); Serial.begin(9600); } void loop() { if (digitalRead(pirPin) == HIGH) { Serial.println("1"); } else { Serial.println("0"); } delay(500); }
NodeMCU An open-source firmware and development kit that helps you to prototype your IOT product within a few Lua script lines. Features: Open-source Interactive Programmable Low cost (285/-) Simple Smart WI-FI enabled
NodeMCU Temperature, Humidity data upload on Thingspeak on Arduino IDE An open-source firmware and development kit that helps you to prototype your IOT product within a few Lua script lines. Features: Open-source Interactive Programmable Low cost (285/-) Simple Smart WI-FI enabled
ThingSpeak Platform ThingSpeak.com is to be used as cloud service provider and sensor DHT11 will be used to measure temperature and humidity data.
 Join CG Makers Community

Arduino day 2019

  • 1.
  • 2.
    Topics 1. Introduction ofArduino Day 2. Introduction of Internet of Things 3. What is Open Source Platform? 4. What is Arduino? 5. Basics Arduino software (IDE) 6. Arduino Board Layout & Architecture 7. Embedded C language 8. Arduino Programming & Interface of Sensors. 9. Application of Sensor. 10. Cloud Interfacing with Arduino.
  • 3.
    About Arduino Day •ArduinoDay is a worldwide birthday celebration of Arduino. It's a 24 hour-long event – organized directly by the community, or by the Arduino founders – that brings people together to share their experiences and learn more about the open-source platform. What Can You Do During Arduino Day? •You can attend an event or organize one for your community. It doesn’t matter whether you are a Maker, an engineer, a designer, a developer or an educator: Arduino Day is open to anyone who wants to celebrate the amazing things that have been done (or can be done!) with the open-source platform. The events will feature different types of activities, tailored to local audiences all over the world.
  • 4.
    Introduction of Internetof Things The Internet of Things is simply "A network of Internet connected objects able to collect and exchange data." It is commonly abbreviated as IoT. The word "Internet of Things" has two main parts; Internet being the backbone of connectivity, and Things meaning objects / devices . In a simple way to put it, You have "things" that sense and collect data and send it to the internet. This data can be accessible by other "things" too.
  • 5.
    Open Source Software/Hardwareand Platform Open-source software is a type of computer software in which source code is released under a license in which the copyright holder grants users the rights to study, change, and distribute the software to anyone and for any purpose. Open-source software may be developed in a collaborative public manner
  • 6.
    What is Arduino? TheArduino is an open-source electronics platform based on easy-to-use software and hardware. Arduino boards are able to read inputs – light on a sensor, a finger on a button, or a Twitter message – and turn it into an output – activating a motor, turning on an LED, publishing something online.
  • 7.
  • 8.
  • 9.
    Getting Started 1. Download& install the Arduino environment (IDE) 2. Connect the board to your computer via the USB cable 3. If needed, install the drivers 4. Launch the Arduino IDE 5. Select your board 6. Select your serial port 7. Write Sketch (Program) 8. Upload the program
  • 10.
  • 11.
    In Arduino IDEthere are 6 Buttons which is used for following:- The check mark is used to verify your code. Click this once you have written your code. The arrow uploads your code to the Arduino to run. The dotted paper will create a new file. The upward arrow is used to open an existing Arduino project. The downward arrow is used to save the current file. The far right button is a serial monitor, which is useful for sending data from the Arduino to the PC for debugging purposes.
  • 12.
    Arduino IDE Arduino IDEis JAVA Based Code Compile in C and C++ Save and execute in .ino Arduino code called Sketches
  • 13.
    Arduino Programming Variables Like anyother high-level language, a variable is used to store data with three components: a name, a value, and a type. For example, consider the following statement: int pin = 10; Here, pin is the variable name that is defined with the type int and holds the value 10. Later in the code, all occurrences of the pin variable will retrieve data from the declaration that we just made here.
  • 14.
    Constants In the Arduinolanguage, constants are predefined variables that are used to simplify the program: HIGH, LOW: While working with digital pins on the Arduino board, only two distinct voltage stages are possible at these pins. false, true: These are used to represent logical true and false levels. false is defined as 0 and true is mostly defined as 1. INPUT, OUTPUT: These constants are used to define the roles of the Arduino pins. If you set the mode of an Arduino pin as INPUT, the Arduino program will prepare the pin to read sensors. Similarly, the OUTPUT setting prepares the pins to provide a sufficient amount of current to the connected sensors.
  • 15.
    Data types float: Thisdata type is used for numbers with decimal points. These are also known as floating-point numbers. float is one of the more widely used data types along with int to represent numbers in the Arduino language: float varFloat = 1.111; char: This data type stores a character value and occupies 1 byte of memory. When providing a value to char data types, character literals are declared with single quotes: char myCharacater = 'P'; array: An array stores a collection of variables that is accessible by an index number. If you are familiar with arrays in C/C++, it will be easier for you to get started, as the Arduino language uses the same C/C++ arrays. The following are some of the methods to initialize an array: int myIntArray[] = {1, 2, 3, 4, 5}; int tempValues[5] = { 32, 55, 72, 75}; char msgArray[10] = "hello!"; An array can be accessed using an index number (where the index starts from number 0): myIntArray[0] == 1 msgArray[2] == 'e'
  • 16.
    Data types The declarationof each custom variable requires the user to specify the data type that is associated with the variable. The Arduino language uses a standard set of data types that are used in the C language. A list of these data types and their descriptions are as follows: void: This is used in the function declaration to indicate that the function is not going to return any value: void setup() { // actions } boolean: Variables defined with the data type boolean can only hold one of two values, true or false: boolean ledState = false;
  • 17.
    Data types byte: Thisis used to store an 8-bit unsigned number, which is basically any number from 0 to 255: byte b = 0xFF; int: This is short for integers. It stores 16-bit (Arduino Uno) or 32-bit (Arduino Due) numbers and it is one of the primary number storage data types for the Arduino language. Although int will be used to declare numbers throughout the book, the Arduino language also has long and short number data types for special cases: int varInt = 2147483647; long varLong = varInt; short varShort = -32768;
  • 18.
    My First Program(LEDBlink) int led = 13; void setup() { pinMode(led, OUTPUT); } void loop() { digitalWrite(led, HIGH); delay(500); digitalWrite(led, LOW); delay(500); }
  • 20.
    Temperature and HumiditySensor #include <dht.h> dht DHT; #define DHT11_PIN 7 void setup() { Serial.begin(9600); } void loop() { int chk =DHT.read11(DHT11_PIN); Serial.print("Temperature = "); Serial.println(DHT.temperature); Serial.print("Humidity = "); Serial.println(DHT.humidity); delay(1000);}
  • 21.
    PIR Motion Detectorand Analytics with Python int pirPin = 7; void setup() { pinMode(pirPin, INPUT); Serial.begin(9600); } void loop() { if (digitalRead(pirPin) == HIGH) { Serial.println("1"); } else { Serial.println("0"); } delay(500); }
  • 23.
    NodeMCU An open-source firmwareand development kit that helps you to prototype your IOT product within a few Lua script lines. Features: Open-source Interactive Programmable Low cost (285/-) Simple Smart WI-FI enabled
  • 24.
    NodeMCU Temperature, Humiditydata upload on Thingspeak on Arduino IDE An open-source firmware and development kit that helps you to prototype your IOT product within a few Lua script lines. Features: Open-source Interactive Programmable Low cost (285/-) Simple Smart WI-FI enabled
  • 25.
    ThingSpeak Platform ThingSpeak.com isto be used as cloud service provider and sensor DHT11 will be used to measure temperature and humidity data.
  • 27.