Exploring the Raspberry Pi 2 with C++ 🔍
Warren Gay (auth.) Apress : Imprint : Apress, Technology in action series, 1, 2015
英语 [en] · PDF · 5.0MB · 2015 · 📘 非小说类图书 · 🚀/lgli/lgrs/nexusstc/scihub/upload/zlib · Save
描述
This book takes you on a tour of the Pi 2 hardware and all of the fantastic things that you can do to create innovative and useful projects with your Pi. Start with creating a workstation that does actual work, and move into installing a custom kernel, creating a clock, learning the ins and outs of the GPIO interface, and pick up some useful C++ skills along the way. You will learn: how to create an experimenter's workstation for the Pi 2, complete with breadboard and Arduino; details of GPIO, including a custom command for working with it; useful projects like a general purpose clock and the PiSpy; quick intro to C++ for the Pi; how to make a multi-core webserver. --;Chapter 1: Introduction to Pi 2 -- Chapter 2: Workstation -- Chapter 3: The Matrix -- Chapter 4: Installing a Kernel -- Chapter 5: GPIO gp Command -- Chapter 6: General Purpose Clock -- Chapter 7: Pulse Width Modulation -- Chapter 8: Physics of the GPIO Interface -- Chapter 9: PiSpy -- Chapter 10: Debouncing -- Chapter 11: Fast Track to C++ -- Chapter 12: Multi-core Webserver -- Appendix A: GPIO Class, Part I -- Appendix B: GPIO Class, Part II -- Appendix C: GPIO Class, Part III -- Appendix D: MAX7219 Class -- Appendix E: Matrix Class -- Appendix F: MTop and Diskstat -- Appendix G: The Rest.
备用文件名
upload/bibliotik/E/Exploring the Raspberry Pi 2 wi - Warren Gay.pdf
备用文件名
lgli/K:\!genesis\!repository8\sp\10.1007%2F978-1-4842-1739-9.pdf
备用文件名
lgrsnf/K:\!genesis\!repository8\sp\10.1007%2F978-1-4842-1739-9.pdf
备用文件名
nexusstc/Exploring the Raspberry Pi 2 with C++/f552f90451c0155f39ae468a710f31de.pdf
备用文件名
scihub/10.1007/978-1-4842-1739-9.pdf
备用文件名
zlib/Computers/Warren Gay (auth.)/Exploring the Raspberry Pi 2 with C++_2802195.pdf
备选作者
Gay, Warren
备用出版商
Apress, Incorporated
备用版本
Technology in action series, New York, NY, 2015
备用版本
United States, United States of America
备用版本
Springer Nature, Berkeley, CA, 2015
备用版本
1st ed., PS, 2015
备用版本
Nov 24, 2015
元数据中的注释
sm47573284
元数据中的注释
producers:
Adobe PDF Library 10.0.1
元数据中的注释
{"content":{"parsed_at":1714817866,"parser":{"name":"textparser","version":"0.1.129"},"source":{"name":"grobid","version":"0.8.0"}},"edition":"1","isbns":["1484217381","148421739X","9781484217382","9781484217399"],"last_page":212,"publisher":"Apress","series":"Technology in action series"}
备用描述
Contents at a Glance 5
Contents 7
About the Author 16
Acknowledgments 17
Chapter 1: Introduction 18
Overview 18
Software for This Book 19
Software Installation 20
Installation Notes 21
Thank You 21
Chapter 2: Workstation 22
The Raspberry Pi 2 Arrives 22
The Raspberry Pi 2 pcb 23
Constructing the Workstation 24
Breadboard Breakout 28
RS-232 Connection 30
Panel Meter 33
Arduino/ AVR 35
Summary 35
Chapter 3: The Matrix (CPU Utilization) 36
The LED Matrix 36
Level Converters 37
Interfacing GPIO to MAX7219 38
Absolute Maximum Ratings 39
MAX7219 Commands 40
Display Data Commands 41
Decode Mode Command 41
Intensity Command 42
Scan-Limit Command 42
Shutdown Command 42
Test Mode Command 42
No Operation Command 43
Matrix Signals 43
CPU Meter 44
The mtop Command 45
Bibliography 46
Chapter 4: Installing a Kernel 47
Overall Procedure 47
Disk Space 48
Downloading the Source 48
Raspberry Tools 49
Prepare Configuration 49
Build Configuration 49
Kernel Compile 50
Modules Build 52
Installing the Kernel 53
Reboot 55
Recovering from Boot Failure 55
Installing the rpidma Kernel Module 56
Autoloading rpidma 58
Specific Kernel Releases 59
Summary 62
Bibliography 62
Chapter 5: 3 GPIO gp Command 63
Unix Command Line Convention 63
The gp Command 65
Displaying GPIO Settings 66
Configuring GPIO as Input 67
Configuring GPIO as Output 67
Configuring GPIO as Alternate Function 67
Chart of Alternate Functions 68
Configuring GPIO Pullup/ Pulldown 68
Setting GPIO Output 69
Reading GPIO Input 69
Returning GPIO Value to Shell 70
Reading 32 GPIOs 70
Read GPIO Alternate Function 70
Blinking Output GPIO 71
Monitoring GPIO Input 71
Configuring GPIO Slew Rate 72
Configuring GPIO Hysteresis 73
Configuring GPIO Drive Level 74
Summary 75
Bibliography 75
Chapter 6: General Purpose Clock 76
The piclk Command 76
Displaying Clock Settings 77
Clock Source 79
Clock DIVI 79
MASH and DIVF 80
Determining DIVI and DIVF 81
Beat Frequency Oscillator 82
Audio Coverage 84
Maximum GPIO Output Frequency 85
RF Generation 85
Summary 86
Bibliography 86
Chapter 7: Pulse Width Modulation 87
The pipwm Command 87
Displaying PWM Settings 88
PWM Modes 91
M/S and PWM Data Mode 91
M/P = M/S Mode (-Am) 92
M/P = PWM Mode (-Ap) 94
Data Modes 96
Summary 96
Bibliography 96
Chapter 8: Physics of the GPIO Interface 97
CMOS 97
MOSFETs in Action 98
CMOS Configuration 99
CMOS Inputs 101
Input Protection 101
CMOS Outputs 102
Logic Levels 104
GPIO Drive 106
CMOS Usage Rules 107
Summary 108
Bibliography 108
Chapter 9: PiSpy 109
Introduction to pispy 109
pispy Command Options 109
Capture Length 110
Capture Resolution 110
Verbose Option 111
Option -x 111
Triggers 112
GtkWave 112
Invoking GTKWave 113
Using GTKWave 114
Testing PiSpy 115
GTKWave Hints 115
PiSpy in a Nutshell 116
Summary 117
Bibliography 117
Chapter 10: Debouncing 118
Introduction 118
Momentary Debouncing 120
Toggled Debouncing 120
The MC14490 122
Summary 125
Chapter 11: C++ Quick Start 126
C++ Standards 126
From C to C++ 127
Classes and Structs 128
Standard Template Library 128
Container std::vector 131
STL Iterators 132
Container::operator[ ] 133
Container::at( ) 133
Ordered and Unordered Maps 133
Initializer Lists 135
Iterating Maps 135
References 135
Map vs. Set 137
Container std::deque 138
Safe Iterators 138
Containers of Containers 139
C++ Strings 141
String Streams 143
Predefined Compiler Macros 144
Summary 144
Bibliography 144
Chapter 12: Multicore Web Server 145
libevent 145
Class WebMain 145
WebMain::start() 147
Worker Design 148
Server Shutdown 149
HTTP Processing 149
Permissions 150
How Many Threads? 151
To Do 151
Summary 151
Appendix A: Class GPIO 1 152
Assertion Macro Note 152
Include File 153
Linking with the GPIO Library 153
Class Definition (Part 1) 153
GPIO::GPIO Constructor 154
GPIO:: get_error 156
GPIO:: configure 156
GPIO::IO 156
GPIO::Pull 157
GPIO::Event 157
GPIO:: events_off 158
GPIO::read 158
GPIO::write 158
GPIO::read_ event 159
GPIO::clear_ event 159
GPIO:: read_events 160
GPIO:: alt_function 160
GPIO::get_drive_ strength 160
GPIO:: set_drive_strength 161
Appendix B: Class GPIO 2 162
Class Definition (Part 2) 162
GPIO:: config_clock 163
GPIO:: start_clock 165
GPIO:: stop_clock 166
GPIO:: pwm_configure 166
GPIO:: pwm_ratio 168
GPIO:: pwm_enable 168
GPIO:: pwm_clear_status 169
GPIO:: pwm_write_fifo 170
GPIO:: pwm_fifo_full 170
GPIO:: pwm_fifo_empty 170
GPIO:: get_pwm_ratio 171
GPIO:: pwm_control 171
GPIO:: pwm_status 172
Appendix C: Class GPIO 3 173
Class Definition (Part 3) 173
GPIO:: pwm 174
GPIO:: delay 174
GPIO:: peripheral_base 174
GPIO:: source_name 175
GPIO:: alt_name 175
GPIO:: gpio_alt_func 175
Appendix D: Class MAX7219 176
Include File 176
Linking 176
Class Definition 177
MAX7219::MAX7219 177
MAX7219:: enable 178
MAX7219:: config_intensity 178
MAX7219:: config_digits 179
MAX7219:: config_decode 179
MAX7219::data 180
MAX7219::test 180
MAX7219::shutdown 180
MAX7219::nop 181
Initialization Procedure 181
Appendix E: Class Matrix 182
Include File 182
Linking 182
Class Definition 183
Matrix:: Matrix 183
Matrix:: display 184
Matrix:: Pi 184
Matrix::set_ meter 185
Matrix::set_ deflection 186
Appendix F: Class MTop and Diskstat 187
Include Files 187
Linking 187
MTop Class Definition 187
MTop:: MTop 188
MTop:: sample 188
MTop:: total_cpu_pct 189
MTop::memory_ pct 189
MTop:: swap_pct 190
MTop Sampling Loop Timing 190
Diskstat Class Definition 191
Diskstat:: Diskstat 191
Diskstat::pct_ io 192
Appendix G: Other librpi2 Classes 193
DMA Allocation 193
Warning 194
Index 195
备用描述
You have a Pi 2, but what exactly can you do with it? This book takes you on a tour of the Pi 2 hardware and all of the fantastic things that you can do to create innovative and useful projects with your Pi. Start with creating a workstation that does actual work, and move into installing a custom kernel, creating a clock, learning the ins and outs of the GPIO interface, and pick up some useful C++ skills along the way.
Warren Gay, author of Mastering the Raspberry Pi , takes you through a set of experiments to show just what the Pi 2 is capable of and how you can use it to make your own fantastic creations.
What You Will Learn: How to create an experimenter's workstation for the Pi 2, complete with breadboard and even Arduino
All the details of GPIO, including a custom command for working with it
Useful projects like a general purpose clock and the PiSpy
Quick intro to C++ for the Pi
How to make a multi-core webserver
Who this book is for:Intermediate electronics enthusiasts and Pi fans, makers, students, teachers, and everyone who wants to know how to make the Pi really work.
备用描述
You have a Pi 2, but what exactly can you do with it? This book takes you on a tour of the Pi 2 hardware and all of the fantastic things that you can do to create innovative and useful projects with your Pi. Start with creating a workstation that does actual work, and move into installing a custom kernel, creating a clock, learning the ins and outs of the GPIO interface, and pick up some useful C skills along the way. Warren Gay, author of Mastering the Raspberry Pi, takes you through a set of experiments to show just what the Pi 2 is capable of and how you can use it to make your own fantastic creations. What You Will Learn: How to create an experimenter's workstation for the Pi 2, complete with breadboard and even Arduino All the details of GPIO, including a custom command for working with it Useful projects like a general purpose clock and the PiSpy Quick intro to C for the Pi How to make a multi-core webserver Who this book is for: Intermediate electronics enthusiasts and Pi fans, makers, students, teachers, and everyone who wants to know how to make the Pi really work.
备用描述
This book takes you on a tour of the Pi 2 hardware and all of the fantastic things that you can do to create innovative and useful projects with your Pi. Start with creating a workstation that does actual work, and move into installing a custom kernel, creating a clock, learning the ins and outs of the GPIO interface, and pick up some useful C++ skills along the way. You will learn: how to create an experimenter's workstation for the Pi 2, complete with breadboard and Arduino; details of GPIO, including a custom command for working with it; useful projects like a general purpose clock and the PiSpy; quick intro to C++ for the Pi; how to make a multi-core webserver. -- Edited summary from book
备用描述
Front Matter....Pages i-xix
Introduction....Pages 1-4
Workstation....Pages 5-18
The Matrix (CPU Utilization)....Pages 19-29
Installing a Kernel....Pages 31-46
3 GPIO gp Command....Pages 47-59
General Purpose Clock....Pages 61-71
Pulse Width Modulation....Pages 73-82
Physics of the GPIO Interface....Pages 83-94
PiSpy....Pages 95-103
Debouncing....Pages 105-112
C++ Quick Start....Pages 113-131
Multicore Web Server....Pages 133-139
Class GPIO 1....Pages 141-150
Class GPIO 2....Pages 151-161
Class GPIO 3....Pages 163-165
Class MAX7219....Pages 167-172
Class Matrix....Pages 173-177
Class MTop and Diskstat....Pages 179-184
Other librpi2 Classes....Pages 185-186
Back Matter....Pages 187-190
开源日期
2016-11-20
更多信息……

