Introduction to the Arduino Wearable development tutorial (University bully Internal information)
Probation: Link: http://pan.baidu.com/s/1mg9To28 Password: z5v8
Introduction: An introduction to the Arduino Wearable development tutorial (university bully Internal materials) is the first wearable technology implementation tutorial in China. This tutorial explains how to build a wearable product with the most popular open source hardware Arduino. Full tutorial covers Arduino lily hardware, software development and project construction. Finally, three items are explained: Tomato alarm clock, binary clock, P#ov hand *& ring.
Directory
1th Chapter Lilypad Arduino Overview 1
1.1 Wearable technology and electronic fabric 1
1.2 Lilypad Each module introduction 1
1.2.1 Controller board 1
1.2.3 Output Module 3
1.2.4 Input Module 3
1.2.5 Power Module 4
1.2.6 Programmer Module 5
1.2.7 Lilypad Set 5
1.3 Sewing Basics 6
1.4 Lilypad and Lilypad simple 10
1.4.1 Lilypad 10
1.4.2 Lilypad Simple 11
1.5 book Writing ideas 12
Chapter 2nd Development Environment 13
2.1 Arduino IDE 13
2.1.1 Installation package download 13
2.1.2 Installing the Arduino IDE 15 under the Windows platform
Installing the Arduino IDE 18 under the 2.1.3 Linux platform
2.2 Understanding IDE 18
2.2.1 Booting the Arduino IDE 18
2.2.2 Creating a new source file 20
2.2.3 Editing source files 21
2.2.4 Saving source files 23
2.2.5 Open a source file that already exists 24
2.3 Connecting Lilypad 25
2.3.1 Drivers for Windows platforms 25
2.3.2 Linux Platform drivers 26
2.4 First Program--blink 27
2.4.1 Open Official Example 27
2.4.2 Connecting hardware 28
2.4.3 Select Board 28
2.4.4 Select Port 29
2.4.5 Uploading a program 31
2.4.6 observation of running results 31
3rd Arduino Language Basics 33
3.1 Variables 33
3.1.1 Data type 33
3.1.2 Pre-defined constants 36
3.1.3 Variable scope and qualifier 37
3.2 operator 38
3.2.1 Arithmetic operator 38
3.2.2 comparison operator 38
3.2.3 pointer operator 39
3.2.4 Boolean operator 39
3.2.5 bitwise operator 39
3.2.6 composite operator 41
3.3 Functions 42
3.3.1 Function Basics 42
3.3.2 Time correlation function 43
3.3.3 Mathematical correlation function 43
3.3.43 Angular correlation function 44
3.3.5 random number correlation function 44
3.3.6 type conversion correlation function 44
3.3.7-bit and byte- related functions 44
3.4 Program Structure 45
3.4.1 Setup () and loop () 45
3.4.2 Control Structure 46
3.4.3 more syntax 51
Chapter 4th Signal I /o 54
4.1 Digital Signal I /o 54
4.1.1 Digital signal 54
4.1.2 Setting the digital port Mode 54
4.1.3 Digital Port output 54
4.1.4 using digital port output to control LEDs 55
4.1.5 using the digital port output to control the vibration motor 59
4.1.6 Digital Port input 60
4.1.7 using the digital port to read input 61s from the button
4.1.8 using pull-up/pull- down resistors 62
4.2 Analog Signal I /o 63
4.2.1 Analog signal 63
4.2.2 Pulse width modulated pwm 63
4.2.3 Analog-to-digital Converter ADC 66
4.2.4 analog signal output 67
4.2.5 using analog ports to control led Brightness 68
4.2.6 using an analog port to control vibration strength of a vibrating motor 69
4.2.7 analog Signal input 70
4.3 tone () and Notone () 70
5th Chapter serial Communication 74
5.1 Lilypad's serial hardware 74
5.2 Serial port software Control 75
5.3 Example of serial communication-using a computer to control a tri-color LED module 78
5.3.1 Tri-color led Module 78
5.3.2 Wiring Method 78
5.3.3 Drive Tri-color led Module 79
5.4 Complete knowledge of analog input signals 82
5.4.1 Brightness sensor 82
5.4.2 Temperature sensor 84
5.4.3 Accelerometer 85
5.5 Interrupt 87
5.5.1 binding interrupt 87
5.5.2 Cancel Interrupt 89
The 6th chapter of the project tomato Alarm Clock 90
6.1 Tomato Time Management Act 90
6.2 Overall Realization Ideas 90
6.3 Module Selection 91
6.4 Circuit Connection 92
6.5 Software Implementation 92
6.6 How to use 95
6.7 Styling Design Recommendations 95
6.8 Continuous Improvement 95
7th. Project 2--Binary clock 99
7.1 Tracking Time on Lilypad 99
7.2 Hardware Design 101
7.3 Read Time 102
7.4 Circuit Connection 103
7.5 Software Implementation 104
8th. Project 3--p$o$ Hand & () ring 110
8.1 Implementation principle 111
8.2 Hardware design 111
8.3 Software design 112
8.4 Actual test 117
Introduction to the Arduino Wearable development tutorial (University bully Internal information)