Skip to content

Commit 0d5c0d4

Browse files
committed
info
1 parent eb0979a commit 0d5c0d4

40 files changed

+144
-103
lines changed

README.md

Lines changed: 78 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,89 @@
1-
# raspberry_tutorial
2-
3-
全部程序在树莓派官方最新发布的Raspbian Buster(2020.2.13)系统调试通过,可运行在树莓派4B或3B+上。
4-
本人为树莓派应用一线软件工程师,原创的《树莓派Python应用教程》,全书26000字,都是本人一字一句敲进电脑的, 100%干货。
5-
全书提供近20个树莓派Python应用实例,都在入门到中级之间,非常适合想用Python在树莓派开发项目的工程师和学生参考学习。以下是全书目录:
6-
7-
第一章 树莓派系统搭建
8-
9-
1.1 树莓派市场分析
10-
11-
1.1.1 树莓派成功的关键
12-
13-
1.1.2 树莓派的竞争者
14-
15-
1.2 系统安装及更新
16-
17-
1.2.1 最新Buster系统下载及烧录
18-
19-
1.2.2 系统基本设置
20-
21-
1.2.3 系统更新
22-
23-
1.3 常用开发软件安装
24-
25-
1.3.1 安装Samba
26-
27-
1.3.2 树莓派SSH配置
28-
29-
1.3.3 树莓派的tty模式
30-
31-
1.3.4 安装Python解释器
32-
33-
1.4 树莓派的学习和使用
34-
35-
1.4.1 学习建议
36-
1+
# Microbit_getting_started_tutorial
2+
这本《树莓派编程实用教程》全书共31000字,提供近20个树莓派应用实例,都在入门到中级之间,非常适合想
3+
在树莓派开发项目的工程师和学生参考学习,涵盖了Python,Linux命令,C/C++,OpenCV,Darknet。全部程序
4+
在树莓派官方发布的32位Raspberry Pi OS(2021.10.30)系统调试通过,可运行在树莓派400个人电脑,4B或3B+上。以下是全书目录:
5+
第一章 树莓派系统搭建 6
6+
1.1 树莓派市场分析 6
7+
1.1.1 树莓派成功的关键 6
8+
1.1.2 树莓派的竞争者 7
9+
1.1.3 购买树莓派的建议 9
10+
1.2 系统安装及更新 11
11+
1.2.1 最新Raspberry Pi OS系统下载及烧录 11
12+
1.2.2 系统基本设置 16
13+
1.2.3 系统更新 19
14+
1.3 常用开发软件安装 22
15+
1.3.1 树莓派SSH配置 22
16+
1.3.2 树莓派的tty模式 24
17+
1.3.3 WinSCP 25
18+
1.3.4 安装Python解释器 26
19+
1.4 树莓派的学习和使用 28
20+
1.4.1 学习建议 28
3721
1.4.2树莓派的用途 30
22+
第二章 初探树莓派 32
23+
2.1 测评例程及性能比较 32
24+
2.2 使用Octane 2.0测评树莓派性能 34
25+
2.3 Linux学习使用初步 35
26+
第三章 海龟绘图 37
27+
3.1 画雪花 37
28+
3.2 画太极符号 38
29+
第四章 开发游戏 40
30+
4.1 简单RPG游戏 40
31+
4.2 贪吃蛇游戏 42
32+
4.3 3D迷宫游戏 43
33+
4.4 倒霉的Fred游戏 48
34+
第五章 数据传输 55
35+
5.1 简单的通信协议 55
36+
5.2 串口通信 55
37+
5.3 网络通信 61
38+
5.4 其他接口通信 62
39+
5.5 树莓派用作无线路由器 62
40+
第六章 Sense Hat应用 63
41+
6.1 树莓派的硬件生态——Hat 63
42+
6.2 Sense Hat介绍 64
43+
6.3 Sense Hat交通灯 65
44+
6.4 Sense Hat调色板 66
45+
6.5 Sense Hat乒乓游戏 68
46+
6.6 远程控制树莓派 71
47+
第七章 Sense Hat传感器 76
48+
7.1 显示板子方位 76
49+
7.2 保存方位数据到文件 77
50+
7.3 树莓派气象站 79
51+
7.4 加速度检测仪 80
52+
第八章 计算机视觉初步 85
53+
8.1 摄像头监控 85
54+
8.2 CMake及简要入门 86
55+
8.3 OpenCV的安装、验证和学习建议 92
56+
8.3.1 在树莓派安装OpenCV 92
57+
8.3.2 验证OpenCV的安装 93
58+
8.3.3 OpenCV的学习建议 95
59+
8.4 使用darknet做物体检测 96
60+
后记 101
61+
参考文献 102
62+
3863