🚀 快速下载

成为会员以支持书籍、论文等的长期保存。为了感谢您对我们的支持,您将获得高速下载权益。❤️
如果您在本月捐款,您将获得双倍的快速下载次数。

🐢 低速下载

由可信的合作方提供。 更多信息请参见常见问题解答。 (可能需要验证浏览器——无限次下载!)

所有选项下载的文件都相同,应该可以安全使用。即使这样,从互联网下载文件时始终要小心。例如,确保您的设备更新及时。
  • 对于大文件,我们建议使用下载管理器以防止中断。
    推荐的下载管理器:JDownloader
  • 您将需要一个电子书或 PDF 阅读器来打开文件,具体取决于文件格式。
    推荐的电子书阅读器:Anna的档案在线查看器ReadEraCalibre
  • 使用在线工具进行格式转换。
    推荐的转换工具:CloudConvertPrintFriendly
  • 您可以将 PDF 和 EPUB 文件发送到您的 Kindle 或 Kobo 电子阅读器。
    推荐的工具:亚马逊的“发送到 Kindle”djazz 的“发送到 Kobo/Kindle”
  • 支持作者和图书馆
    ✍️ 如果您喜欢这个并且能够负担得起,请考虑购买原版,或直接支持作者。
    📚 如果您当地的图书馆有这本书,请考虑在那里免费借阅。