Embedded system programming using Arduino microcontroller
This document summarizes an technical seminar on embedded systems programming using Arduino. It introduces Arduino as an open-source electronic prototyping platform based on an I/O board and development environment. The document outlines Arduino's architecture including its microcontroller, power supply, and I/O pins. It also describes how to program Arduino using its IDE, setting up sketches with setup() and loop() functions, and provides examples of blinking an LED and serial communication. Finally, it discusses applications of Arduino such as home automation, robotics, and scientific equipment.
An introduction to an embedded systems programming seminar using Arduino, guided by Mr. Venkatesh P and presented by Kumar GV.
Overview of the seminar contents including Introduction, Architecture, Arduino examples, Serial communication, Software interface, Programming, and Applications.
Defines embedded systems and introduces Arduino as an open-source electronic prototyping platform.
Slide presenting the topic of Arduino architecture without specific details.
Arduino power requirements are specified; needs 9 to 12V DC with a minimum of 250mA.
Arduino can be programmed via USB connection to a PC.
Description of critical Arduino components including the microcontroller, power pins, digital pins, and reset function.
Introduction to an example of using Arduino.
Explains serial communication between the computer and Arduino and the concept of breaking data into bits.
Details about baud rate, its importance in serial communication, and code to set the baud rate.
Introduction to Arduino IDE, its cross-platform capability, and features for coding and uploading.
Describes the main menus and shortcut icons available within Arduino IDE.
An overview of how to structure Arduino programs, including setup and loop functions.
Basic syntax rules for writing Arduino code, comment styles, and case sensitivity.
A basic example of how to output a value to the Arduino window.
Details on a specific program to make an LED blink, including the timing of ON and OFF states.
Details of the code commands used to implement the blink LED functionality.
Explanation on the setup function which executes once at the program's start.
Explains the loop function, which is repeatedly called and essential for continuous operation.
Practical applications of Arduino including light control, robotics, home automation, and scientific equipment.
Summarizes Arduino's significance in integrating software and hardware and its future importance.
List of references and resources for learning more about Arduino and embedded systems.
A thank you note to the audience, concluding the seminar.
Embedded system programming using Arduino microcontroller
1.
A technical seminaron “EMBEDDED SYSTEMS PROGRAMMING USING ARDUINO” Guided by: Presented by: Mr.Venkatesh P Arun Kumar GV Asst.Prof dept.of IS & E PESITM,Shimoga
Introduction • An embeddedsystem is a computer system with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints. • Arduino is an open-source electronic prototyping platform based on a simple i/o board and a development environment for writing software for the board. • It is an open source hardware, any one can get the details of its design and modify it or make his own one himself.
• X1 –External power supply or a battery.The power requirement for ARDUINO is 9 to 12V DC,250mA or more,2.1mm plug
6.
• USB –We can connect arduino to our PC for programmming the arduino through USB.
7.
• IC1 –Microcontroller ICSP – In circuit serial programming AREF – Analog reference pin GND – Digital ground 2-13 Digital pins 0-1(TX/RX) – Serial In/Out S1 – Reset button 0-5 Analog Input pins Power and Ground pins
Serial communication • Thecommunication between the computer and the arduino is ‘serial’ , because data is broken down into bits, each sent one after the other down a single wire.
10.
•The Arduino boardcan communicate at various “baud rates”. A baud is a measure of how many times the hardware can send 0’s and 1’s in a second •The baud rate must be set properly for the board to convert incoming and outgoing information to useful data. •If your receiver is expecting to communicate at a baud rate of 2400, but your transmitter is transmitting at a different rate, the data you get will not make sense. •To set the baud rate, use the following code: void setup() { Serial.begin(9600); } •Other standard baud rates available on most Arduino modules include: 300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, or 115200
11.
Arduino software interface •The software used by the arduino is Arduino IDE. • The open-source Arduino Software (IDE-Integrated development Environment) makes it easy to write code and upload it to the board. • IDE runs on Windows, Mac OS X, and Linux. The environment is written in Java. • It is designed to introduce programming to artists and other newcomers unfamiliar with software development. It includes a code editor with features such as syntax highlighting, brace matching, and is also capable of compiling and uploading programs to the board with a single click. • The code for the arduino is written in C/C++. The Arduino IDE comes with a C/C++ library , which makes many common input/output operations much easier.
12.
•The main headingsare “File” “Edit” “Sketch” “Tools” “Help” and several shortcut icons beneath “Verify”, “Upload”, “New”, “Open”, “Save”, and at the far right, the “Serial Monitor”.
15.
Programming the arduino •Arduino programs only need to define two functions to make a runnable program: void setup() {} – a function run once at the start of a program that can initialize settings. This section is widely used to initialize variables, pin modes, set the serial baud rate and related. void loop() {} – a function called repeatedly until the board powers off. This section is the part of the code that loops back onto itself and is the main part of the code. • Programmers are free to add subroutines using the same syntax: void subroutinename() {} • We will use same data types, operators, statements as we use in C programming language.
16.
•Almost every lineof code needs to end with a semicolon ‘;’. •To write single line comments in the code, type two back slashes followed by the text. •To write multi-line comments, start the comment with /* and end with */. •The Arduino language is case sensitive. • The following code represents the minimum in order for a program to compile:
Blink LED programm •Inthis program the Led should blink (turn on) for 1 second and after 1 second the LED should turn off for 1 second,and hence this cycle repeats.
Applications Light control Motor control Home Automation Robotics Networking Scientific equipment Arduinome ArduinoPhone Water quality testing platform
23.
Conclusion • Over theyears, Arduino has went out to become a huge success . By using the arduino we can put together both software and hardware. Arduino will be the most useful interface between the software and the hardware in future. In summary, this arduino concept is a good software hardware co-design practice.