39-
第二章 树莓派性能测评
40-
41-
2.1 测评例程及性能比较
42-
43-
2.2 使用Octane 2.0测评树莓派性能
44-
45-
第三章 海龟绘图
46-
47-
3.1 画雪花
48-
49-
3.2 画太极符号
50-
51-
第四章 开发游戏
52-
53-
4.1 简单RPG游戏
54-
55-
4.2 贪吃蛇游戏
56-
57-
4.3 3D迷宫游戏
58-
59-
4.4 倒霉的Fred游戏
60-
61-
第五章 数据传输
62-
63-
5.1 简单的通信协议
64-
65-
5.2 串口通信
66-
67-
5.3 网络通信
68-
69-
5.4 其他接口通信
70-
71-
5.5 树莓派用作无线路由器
72-
73-
第六章 Sense Hat应用
74-
75-
6.1 树莓派的硬件生态——Hat
76-
77-
6.2 Sense Hat介绍
78-
79-
6.3 Sense Hat交通灯
80-
81-
6.4 Sense Hat调色板
82-
83-
6.5 Sense Hat乒乓游戏
84-
85-
6.6 远程控制树莓派
86-
87-
第七章 Sense Hat传感器
88-
89-
7.1 显示板子方位
90-
91-
7.2 保存方位数据到文件
64+
以下贴几张程序运行的美图,同时也是教程的一部分:
9265

