This document discusses the open-source Arduino platform. It describes Arduino as originating from the Italian Ivrea university and being based on C/C++. The core is an ATmega microcontroller and it has inputs/outputs that can be used to control devices like LEDs, motors, and sensors. The Arduino IDE provides an easy development environment to write and upload code to Arduino boards to build interactive projects. Examples demonstrated include blinking an LED, reading serial communication, and using pulse-width modulation to control the position of a servo motor.
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
Introduction to Free-Software Arduino
1. f
Networked Embedded Applications and Technologies Lab
Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN
Free-Software Arduino
Kuan-Yu, Chen
陳冠宇
2. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 2NEAT
Outline
What is Arduino?
Source
Kernel architecture
Signal message.
What can you do by Arduino?
Develop environment
Just do it
LEDs
UART
PWM(Explain by Servo)
Analysis product
3. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 3NEAT
Download Software.
www.arduino.cc
http://140.116.245.210:5000/fbsharing/8N94DeUp
4. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 4NEAT
What is Arduino?
5. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 5NEAT
Source
From Italian Ivrea university.
David Mellis 、 David Cuartielles 、 Gianluca Martino 、 Massimo
Banzi 、 Tom Igoe
6. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 6NEAT
Kernel Architecture
IC Type
8 bits 8051 、 ATMEGA8
16 bits PIC 、 MSP430
32 bits ARM
• Only one schedule.
7. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 7NEAT
Kernel Architecture
8. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 8NEAT
Kernel Architecture
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Digital I/O Pins 14(6 for PWM)
Analog Input Pins 6
DC Current per I/O Pin 40mA
DC Current for 3.3V Pin 50mA
Flash Memory 32KB(0.5 KB for bootloader )
Clock Speed 16Mhz
SRAM 2 KB
EEPROM 1KB
9. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 9NEAT
Kernel Architecture
10. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 10NEAT
Kernel Architecture
GPIO(General-purpose input/output)
AD(Analog to Digital)
Interrupt
PWM(Pulse-width modulation)
UART(Universal asynchronous reciver/transmitter)
SPI(Serial peripheral interface)
I2C(Inter-Integrated Circuit)
…
…
11. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 11NEAT
Signal message.
Sensor
Digital
Analog
Input/Output
Control
Display
12. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 12NEAT
What can you do by
Arduino?
13. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 13NEAT
Develop environment
Base on C/C++.
Function. (By library)
Open-Source. (Include hardware and software)
Easy.
14. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 14NEAT
Check Board.
Check Serial Port.
15. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 15NEAT
Compile.
Download.
16. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 16NEAT
Just do it
17. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 17NEAT
include<> or ””
void setup{}
void loop{}
18. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 18NEAT
LEDs
pinMode(GPIO,Pin mode);
digitalWrite(Pin,state);
delay(time);
19. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 19NEAT
UART
Serial.begin(baud rate);
Serial.available();
If receive someting.
Serial.read();
Return value of receive.
Serial.println(Value);
20. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 20NEAT
21. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 21NEAT
22. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 22NEAT
Lab
1. Try LEDs, UART and PWM(Servo).
2. Turn on the LED(pin13) if UART receive “H”.
3. Modify angle of motor by UART.
23. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 23NEAT
1. DC Motor
2. Reducing gear
3. Controller
4. Sensor
24. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 24NEAT
25. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 25NEAT
How to control
1. Use Servo.h
2. Set initial position.
3. Control.
26. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 26NEAT
PWM
include<Servo.h>
Servo name;
name.attach(pin);
name.write(pos);
27. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 27NEAT
Reference
2014 Arduino, www.arduino.cc
1know.net, http://1know.net/knowledge/97636f101c46?v=list
Arduino IDE introduction, Wiki, Decr, 2011,
http://zh.wikipedia.org/wiki/Arduino
孫駿榮、吳明展、盧聰勇 , “Arduino 一試就上手 ( 第二
版 ),, , 碁峯資訊出版 , Sep,2012.
賴文章、陳冠宇 , “Arduino ”入門級中文教學 , Jan,2012.
28. Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN 28NEAT
Thanks for your listen