Microcontroller Prototypes with Arduino and a 3D Printer
اسم المؤلف
Dimosthenis E. Bolanakis
التاريخ
المشاهدات
817
التقييم
(لا توجد تقييمات)
Loading...
التحميل

Microcontroller Prototypes with Arduino and a 3D Printer
Learn, Program, Manufacture
Dimosthenis E. Bolanakis
Department of Air Force Science
Hellenic Air Force Academy
Athens
Greece
Contents
About the Author xi List of Figures xii List of Tables xxvi Preface xxvii
Acknowledgments xxx Abbreviations xxxi Syllabus xxxv
1 The Art of Embedded Computers 1
Overview of Embedded Computers and Their Interdisciplinarity 1 Computer vs. Embedded Computer
Programming and Application Development 2
Group 1: Programmable Logic Devices 3
Group 2: Reconfigurable Computers 4
Group 3: Microcomputers 4
Group 4: Single-Board Computers 6
Group 5: Mobile Computing Devices 6
TPACK Analysis Toward Teaching and Learning Microcomputers 7 TPACK Analysis of the
Interdisciplinary Microcontroller Technology 7 Content Knowledge (The What) 8
Technology Knowledge (The Why) 9
Pedagogical Knowledge (The How) 11
From Computational Thinking (CT) to Micro-CT (μCT) 12 CT Requirement and Embedded Computers 13
Microcomputers and Abstraction Process 14
The μCT Concept: An Onion Learning Framework 15
“Transparent” Teaching Methods 17
The Impact of Microcontroller Technology on the Maker Industry 19
Hardware Advancement in μC Technology 20
Software Advancement in μC Technology 23
The Impact of Arduino on the μC Community 23
Where Is Creativity in Embedded Computing Devices Hidden? 26
Creativity in Mobile Computing Devices: Travel Light, Innovate Readily! 26
Communication with the Outside World: Sensors, Actuators, and Interfaces 28
Conclusion 30
2 Embedded Programming with Arduino 31
­Number­Representation­and Special-Function­Codes­ 31
­Arduino­and C­Common­Language­Reference­ 34
­Working­with Data­(Variables,­Constants,­and Arrays)­ 36
Arduino­UART­Interface­to­the­Outside­World­(Printing­Data)­ 39
Arduino­Ex.2–1­ 40
Arduino­Ex.2–2­ 44
­Program­Flow­of Control­(Arithmetic­and Bitwise­Operations)­ 47
Arduino­UART­Interface­(Flow­of­Control­and­Arithmetic/­
Bitwise­Examples)­ 52
Arduino­Ex.2–3­ 52
Arduino­Ex.2–4­ 53
Arduino­Ex.2–5­ 54
Arduino­Ex.2–6­ 59
Arduino­Ex.2–7­ 63
­Code­Decomposition­(Functions­and Directives)­ 69
Arduino­Ex.2–8­ 69
­Conclusion­ 72
Problem­2–1­(Data­Output­from­the­μC­Device:­Datatypes­and­BytesReserved­by­the­hw)­ 73
Problem­2–2­(Data­Output­from­the­μC­Device:­Logical­Operatorsin Control Flow)­ 73
Problem­2–3­(Data­Input­to­the­μC­Device:­Arithmetic­and­BitwiseOperations)­ 73
Problem­2–4­(Code­Decomposition)­ 73
3 Hardware Interface with the Outside World 75
­Digital­Pin­Interface­ 75
Arduino­Ex.3.1­ 76
Arduino­Ex.3.2­ 77
Arduino­Ex.3.3­ 81
Arduino­Ex.3.4­ 82
Arduino­Ex.3.5­ 84
­Analog­Pin­Interface­ 86
Arduino­Ex.3.6­ 87
Arduino­Ex.3.7­ 91
­Interrupt­Pin­Interface­ 91
Arduino­Ex.3.8­ 94
­UART­Serial­Interface­ 96
Arduino­Ex.3.9­ 97
Arduino­Ex.3.10­ 98
Arduino­Ex.3.11­ 99
­SPI­Serial­Interface­ 101
Arduino­Ex.3.12­ 103Contents ix
Arduino­Ex.3.13­ 110
Arduino­Ex.3.14­ 115
Arduino­Ex.3.15­ 121
­I2C­Serial­Interface­ 122
Arduino­Ex.3.16­ 125
Arduino­Ex.3.17­ 130
Arduino­Ex.3.18­ 135
Arduino­Ex.3.19­ 142
­Conclusion­ 146
Problem­3.1­(Data­Input­and Output­to/from­the μC­UsingPush-Button and LED IO­Units)­ 147
Problem­3.2­(PWM)­ 147
Problem­3.3­(UART,­SPI,­I2C)­ 147
4 Sensors and Data Acquisition 149
­Environmental­Measurements­with Arduino­Uno­ 149
Arduino­Ex.4–1­ 150
DAQ­Accompanying­Software­of the­Ex.4–1­ 157
DAQ­Accompanying­Software­with­Graphical­Monitoring­­
Feature­Via­gnuplot­ 166
Arduino­Ex.4–2­ 169
­Orientation,­Motion,­and Gesture­Detection­with Teensy­3.2­ 171
Arduino­Ex.4–3­ 173
Arduino­Ex.4–4­ 174
Arduino­Ex.4–5­ 177
Arduino­Ex.4–6­ 184
DAQ­Accompanying­Software­for­Orientation,­Motion,­
and Gesture Detection with gnuplot­ 191
Real­Time­Monitoring­with­Open­GL­ 193
­Distance­Detection­and­1D­Gesture­Recognition­with­TinyZero­ 200
Arduino­Ex.4–7­ 201
Arduino­Ex.4–8­ 205
DAQ­Accompanying­Software­for­Distance­Measurements­ 209
­Color­Sensing­and­Wireless­Monitoring­with­Micro:bit­ 211
Arduino­Ex.4–9­ 212
Arduino­Ex.4–10­ 216
Open­GL­Example­Applying­to­RGB­Sensing­ 220
Arduino­Ex.4–11­ 222
­Conclusion­ 226
Problem­4–1­(Data­Acquisition­of­Atmospheric­Pressure)­ 226
Problem­4–2­(Fusion­of­Linear­Acceleration­and­­
Barometric­Altitude)­ 226
Problem­4–3­(1D­Gesture­Recognition)­ 226
Problem­4–4 (Color­Sensing)­ 226x Contents
5 Tinkering and Prototyping with 3D Printing Technology 227
­Tinkering­with­a­Low-cost­RC­Car­ 227
Arduino­Ex.5.1­ 231
Arduino­Ex.5.2­ 236
­A­Prototype­Interactive­Game­for Sensory­Play­ 237
Hardware­Boards­of the­Prototype­System­ 238
Assembly­Process­of­the­3D­Printed­Parts­of­the­System’s­Enclosure­ 243
Firmware­Code­Design­and User­Instructions­ 249
Arduino­Ex.5.3­ 250
Arduino­Ex.5.4­ 253
Arduino­Ex.5.5­ 256
Arduino­Ex.5.6­ 260
­3D­Printing­ 262
Modeling­3D­Objects­with­FreeCAD­Software­ 262
Preparing­the­3D­Prints­with­Ultimaker­Cura­Software­ 269
3D­Printing­with­Prima­Creator­P120­ 272
Presentation­of­the­Rest­3D­Models­of­the­Prototype­Interactive­Game­ 276
PrototypeB­(Modeling­the­battery.stl­Part)­ 276
PrototypeC­(Modeling­the­booster.stl­Part)­ 278
PrototypeD­(Modeling­the­speaker.stl­Part)­ 283
PrototypeE­(Modeling­the­cover.stl­Part)­ 284
PrototypeF­(Modeling­the­button.stl­Part)­ 287
PrototypeG­(Modeling­the­sensor.stl­Part)­ 290
PrototypeH­(Modeling­the­front.stl­Part)­ 290
­Conclusion­ 294
Problem­5.1­(Tinkering­with­a­Low-cost­RC­Car)­ 294
Problem­5.2­(A­Prototype­Interactive­Game­for Sensory­Play)­ 294
Problem­5.3­(A­Prototype­Interactive­Game­for Sensory­Play)­ 295
Problem­5.4­(A­Prototype­Interactive­Game­for Sensory­Play)­ 296
Problem­5.5­(3D­Printing)­ 296
References 297
Index
a
absolute height 169, 187, 189, 190, 193, 226
absolute orientation 177, 181
acknowledge 4, 35, 123, 128, 129
b
baud rate 41, 54, 88, 94, 96, 98, 101, 154,
158–160, 162, 166, 169
bitmask 65, 80, 81, 84, 104, 106
bootloader 19, 22, 24, 43, 57, 173, 204, 205
bottom‐up design approach 249, 250, 253,
256, 260
byte 31, 34, 36–39, 43–45, 47, 56, 57, 59, 61, 63,
64, 66, 71, 73, 77, 97, 103–105, 108, 110, 113,
119, 123, 125, 126, 128, 134, 135, 138, 140,
159–162, 180, 184
c
class 3, 11, 15, 17, 116–118, 121, 135, 136, 140,
208, 223, 251, 253
clock phase (CPHA) 101, 103, 116, 118, 119
clock polarity (CPOL) 101, 103, 116, 118
clock stretching 136
code decomposition 69–73
coefficients (coeffs) 108–110, 112, 113,
128–130, 134, 155, 171
complement representation 33, 63, 66, 69, 71, 72
conditional branch 49, 50
constant 36–47, 50, 94, 205, 206, 251, 253
constructor 116–118, 121, 135, 136, 224
creativity 26–30, 149, 226, 294
critical thinking 187
d
data acquisition (DAQ) 4, 92, 93, 106, 108, 126,
149–226, 249
datatypes 36–39, 44, 45, 47, 50, 52, 54, 59, 69,
73, 161, 221, 258
debounce delay 84, 94
decimal 31–34, 38, 39, 43–47, 63, 89, 91, 94,
139, 162
duty cycle (DC) 86, 236
e
embedded programming 31–73
Euler angles 177, 179–184, 191–200, 220, 221
external interrupt 91, 93–95
f
falling edge 94, 101, 103, 105, 123
file pointer 164, 167–168
finite loop 48, 50, 51, 56
flowchart 12, 47, 48, 51, 52, 54, 55, 59, 60, 76,
83–85, 110, 111
flow of control 47–68
fractional digits 47
function‐like macros 72, 77, 79, 80
g
gimbal lock 180
global variables 43, 44, 70, 76, 77, 83, 110,
154, 236
gravity vector 179–184, 187, 188, 191–194
h
header file 2, 69–71, 110, 116, 117, 135, 136,
157–160, 164, 166, 178, 196, 206, 253, 258
hexadecimal 31, 32, 34, 38, 43, 44, 47, 52, 53,
59, 66, 104, 105, 108, 126, 216
i
idle state 97, 118
infinite loop 51, 53
initialization expression 50–51
international barometric formula 189, 190
interrupt service routine (ISR) 94
k
keywords 39, 44, 48–50, 56, 69, 116, 121, 135
l
labels 48, 94
latency 81, 82
least significant bit (LSB) 33, 97, 119, 123, 125,
126, 138–140, 181, 184
linear acceleration 179–184, 187, 191–195, 226
long‐cycle development era 1, 20, 23
loop counter 51, 52, 54, 119, 138, 162, 166, 168,
207, 208
LSB. see least significant bit (LSB)
m
Makers 1, 5, 7, 19–26, 28, 30, 171, 173, 200,
201, 205, 227, 262
micro‐computational thinking (μCT)
1, 12–19
most significant bit (MSB) 32, 33, 65, 104–106,
108, 112, 119, 123, 138, 181
multiple‐byte read 108–110, 112, 113, 125, 128,
130, 134, 135, 140, 142, 143
multiway branch 48
n
nibble 31, 34–36
numeral systems 31–34, 38, 59, 62, 67
numeric string 59–64, 66, 69, 70, 155, 162, 166,
168, 193, 221
o
object‐like macros 72, 76, 77
output data rate (ODR) 150–152, 154–156, 161,
162, 166, 168, 182
p
pipe 166, 168
pipe pointer 166
pointer 24, 54–59, 63, 66, 69, 70, 158–160, 163,
164, 166–168
polling 91
positional notation 33, 59, 62, 67
postfix 31, 51
predefined iterations 50–52
prefix 31, 38, 51
primitive shapes 262, 263
proprioception 238, 250, 260
pseudo‐architecture 13, 17–19
pseudo‐code 12, 13, 17–19, 47, 51, 69
pseudo‐hardware 13, 17–19
pseudo‐timing diagram 13, 17, 18
pull‐up resistor 83, 85, 94, 123
q
quotient 37, 62, 63
r
random number generator 260
raw measurements 108
reference voltage 87, 88, 96
remainder 37, 62, 63
RGB color model 216, 220
rising edge 101, 103
s
sensor fusion 177, 179, 182
sensory play 237–262, 294–296
sequential programming 4, 34, 47, 73, 75
short‐cycle development era 1, 20, 22, 30
simplicity in design 187, 202, 262, 294
start bit 97
stop bit 42, 97, 158, 159
string 38, 43–45, 47, 56–64, 66, 69, 70, 73, 99,
155, 158, 161, 162, 164, 166, 168, 174, 177, 184,
193, 196, 204, 210, 215, 221, 224, 226, 232, 233
subscript 16, 37, 38, 55, 56, 63, 66, 71
switch bounce 84, 94, 95
t
technological pedagogical content knowledge
(TPACK) 1, 7–12, 30
tinker 227
TPACK. see technological pedagogical content
knowledge (TPACK)
transparent teaching methods/strategies 12,
13, 17–19
true/false state 33
truth table 65, 103
typecasting 37, 39, 44, 45, 47, 52, 160
u
unconditional branch 48
update expression 51
v
variable scope 53
w
weighted codes 34
word 14, 26, 27, 31

كلمة سر فك الضغط : books-world.net
The Unzip Password : books-world.net

تحميل

يجب عليك التسجيل في الموقع لكي تتمكن من التحميل

تسجيل | تسجيل الدخول