在好例子网,分享、交流、成长!
您当前所在位置:首页Python 开发实例Python语言基础 → MicroPython Projects A do-it-yourself guide to building embedded applications in various domains using Python (Jacob Beningo)

MicroPython Projects A do-it-yourself guide to building embedded applications in various domains using Python (Jacob Beningo)

Python语言基础

下载此实例
  • 开发语言:Python
  • 实例大小:18.59M
  • 下载次数:8
  • 浏览次数:55
  • 发布时间:2022-11-29
  • 实例类别:Python语言基础
  • 发 布 人:mhjysq
  • 文件格式:.pdf
  • 所需积分:2
 相关标签:

实例介绍

【实例简介】MicroPython Projects A do-it-yourself guide to building embedded applications in various domains using Python (Jacob Beningo) 

【实例截图】

【核心代码】

Table of Contents
Preface 7
Chapter 1: Down the Rabbit Hole with MicroPython 1
The embedded software language menagerie 2
The case for MicroPython 4
Use cases for MicroPython 5
Use case #1 – DIY projects 6
Use case #2 – rapid prototyping 6
Use case #3 – low-volume production products 7
Evaluating whether MicroPython is right for you 9
Selecting the right development platform 10
Surveying the available architectures 11
Identifying boards of interest 12
Selecting a development board using a KT matrix 15
MicroPython development processes and strategies 17
Useful development resources 19
Summary 20
Questions 21
Further reading 21
Chapter 2: Managing Real-Time Tasks 22
Technical requirements 22
The need for real-time scheduling 23
Real-time system types 23
MicroPython scheduling techniques 24
Round-robin scheduling 25
Building a task manager using round-robin scheduling 27
Periodic scheduling using timers 28
Building a task manager using periodic scheduling 30
MicroPython thread mechanism 32
Advantages of using threads in MicroPython 33
Considerations when using threads in MicroPython 34
Building a task manager using threads 34
Event-driven scheduling 36
Cooperative scheduling 36
Cooperative multitasking using asyncio 37
Introducing asyncio 38
A cooperative multitasking blinky LED example 40
Going further with asyncio 42
Summary 42
Table of Contents
[ ii ]
Questions 43
Further reading 43
Chapter 3: Writing a MicroPython Driver for an I/O Expander 44
Technical requirements 44
The RGB pushbutton I/O expander project requirements 45
Hardware requirements 45
Software requirements 46
The hardware and software architecture design 47
The hardware architecture 47
Detailed hardware design 48
Selecting a pushbutton 49
The I/O expander schematic 49
The software architecture 51
Project construction 54
Building the hardware 54
I/O expander driver construction 55
RGB driver construction 57
RGB pushbutton driver construction 58
Testing and validation 59
Developing the test cases 59
Writing the application 63
Summary 69
Questions 70
Further reading 70
Chapter 4: Developing an Application Test Harness 71
Technical requirements 72
A brief introduction to test harnesses 72
Test harness requirements 74
Hardware requirements 74
Software requirements 75
Test harness design 76
The test harness hardware architecture 77
The test harness software architecture 78
Constructing the test harness 82
Writing the test harness scaffolding 82
Tests for the PCA8574 84
Running the test harness 87
Summary 89
Questions 89
Further reading 89
Chapter 5: Customizing the MicroPython Kernel Start Up Code 90
Technical requirements 91
Table of Contents
[ iii ]
An overview of the MicroPython kernel 91
Downloading the MicroPython kernel 91
MicroPython kernel organization 92
Becoming familiar with the STM32L475SE_IOT01A port 93
mpconfigboard.h 97
mpconfigboard.mk 97
pins.csv 98
stm3214xx_hal_conf.h 99
Navigating the startup code 99
Modifying the default GPIO initialization 105
Adding MicroPython modules to the kernel 110
The compilation process 111
Deploying the custom kernel to a board 113
The compiled output files 113
Programming the board 114
Testing the updated kernel 116
Summary 119
Questions 119
Further reading 120
Chapter 6: A Custom Debugging Tool to Visualize Sensor Data 121
Technical requirements 122
Debugging and visualizing embedded systems 122
Visualizer requirements 123
Hardware requirements 123
Software requirements 124
Visualizer design 124
The visualizer hardware architecture 125
The visualizer software architecture 126
Constructing the visualizer 127
Installing the project libraries 128
Setting up a serial data stream in MicroPython 129
Opening a COM port using command-line arguments 133
Creating a user interface with Matplotlib 135
Plotting the incoming data stream 137
Running the visualizer 141
Going further with visualizer enhancements 143
Summary 144
Questions 145
Further reading 145
Chapter 7: Device Control Using Gestures 146
Technical requirements 147
Introducing gesture controllers 147
Gesture controller requirements 148
Table of Contents
[ iv ]
Hardware requirements 148
Software requirements 149
Hardware and software design 150
The gesture hardware architecture 150
The detailed hardware design 151
The software architecture 152
Constructing the gesture controller 155
The APDS-9960 theory of operation 155
Analyzing gesture data 158
The APDS-9960 gesture driver 162
The APDS-9960 gesture class constructor 163
The APDS-9960 gesture class detect method 166
The gesture controller applications 169
Testing the gesture controller 172
Summary 174
Questions 174
Further reading 174
Chapter 8: Automation and Control Using Android 175
Technical requirements 176
The sensor node project requirements 176
Hardware requirements 176
Software requirements 177
Hardware and software design 178
The hardware architecture 178
The software architecture 179
Building a sensor node 181
Installing MicroPython on the ESP32 181
Setting up the ESP32 flash utilities 182
Programming the ESP32 with MicroPython 182
Testing MicroPython with LEDs 184
Setting up WebREPL 185
Simplifying application development with Anaconda 188
Installing uasyncio 189
Writing the sensor node application 190
Imports and supporting objects 191
LEDs and local control 191
socket_connect() 192
socket_receive() 192
The IotDevice class 193
Command parsing 194
The system status task 196
socket_send() 196
The main application 197
Testing the sensor node 198
The Android socket server 198
Table of Contents
[ v ]
Commanding the sensor node 201
Testing the commands 202
Summary 203
Questions 203
Further reading 203
Chapter 9: Building an Object Detection Application Using Machine
Learning 204
Technical requirements 205
Introducing machine learning 205
The need for intelligent systems 207
Machine learning from the cloud to the edge 209
Object detection requirements 211
Hardware requirements 211
Software requirements 212
Object detection design and theory 213
The CIFAR-10 and CIFAR-100 datasets 214
Machine learning modeling languages 215
TFLu 216
CMSIS-NN 218
The hardware 218
Implementing and testing object detection on the OpenMV camera 219
Getting familiar with OpenMV IDE 219
Implementing a pretrained CIFAR-10 network 221
Person detection with a TensorFlow model 224
Summary 229
Questions 229
Further reading 230
References 230
Chapter 10: The Future of MicroPython 231
The advancing MicroPython 231
The pyboard D-series 232
The pyboard D-series hardware 233
The pyboard D-series software 238
Controlling the boot sequence 238
Recovering from system faults 239
MicroPython in the real world 241
Example DIY/maker projects 242
Example professional projects 242
The future of MicroPython 244
Going further 245
References 245
Appendix A: Downloading and Running MicroPython Code 246
Table of Contents
[ vi ]
Assessments 247
Other Books You May Enjoy 257
Index 260

标签:

实例下载地址

MicroPython Projects A do-it-yourself guide to building embedded applications in various domains using Python (Jacob Beningo)

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警