93-
7.3 树莓派气象站
66+
![image](https://github.com/wxlscm/raspberry_tutorial/blob/main/TutorialPrj/1.png)
67+
![image](https://github.com/wxlscm/raspberry_tutorial/blob/main/TutorialPrj/2.png)
68+
![image](https://github.com/wxlscm/raspberry_tutorial/blob/main/TutorialPrj/3.png)
69+
![image](https://github.com/wxlscm/raspberry_tutorial/blob/main/TutorialPrj/4.png)
70+
![image](https://github.com/wxlscm/raspberry_tutorial/blob/main/TutorialPrj/5.png)
9471

95-
7.4 加速度检测仪
72+
还有darknet在树莓派上的移植,做物体检测呢:
9673

97-
第八章 摄像头应用
74+
![image](https://github.com/wxlscm/raspberry_tutorial/blob/main/TutorialPrj/6.png)
9875

99-
8.1 摄像头监控
76+
本人在书中都会详细解说程序,如下图所示:
10077

101-
后记
78+
![image](https://github.com/wxlscm/raspberry_tutorial/blob/main/TutorialPrj/7.png)
79+
本人还教大家如何省钱买树莓派,选择了两款性价比最高的——树莓派400和PICO,可以省下几百块钱。
80+
![image](https://github.com/wxlscm/raspberry_tutorial/blob/main/TutorialPrj/8.png)
81+
全部资料简洁精炼,非常实用,全都是应用实例,很适合学习了一些python知识,急切想在树莓派上开发项目的
82+
工程师或学生使用。看了本教程,实际上相当于看了不少于10本书,很值得下载看看。另外,本人是工程师,
83+
希望能得到读者的反馈,如果你使用时出现兼容性问题,如:程序运行中出现错误,安装软件失败等问题,可以
84+
通过下面的微信联系我,本人争取在1天内回复。
85+
![image](https://github.com/wxlscm/raspberry_tutorial/blob/main/TutorialPrj/9.png)
10286

103-
参考文献
104-
105-
书上的全部源代码在TutorialPrj文件夹
10687

107-
本人在书中都会详细解说程序.此外,本人还配套非常好用和经典的参考资料和源代码,都是本人从各种途径找来,经过本人筛选的资料,它们都是本人的《树莓派Python应用教程》的参考文献,我会在书中把本人学习树莓派和Python语言的经验传授给大家。
108-
全部资料简洁精炼、实用,资料所有部分均经过本人筛选,只留下精华的部分,绝不塞入任何不必要或过时的内容,很适合学习了一些python知识,急切想在树莓派上开发项目的工程师或学生使用。
109-
下面是我的微信,大家乐意的话可以联系我跟我交流!!!
11088

11189

TutorialPrj/1.png

411 KB
Loading

TutorialPrj/2.png

196 KB
Loading

TutorialPrj/3.png

95 KB
Loading

TutorialPrj/4.png

250 KB
Loading

TutorialPrj/5.png

1.11 MB
Loading

TutorialPrj/6.png

704 KB
Loading

TutorialPrj/7.png

137 KB
Loading

TutorialPrj/8.png

497 KB
Loading

TutorialPrj/9.png

89.6 KB
Loading
-125 KB
Binary file not shown.

TutorialPrj/ch6_webControlSenseHat.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ def joystick_status():
2727

2828
def html_for_led(led):
2929
l = str(led)
30-
result = " <input type='button' onClick='changed(" + l + ")' value='LED "
31-
+ l + "'/>"
30+
result = " <input type='button' onClick='changed(" + l + ")' value='LED "+ l + "'/>"
3231
return result
3332

3433
def update_leds():
@@ -60,4 +59,4 @@ def index(led="n"):
6059
response += html_for_led(2)
6160
return response
6261

63-
run(host=host, port=80)
62+
run(host=host, port=80)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cmake_minimum_required (VERSION 3.0)
2+
cmake_policy(SET CMP0012 NEW)
3+
PROJECT(Ch2_1)
4+
5+
find_package(OpenCV REQUIRED)
6+
message(" opencv version: ${OpenCV_VERSION}")
7+
include_directories(${OpenCV_INCLUDE_DIRS}) # Not needed for CMake >= 2.8.11
8+
9+
ADD_EXECUTABLE( sample1 sample1.cpp )
10+
TARGET_LINK_LIBRARIES(sample1 ${OpenCV_LIBS})
11+
12+
13+
14+
15+
16+
17+
18+
19+
20+

TutorialPrj/ch8_test_OpenCV/lena.jpg

67.6 KB
Loading
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#include <iostream>
2+
#include <string>
3+
#include <sstream>
4+
using namespace std;
5+
6+
// OpenCV includes
7+
#include "opencv2/core.hpp"
8+
#include "opencv2/highgui.hpp"
9+
using namespace cv;
10+
11+
int main( int argc, const char** argv )
12+
{
13+
// Read images
14+
Mat color= imread("../lena.jpg");
15+
Mat gray= imread("../lena.jpg", IMREAD_GRAYSCALE);
16+
17+
if(! color.data ) // Check for invalid input
18+
{
19+
cout << "Could not open or find the image" << std::endl ;
20+
return -1;
21+
}
22+
23+
// Write images
24+
imwrite("lenaGray.jpg", gray);
25+
26+
// Get same pixel with opencv function
27+
int myRow=color.cols-1;
28+
int myCol=color.rows-1;
29+
auto pixel= color.at<Vec3b>(myRow, myCol);
30+
cout << "Pixel value (B,G,R): (" << (int)pixel[0] << "," << (int)pixel[1] << "," << (int)pixel[2] << ")" << endl;
31+
32+
// show images
33+
imshow("Lena BGR", color);
34+
imshow("Lena Gray", gray);
35+
// wait for any key press
36+
waitKey(0);
37+
return 0;
38+
}

TutorialPrj/darknet_202204/readme.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
请大家根据8.4节的步骤用git命令下载darknet。再把test_darknet.sh复制到darknet主目录下,最后运行程序。
2+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#./darknet detector test cfg/coco.data cfg/yolov3-tiny.cfg weights/yolov3-tiny.weights data/dog.jpg
2+
3+
./darknet detector test cfg/coco.data cfg/yolov3-tiny.cfg weights/yolov3-tiny.weights data/person.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.

必备软件/WinSCP-5.17.10-Setup.exe

10.6 MB
Binary file not shown.

必备软件/imager_1.6.2.exe

18.9 MB
Binary file not shown.
2.94 MB
Binary file not shown.

必备软件/putty.zip

-259 KB
Binary file not shown.

必备软件/注意.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
由于git限制,本文件夹删除了2021-10-30-raspios-bullseye-armhf.zip这个1.1G的大文件,大家可以下载最新的Raspberry PI OS
-4.46 MB
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
-1.47 MB
Binary file not shown.
4.23 MB
Binary file not shown.
Binary file not shown.

重要参考书/Sense Hat.zip

0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)