chao 6 mesiacov pred
commit
d346abdf8a
52 zmenil súbory, kde vykonal 3099 pridanie a 0 odobranie
  1. 0 0
      .nojekyll
  2. 3 0
      README.md
  3. 0 0
      _coverpage.md
  4. 18 0
      _sidebar.md
  5. 7 0
      copyCode.js
  6. 60 0
      countable.js
  7. 0 0
      docsify-sidebar-collapse.min.js
  8. 0 0
      docsify.min.js
  9. 134 0
      index.html
  10. 102 0
      index.md
  11. 0 0
      lightbox.min.css
  12. 353 0
      md/Basic.md
  13. 52 0
      md/CocoBlocklyPi.md
  14. 17 0
      md/_sidebar.md
  15. 632 0
      md/ai.md
  16. 410 0
      md/screen.md
  17. 99 0
      md/servo.md
  18. 158 0
      md/web.md
  19. BIN
      media/help-logo.png
  20. BIN
      media/loading.gif
  21. BIN
      media/top.png
  22. BIN
      media/開始使用CocoBlocklyPi/0d63beda-14dd-4b5f-9c96-e6e739b40cd1.png
  23. BIN
      media/開始使用CocoBlocklyPi/11906485-9faa-4c1c-ae7c-fb9ccb28aed4.png
  24. BIN
      media/開始使用CocoBlocklyPi/14dcb61f-b56e-417f-9cf7-92aea81154ba.png
  25. BIN
      media/開始使用CocoBlocklyPi/20769a43-916f-4567-a2bf-541a07ac2f09.png
  26. BIN
      media/開始使用CocoBlocklyPi/244f366e-762c-4eb5-9ce3-6ed309e94aa8.png
  27. BIN
      media/開始使用CocoBlocklyPi/2e9f53ef-d348-428a-b85c-34494b5cb9f3.png
  28. BIN
      media/開始使用CocoBlocklyPi/335f0dc6-f107-4aaf-9cab-27a3268f91c0.png
  29. BIN
      media/開始使用CocoBlocklyPi/417e343f-0f1a-477c-8217-93212756b6f0.png
  30. BIN
      media/開始使用CocoBlocklyPi/4ed26e1c-ec2e-4959-a05d-84f457b478cd.png
  31. BIN
      media/開始使用CocoBlocklyPi/4fb17a09-f319-4589-ba37-84918c9a76cf.png
  32. BIN
      media/開始使用CocoBlocklyPi/7b47688c-9158-4ae3-b4d5-9762b298db0c.png
  33. BIN
      media/開始使用CocoBlocklyPi/7db8f71e-c93e-4a76-a4b9-d5ac97554c66.png
  34. BIN
      media/開始使用CocoBlocklyPi/9c8eed93-75ae-45e6-b927-d085dd5b9f40.jpg
  35. BIN
      media/開始使用CocoBlocklyPi/b6ec532e-7c2a-4520-be87-eaeb71bc23df.png
  36. BIN
      media/開始使用CocoBlocklyPi/c7d09c56-c392-422a-93bf-848001103eb9.png
  37. BIN
      media/開始使用CocoBlocklyPi/d6e2f0a2-be34-4dd0-a855-e8e1216a84a7.png
  38. BIN
      media/開始使用CocoBlocklyPi/d7d631bd-2eaf-46ad-887f-e9060aa45936.png
  39. BIN
      media/開始使用CocoBlocklyPi/e02a4793-8a23-4039-8a04-13cc8567dd4d.png
  40. BIN
      media/開始使用CocoBlocklyPi/f539f95d-1d52-4517-83c3-6479c094533b.png
  41. BIN
      media/開始使用CocoBlocklyPi/f7da71ba-a9eb-47c9-8414-6f688629b2cf.png
  42. BIN
      media/開始使用CocoBlocklyPi/ff24a19d-b110-4585-a12f-341fcd699179.png
  43. BIN
      media/開始使用CocoBlocklyPi/login.png
  44. BIN
      media/開始使用CocoBlocklyPi/loginSuccess.png
  45. BIN
      media/開始使用CocoBlocklyPi/reg.png
  46. BIN
      media/開始使用CocoPi/hardware_1.jpg
  47. BIN
      media/開始使用CocoPi/hardware_2.jpg
  48. BIN
      media/開始使用CocoPi/hardware_3.jpg
  49. BIN
      media/開始使用CocoPi/hardware_4.jpg
  50. 0 0
      search.min.js
  51. 1054 0
      vue.css
  52. 0 0
      zoom-image.min.js

+ 0 - 0
.nojekyll


+ 3 - 0
README.md

@@ -0,0 +1,3 @@
+# Headline
+
+> An awesome project.

+ 0 - 0
_coverpage.md


+ 18 - 0
_sidebar.md

@@ -0,0 +1,18 @@
+- 关于CocoPi
+
+    - [硬件信息](index.md)
+	- [CocoBlockly Pi 编程平台简介](md/CocoBlocklyPi.md)
+
+- 基础功能
+
+	- [基础硬件](md/Basic.md)
+	- [扩展硬件](md/servo.md)
+    - [图形处理](md/screen.md)
+
+- 人工智能
+    - [人工智能](md/ai.md)
+
+- 物联网
+
+    - [物联网](md/web.md)
+

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 7 - 0
copyCode.js


+ 60 - 0
countable.js

@@ -0,0 +1,60 @@
+//default values
+var defaultOptions = {
+    countable: true,
+    position: "top",
+    margin: "10px",
+    float: "right",
+    fontsize: "0.9em",
+    color: "rgb(90,90,90)",
+    language: "english",
+    isExpected: true,
+}
+
+// Docsify plugin functions
+function plugin(hook, vm) {
+    if (!defaultOptions.countable) {
+        return
+    }
+    let wordsCount
+    hook.beforeEach(function (content) {
+        // Match regex every time you start parsing .md
+        wordsCount = content.match(/([\u4e00-\u9fa5]+?|[a-zA-Z0-9]+)/g).length
+        return content
+    })
+    hook.afterEach(function (html, next) {
+        let str = wordsCount + " words"
+        let readTime = Math.ceil(wordsCount / 400) + " min"
+        //Determine whether to use the Chinese style according to the attribute "language"
+        if (defaultOptions.language === "chinese") {
+            str = wordsCount + " 字"
+            readTime = Math.ceil(wordsCount / 400) + " 分钟"
+        }
+
+        //add html string
+        next(
+            `
+        ${defaultOptions.position === "bottom" ? html : ""}
+        <div style="margin-${defaultOptions.position ? "bottom" : "top"}: ${
+                defaultOptions.margin
+            };">
+            <span style="
+                  float: ${defaultOptions.float === "right" ? "right" : "left"};
+                  font-size: ${defaultOptions.fontsize};
+                  color:${defaultOptions.color};">
+            ${str}
+            ${defaultOptions.isExpected ? `&nbsp; | &nbsp;${readTime}` : ""}
+            </span>
+            <div style="clear: both"></div>
+        </div>
+        ${defaultOptions.position !== "bottom" ? html : ""}
+        `
+        )
+    })
+}
+
+// Docsify plugin options
+window.$docsify["count"] = Object.assign(
+    defaultOptions,
+    window.$docsify["count"]
+)
+window.$docsify.plugins = [].concat(plugin, window.$docsify.plugins)

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
docsify-sidebar-collapse.min.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
docsify.min.js


+ 134 - 0
index.html

@@ -0,0 +1,134 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+  <meta charset="UTF-8">
+  <title>CocoBlockly Pi 帮助文档</title>
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+  <meta name="description" content="Description">
+  <meta name="viewport"
+    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+  <!--<link rel="stylesheet" href="https://unpkg.com/docsify-themeable/dist/css/theme-simple.css">-->
+  <link rel="stylesheet" href="vue.css">
+  <meta name="theme-color" content="#2C4FCD">
+  <link rel="apple-touch-icon" sizes="57x57" href="https://cocorobo.cn/cocoblockly/dev/img/apple-icon-57x57.png">
+  <link rel="apple-touch-icon" sizes="60x60" href="https://cocorobo.cn/cocoblockly/dev/img/apple-icon-60x60.png">
+  <link rel="apple-touch-icon" sizes="72x72" href="https://cocorobo.cn/cocoblockly/dev/img/apple-icon-72x72.png">
+  <link rel="apple-touch-icon" sizes="76x76" href="https://cocorobo.cn/cocoblockly/dev/img/apple-icon-76x76.png">
+  <link rel="apple-touch-icon" sizes="114x114" href="https://cocorobo.cn/cocoblockly/dev/img/apple-icon-114x114.png">
+  <link rel="apple-touch-icon" sizes="120x120" href="https://cocorobo.cn/cocoblockly/dev/img/apple-icon-120x120.png">
+  <link rel="apple-touch-icon" sizes="144x144" href="https://cocorobo.cn/cocoblockly/dev/img/apple-icon-144x144.png">
+  <link rel="apple-touch-icon" sizes="152x152" href="https://cocorobo.cn/cocoblockly/dev/img/apple-icon-152x152.png">
+  <link rel="apple-touch-icon" sizes="180x180" href="https://cocorobo.cn/cocoblockly/dev/img/apple-icon-180x180.png">
+  <link rel="icon" type="image/png" sizes="192x192"
+    href="https://cocorobo.cn/cocoblockly/dev/img/android-icon-192x192.png">
+  <link rel="icon" type="image/png" sizes="32x32" href="https://cocorobo.cn/cocoblockly/dev/img/favicon-32x32.png">
+  <link rel="icon" type="image/png" sizes="96x96" href="https://cocorobo.cn/cocoblockly/dev/img/favicon-96x96.png">
+  <link rel="icon" type="image/png" sizes="16x16" href="https://cocorobo.cn/cocoblockly/dev/img/favicon-16x16.png">
+  <!-- <link rel="manifest" href="https://cocorobo.cn/cocoblockly/dev/img/manifest.json"> -->
+  <meta name="msapplication-TileColor" content="#ffffff">
+  <meta name="msapplication-TileImage" content="https://cocorobo.cn/cocoblockly/dev/img/ms-icon-144x144.png">
+  <!-- <script type="text/javascript" src="colorpicker.js"></script> -->
+
+  <link href="./lightbox.min.css" rel="stylesheet" />
+  <style type="text/css">
+    #picker {
+      width: 200px;
+      height: 200px
+    }
+
+    #slide {
+      width: 30px;
+      height: 200px
+    }
+
+    .headerInProgress {
+      font-weight: bold;
+      background-color: rgba(247, 114, 16, .9);
+      color: white;
+      padding: 16px 18px;
+      margin-bottom: 40px;
+      border-radius: 10px;
+      border-left: 5px solid rgba(238, 91, 10, 1.0);
+    }
+  </style>
+</head>
+
+<body>
+  <!-- <nav>cocorobo</nav> -->
+  <a href=""></a>
+  <div class="loading_div" id="loading_div">
+    <img src="./media/loading.gif" alt="">
+  </div>
+  <div id="app">Please wait...</div>
+  <script>
+    window.$docsify = {
+      name: 'CocoBlockly X Help',
+      // repo: '',
+      logo: '/media/help-logo.png',
+      themeColor: '#225dd5',
+      homepage: 'index.md',
+      search: {
+        maxAge: 86400000, // Expiration time, the default one day
+        paths: 'auto', // or 'auto'
+        placeholder: '点击此处搜寻内容',
+
+        // Localization
+        placeholder: {
+          '/': '点此处搜寻内容'
+        },
+
+        noData: '沒有搜寻到结果',
+
+        // Localization
+        noData: {
+          '/': '沒有搜寻到结果'
+        },
+
+        // Headline depth, 1 - 6
+        depth: 6
+      },
+      ga: 'UA-110081781-1',
+      count: {
+        countable: true,
+        fontsize: '0.9em',
+        color: 'rgb(90,90,90)',
+        language: 'chinese'
+      },
+      auto2top: true,
+      coverpage: true,
+      loadSidebar: true,// 加载侧边栏
+      subMaxLevel: 2,
+      // maxLevel: 4,
+      plugins: [
+        function (hook, vm) {
+          hook.doneEach(function () {
+            // 每次路由切换时数据全部加载完成后调用,没有参数。
+            // ...
+            document.getElementById('loading_div').classList.remove('hidden');
+            let imgList = document.getElementsByTagName('img')
+            let count = 0
+            for (let i = 0; i <= imgList.length - 1; i++) {
+              let num = imgList[i].onload = function () {
+                return i;
+              }
+              count = num()
+            }
+            if (count === imgList.length - 1) {
+              document.getElementById('loading_div').classList.add('hidden');
+            }
+          });
+        }
+      ]
+    }
+  </script>
+  <!-- Docsify v4 -->
+</body>
+
+</html>
+<style src="./docsify-sidebar-collapse.min.js"></style>
+<script src="./docsify.min.js"></script>
+<script src="./search.min.js"></script>
+<script src="./zoom-image.min.js"></script>
+<script src="./copyCode.js"></script>
+<script src="./countable.js"></script>

+ 102 - 0
index.md

@@ -0,0 +1,102 @@
+# 关于CocoPi
+CocoPi是CocoRobo开发的一款集成了多种传感器和功能的掌上计算器,可用于AloT教学、开发和实验。
+它运行Linux系统,支持Python和图形化编程。</br>
+CocoPi搭载All Winners V831系列芯片,包含单核ARM Cortex-A7处理器和64MB DDR2芯片,芯片集成了H.264/H.265视频编码器和图像处理算法,能够提供高效的视频编码和专业的图像效果。
+
+
+## 硬件性能参数
+
+| No.	|           内容             |  具体参数                |
+| ----  | ------------------------  | ------------------------ |
+|   1	|          CPU 	     |  Allwinner V831, ARM CortexTM-A7,800Mhz  |
+|   2   |       DRAM	         |  SIP (System in Package) 64MB DDR2  |
+|   3	|     NPU	     | 0.2TOPS,算子支持:Conv, Activation, Pooling, BN, LRN, FC/Inner Product  |
+|   4	|   存储	  |  SD卡(最高128GB,预设16GB)  |
+|   5	|   启动引导	|  SD卡  |
+|   6	| 操作系统	|  Maix-Linux |
+|   7	|  Python版本  |  Python3.8.5  |
+|   8	|  图像输入  |	一路MIPI CSI ,最高支持1080P@60fps (RAW格式),默认连接200W像素摄像头  |
+|   9	|  视频输出  |	1-路RGB 输出,最高支持QVGA@60fps   |
+|   10	|  音频  |	集成音频编解码器,支持20位音频输入输出; 扬声器功率1W。  |
+|   11	|  网络连接  |	2.4Ghz WIFI,最大稳定通信距离20m(非复杂电磁环境下开阔室内测量结果)   |
+|   12	|  工作电压  |	 5V直流输入(通过USB口) 7V~12V直流输入(通过电源输入端子)  |
+|   13	|  最大功率  |	5V直流输入(通过USB口)  |
+|   14	|  板载外设  |	1个内置RTC <br/> 1路IIC接口、1路UART接口、1路SPI接口 <br/> 1路USB-OTGType-C接口、1路USB-A 2.0接口 <br/> 4路GPIO接口 <br/> 2个PWM控制器(8通道)、2个直流电机 <br/> 1个温湿度传感器、1个三轴陀螺仪+三轴加速度计、1个麦克风、一个光敏传感器、一个200W像素摄像头、4个按键 <br/> 1个扬声器、一个2.8英寸RGB屏幕、1个RGB灯 <br/> 1个RESET    |
+
+
+## 硬件主要部件
+
+<div style="width:100%;text-align:center;margin-bottom:20px;">
+    <img src="media\開始使用CocoPi\hardware_1.jpg" width="500"><br/>
+</div>
+
+<div style="width:100%;text-align:center;margin-bottom:20px;">
+    <img src="media\開始使用CocoPi\hardware_2.jpg" width="500"><br/>
+</div>
+
+| No.	|           部件名称             |  部件描述                |
+| ----  | ------------------------  | ------------------------ |
+|     1/2/3/4	     |  按键开关  |  A/B/C/D号按键开关(详见硬件标注)。 |
+|       5	         |  扬声器  |  “喇叭”,是一种把电信号转变为声信号的换能器件。 |
+|     6	     | RESET按键  | 按下此按钮控制硬件重新启动。 |
+|   7	  |  电机驱动芯片  | 用于驱动电机。 |
+|   8	|  相机  | 可切换广角/定焦摄像头安装,用于获取图像。|
+| 9	|  核心处理器 | 硬件的核心处理器,具体参数见“硬件性能参数”。|
+|  10  |	Wi-Fi芯片  | 集成Wi-Fi功能的控制器。|
+|  11  |	Wi-Fi天线  | 用于增强硬件无线传输信号。|
+|  12  |	光照传感器   | 内置光敏电阻,用于监测周边环境的光照强度。|
+|  13  |	温湿度传感器 | 用于监测周边环境的温度(摄氏)和湿度数据。|
+|  14  |	运动传感器(陀螺仪)   | 用于检测硬件的空间运动。|
+|  15  |	 麦克风 | 采集环境音频数据。|
+|  16  |	RGB灯  | 全彩LED灯,通过程序控制显示。|
+|  17  |	屏幕    | 全彩IPS液晶显示器,尺寸为2.8英寸。|
+
+
+## 硬件主要接口
+
+### 接口简介
+
+<div style="width:100%;text-align:center;margin-bottom:20px;">
+    <img src="media\開始使用CocoPi\hardware_3.jpg" width="500"><br/>
+</div>
+
+| No.	|           接口名称             |   接口描述                |
+| ----  | ------------------------  | ------------------------ |
+|      1	 |  Type C数据接口  |  通过Type C数据线实现与PC端通信。 |
+|      2	 |  Micro SD卡槽  |  用于连接Micro SD存储卡,存储媒体、程序文件、机器学习模型等数据。 |
+|     3/6	 | 舵机接口  | 用于接入舵机或传感器使用,可以获取传感器输入的数字信号。 |
+|     4/5	 |  电机接口  | 用于接入直流电机使用。 |
+|      7	 |  USB数据接口  | 通过USB数据线连接外接设备,如鼠标、显示器等。 |
+|      8	 |  POWER电源接口 | 通过外接电源进行硬件供电。 |
+|      9     |	GPIO接口  | 通用输入/输出接口,用于连接外部传感器作为输入/输出。|
+|      10    |	SPI通信接口  | 串行外设接口,典型应用有闪存、EEPROM、SD卡与液晶显示器。 |
+|      11    |	UART串口通信接口   | 通用异步收发传输器,主要用于CocoPi与其他硬件进行数据传输。 |
+|      12    |	IIC通信接口 |  串列通讯总线,主要应用在构造简单且可以牺牲传输速度来降低制造成本的外部设备上。 |
+
+### 接口编号
+
+ADC模式:用于接类比量传感器,输入输入范围:0~1023.常见ADC传感器:旋钮、摇杆滑块、红外巡线传感器、光敏电阻传感器、音量检测传感器、土壤湿度传感器模拟温度传感器等。
+
+G PIO模式:在输入模式下,可以用于连接按钮、红外避障传感器、行程开关、倾斜传感器等;在输出模式下,可以用来点灯、控制电磁继电器、控制蜂鸣器等。
+
+PWM模式:引脚可以用来输出PWM波,进行诸如呼吸灯、小风扇电机转速控制等。
+通用异步收发设备模式:模组可以用于连接第三方设备或者传感器进行串口通讯,如Arduino、Micro: bit、树莓派、ESP32等第三方设备。
+
+SPI模式:模组可以连接第三方设备或者传感器进行SPI通讯,此外很多小屏幕是基于SPI进行通讯。
+
+IIC模式:模组可以连接第三方设备可者传感器进行IIC通讯,如连接PCA9685进行电机、舵机扩展控制、连接颜色传感器、人体红外传感器、磁力计等。
+
+注意:所有GPIO的电压域为0V~3V3,输入电压不能超运以免造成引脚损坏甚至芯片损坏3V3。
+
+
+### 接口连接
+
+<div style="width:100%;text-align:center;margin-bottom:20px;">
+    <img src="media\開始使用CocoPi\hardware_4.jpg" width="500"><br/>
+</div>
+
+PH2.0 3P转母头杜邦线:用于S1/S2接口转接
+
+SH1.0 6P转母头杜邦线:用于GPIO接口/SPI通讯接口转接
+
+SH1.0 4P转母头杜邦线:用于UART串口通讯接口/IIC通讯接口转接

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
lightbox.min.css


+ 353 - 0
md/Basic.md

@@ -0,0 +1,353 @@
+# 基础功能
+硬件基础功能
+
+## 按键
+
+``` python
+from Cocopi import BUTTON
+```
+
+### 初始化
+
+``` python
+BUTTON(gpioid)
+```
+
+### 参数说明
+| 参数 | 值 |描述 |
+| :--- | :--- | :--- |
+| gpioid | 数字 | 按键对应的引脚,必填,按键A引脚为14,按键B引脚为8,按键C引脚为13,按键D引脚为7。 |
+
+会返回一个BUTTON,后续的操作都是BUTTON对象的操作
+
+### 判断是否按下
+
+``` python
+BUTTON.is_pressed()
+```
+
+### 样例
+
+``` python
+from CocoPi import BUTTON
+
+key_A = BUTTON(14)
+key_B = BUTTON(8)
+key_C = BUTTON(13)
+key_D = BUTTON(7)
+
+while True:
+    time.sleep(1)
+    if key_A.is_pressed():
+        print('A被按下')
+    elif key_B.is_pressed():
+        print('B被按下')
+    elif key_C.is_pressed():
+        print('C被按下')
+    elif key_D.is_pressed():
+        print('D被按下')
+    else:
+        print("没有按键被按下")
+```
+
+## 温湿度
+
+```python
+from CocoPi import AHT20
+```
+
+### 初始化
+
+```python
+AHT20()
+```
+
+### 获取温度
+
+```python
+get_temperature()
+```
+
+### 获取湿度
+
+```python
+get_humidity()
+```
+
+### 样例
+
+```python
+from CocoPi import AHT20
+
+tah = AHT20() # 初始化
+while True:
+    print(tah.get_temperature()) # 获取温度
+    print(tah.get_humidity()) # 获取湿度
+    time.sleep(1)
+```
+## 光照
+
+```python
+from CocoPi import LIGHTINTENSITY
+```
+
+### 初始化
+
+```python
+LIGHTINTENSITY()
+```
+
+### 获取光照强度
+
+```python
+value()
+```
+
+### 样例
+
+```python
+from CocoPi import LIGHTINTENSITY
+
+light = LIGHTINTENSITY() # 初始化
+while True:
+    print(light.value()) # 获取光照强度
+    time.sleep(1)
+```
+## 陀螺仪
+
+```python
+from cocopiPython import Gyroscope
+```
+
+### 初始化
+
+```python
+Gyroscope()
+```
+
+### 获取加速度
+
+```python
+get_acceleration(axis)
+```
+
+### 参数说明
+
+| 参数 | 值 |描述 |
+| :--- | :--- | :--- |
+| axis | 字符串 | 表示三维空间中的方向,必填,"x"表示X轴,"y"表示Y轴,"z"表示Z轴。 |
+
+
+### 获取倾斜角度
+
+```python
+get_tiltangle(axis)
+```
+
+### 参数说明
+
+| 参数 | 值 |描述 |
+| :--- | :--- | :--- |
+| axis | 字符串 | 转动的方向,必填,"x"表示X轴,"y"表示Y轴。 |
+
+### 样例
+
+```python
+from cocopiPython import Gyroscope
+import time
+
+Gyroscope = Gyroscope()
+while True:
+    print("加速度X:"+str(Gyroscope.getAcceleration("x")))
+    print("加速度Y:"+str(Gyroscope.getAcceleration("y")))
+    print("加速度Z:"+str(Gyroscope.getAcceleration("z")))
+    print("倾斜角度X:"+str(Gyroscope.getAngularVelocity("x")))
+    print("倾斜角度Y:"+str(Gyroscope.getAngularVelocity("y")))
+    time.sleep(1)
+```
+## 板载LED灯
+
+``` python
+from CocoPi import LED
+```
+
+### 初始化
+
+``` python
+LED = LED()
+```
+
+### 开关控制
+
+``` python
+LED.out(vaule)
+```
+
+### 参数说明
+| 参数 | 值 |描述 |
+| :--- | :--- | :--- |
+| value | 数字 | 点亮和熄灭控制,必填,1表示点亮,0表示熄灭。 |
+
+
+
+### 样例
+
+``` python
+from CocoPi import LED
+import time
+
+LED = LED() # 初始化
+while True:
+    LED.out(1) # 点亮
+    time.sleep(1)
+    LED.out(0) # 熄灭
+    time.sleep(1)
+```
+## 录音
+
+```python
+from cocopiPython import Record
+```
+
+### 初始化
+
+```python
+Record()
+```
+
+### 开始录制
+
+```python
+start(time,path = "/root/user/audio/record.wav")
+```
+
+### 参数说明
+|参数|值|描述|
+|:---|:---|:---|
+|time|整数|录制时间,必填|
+|path|字符串|保存路径,选填,默认为/root/user/audio/record.wav|
+
+### 停止录制
+
+```python
+stop()
+```
+
+### 样例
+
+```python
+from cocopiPython import Record
+
+Record = Record() # 录制初始化
+
+print("录音开始")
+
+Record.start(4) # 开始录制
+
+print("录音结束")
+```
+
+## 音频播放
+
+```python
+from cocopiPython import AudioPlay
+```
+
+### 初始化
+
+```python
+AudioPlay()
+```
+
+### 读取文件
+
+```python
+play_file(path)
+```
+
+### 参数说明
+|参数|值|描述|
+|:---|:---|:---|
+|path|字符串|保存路径,选填,默认为/root/user/audio/record.wav|
+
+### 设置音量
+
+```python
+setVolume(volume)
+```
+
+### 参数说明
+|参数|值|描述|
+|:---|:---|:---|
+|volume|整数|音量,0~100,必填|
+
+### 开始播放
+
+```python
+play()
+```
+
+### 结束播放
+
+```python
+stop()
+```
+
+### 样例
+
+```python
+from cocopiPython import AudioPlay
+
+audio = AudioPlay() # 播放初始化
+audio.setVolume(100) # 设置音量
+audio.play_file("/root/user/audio/record.wav") # 音频文件
+while True:
+    audio.play() # 播放
+```
+## 视频播放
+
+```python
+from cocopiPython import VideoPlay
+```
+
+### 初始化
+
+```python
+VideoPlay()
+```
+
+### 读获取视频文件
+
+```python
+setVideoPath(path)
+```
+
+### 参数说明
+|参数|值|描述|
+|:---|:---|:---|
+|path|字符串|保存路径,必填|
+
+### 播放帧
+
+```python
+start(i)
+```
+
+### 参数说明
+|参数|值|描述|
+|:---|:---|:---|
+|i|视频帧|视频文件的视频帧,必填|
+
+
+### 样例
+
+```python
+from cocopiPython import VideoPlay
+
+video = VideoPlay()
+while True:
+    print("start")
+    for i in video.setVideoPath("/root/preset/video/output_240_240.mp4"):
+        video.start(i)
+    print("end")
+```

+ 52 - 0
md/CocoBlocklyPi.md

@@ -0,0 +1,52 @@
+
+# 平台简介
+CocoBlockly Pi是用于"CocoPi"硬件程序设计平台,可支持图形化与Python代码式两种程序设计环境。
+
+1.编程设计网站:<a href="https://pi.cocorobo.cn/python/" target="_blank">pi.cocorobo.cn</a>
+
+<img src="../media/開始使用CocoBlocklyPi/417e343f-0f1a-477c-8217-93212756b6f0.png" width="750"/>
+
+
+| 序号	|           内容             |  具体参数                |
+| ----  | ------------------------  | ------------------------ |
+|  ①	|          程序设计区 	     |  在此区域中以进行代码程序设计。  |
+|  ②	|          文件存储区 	     |  程序命名、保存(程序保存为.py文件)、删除所有代码。  |
+|  ③	|          辅助区 	     |  样例加载、学习资料、专案档导入及导出、语言设置以及用户登入其中,"学习"按钮可以跳转至EDU或者AIHUB学习平台。  |
+|  ④	|          交互区 	     |  - 终端交互区:当用户想通过shell命令和模组交互时可在此区域输入命令或者查看对应显示。<br/>- 串口数据显示区:用于串行通讯的调试和数据监测。  |
+|  ⑤	|          上传区 	     |  用户可选择运行程序或者上传程序以及进行重启、关机等操作。<br/> - “运行”按钮:单次运行程序;- “上传”按钮:上传程序到模组中,之后可重复执行;<br/>- “停止”按钮:程序运行中,可以中止运行并返回主菜单;<br/>- “重启设备”按钮: 重新启动硬件,与物理复位一样的效果;<br/>- "关机"按钮:如果需要插拔数据线,需要首先点击"关机"按钮,等待5秒后再拔出数据线,因为CocoPi底层运行的是Linux操作系统,类似微型电脑,如果突然断电,有可能会造成系统档损坏,影响设备的运行;<br/>- “断开连接”按钮:断开CocoPi与电脑的连接,CocoPi内置Shell将无法通过终端交互窗口控制。  |
+
+
+## 设备连接与上传
+
+### 设备连接
+<img src="../media/開始使用CocoBlocklyPi/f539f95d-1d52-4517-83c3-6479c094533b.png" width="750"/>
+
+| 序号	|           描述             |
+| ----  | ------------------------  |
+|  ①	|          点击【添加】按钮,将CocoPi硬件以有线方式与电脑连接。 	     |
+|  ②	|          在弹出的弹窗中选择[来自"Google Inc"提供的未知设备]。 	     |
+|  ③	|          点击弹窗中的【连接】按钮,完成设备添加。 	     |
+|  ④	|          点击【连接设备】按钮,“有线上传”旁的图标显示为绿色对号时,表示硬件已成功连接。 	
+
+
+### 程序上传
+
+<img src="../media/開始使用CocoBlocklyPi/f539f95d-1d52-4517-83c3-6479c094533b.png" width="750"/>
+
+当设备通过“有线上传”方式与电脑成功连接,页面右侧将自动跳转到终端交互窗,并且右小角【运行】、【上传】、【重启设备】、【关机】【断开连接】等按钮变蓝表示模组连接成功。上传区接口显示“设备已连接,可以运行程序”即可“运行”或“上传”设计完成的程序。
+
+## 帐户注册
+
+注册并登录CocoRobo帐户后,可以使用CocoBlockly Pi平台的更多功能。
+
+1.单击右上角【登入】按钮,在弹出的登录窗口单击【注册】,或选择第三方登录,直接使用微信登录。
+
+<div style="width:100%;text-align:center;margin-bottom:20px;display:flex;justify-content: space-between;">
+ <img src="../media/開始使用CocoBlocklyPi/f7da71ba-a9eb-47c9-8414-6f688629b2cf.png"><br>
+</div>
+
+2.进入注册接口后,输入电子邮箱、密码及学校名称(可不填)后,单击【注册】。
+
+<div style="width:100%;text-align:center;margin-bottom:20px;display:flex;justify-content: space-between;">
+ <img src="../media/開始使用CocoBlocklyPi/7db8f71e-c93e-4a76-a4b9-d5ac97554c66.png" ><br>\
+</div>

+ 17 - 0
md/_sidebar.md

@@ -0,0 +1,17 @@
+- 关于CocoPi
+
+    - [硬件信息](index.md)
+	- [CocoBlockly Pi 编程平台简介](md/CocoBlocklyPi.md)
+
+- 基础功能
+
+	- [基础硬件](md/Basic.md)
+    - [扩展硬件](md/servo.md)
+    - [图形处理](md/screen.md)
+
+- 人工智能
+    - [人工智能](md/ai.md)
+
+- 物联网
+
+	- [物联网](md/web.md)

+ 632 - 0
md/ai.md

@@ -0,0 +1,632 @@
+# 人工智能
+
+## 自定义模型识别
+
+```python
+from AI import CustomModel
+```
+
+### 模型初始化
+```python
+CustomModel(labels,path)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| labels | list | 标签列表,必填 |
+| path | str | 模型路径,必填 |
+
+### 加载识别
+```python
+loadModel(img)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| img | image.Image() | 要识别的Image对象,必填 |
+
+### 样例
+```python
+from cocopiPython import cameraPython,Screen
+from AI import CustomModel
+
+Screen = Screen() # 画布初始化
+camera = cameraPython() # 摄像头初始化
+
+labels = ["loadModel", "unload", "left", "right", "forward", "stop"] # 标签
+path = "/root/preset/model/autologistics" # 模型路径
+CustomModel = CustomModel(labels,path) # 初始化模型
+
+while True:
+    canvas = camera.capture() # 获取摄像头图像
+    canvas = canvas.crop(48,8,224,224) # 裁剪图像为224*224
+    data = CustomModel.loadModel(canvas) # 加载模型进行识别
+    for i in data:
+        canvas.draw_rectangle(i["X"],i["Y"],i["X"]+i["W"],i["Y"]+i["H"],color=(255,0,0),thickness=1) # 在屏幕绘制检测框
+        canvas.draw_string(i["X"],i["Y"]-20,(str(i["name"])+":"+str(i["score"])),color=(255,0,0)) # 在屏幕上绘制名称与置信度
+    Screen.show(canvas,48,8) # 显示画布
+```
+其中i["X"]表示识别结果的检测框起点X轴坐标,i["Y"]表示识别结果的检测框起点Y轴坐标,i["W"]表示识别结果的检测框宽度,i["H"]表示识别结果的检测框高度,i["name"]表示识别结果的名称,i["score"]表示识别结果的置信度,i["middleX"]表示识别结果的检测框中心点的X轴坐标,i["middleY"]表示识别结果的检测框中心点的Y轴坐标。
+
+## 边缘检测
+
+```python
+from AI import EdgeDetection
+```
+
+### 模型初始化
+```python
+EdgeDetection()
+```
+
+### 加载识别
+```python
+loadModel(img)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| img | image.Image() | 要识别的Image对象,必填 |
+
+### 样例
+```python
+from cocopiPython import cameraPython,Screen
+from AI import EdgeDetection
+
+Screen = Screen() # 画布初始化
+camera = cameraPython() # 摄像头初始化
+EdgeDetection = EdgeDetection() # 初始化
+
+while True:
+    img = camera.capture() # 获取摄像头数据
+    img = img.crop(48,8,224,224) # 裁剪尺寸为224*224
+    canvas = EdgeDetection.loadModel(img) # 加载模型
+    Screen.show(canvas,48,8) # 显示画布
+```
+
+## 人脸检测
+
+```python
+from AI import Facedetection
+```
+
+### 模型初始化
+```python
+Facedetection()
+```
+
+### 加载识别
+```python
+loadModel(img)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| img | image.Image() | 要识别的Image对象,必填 |
+
+### 样例
+```python
+from cocopiPython import cameraPython,Screen
+from AI import Facedetection
+
+Screen = Screen() # 画布初始化
+camera = cameraPython() # 摄像头初始化
+face = Facedetection() # 人脸检测初始化
+
+while True:
+    canvas = camera.capture() # 获取摄像头图像
+    canvas = canvas.crop(48,8,224,224) # 裁剪图像尺寸
+    data = face.loadModel(canvas) # 加载人脸检测模型
+    for i in data:
+        canvas.draw_rectangle(i["X"],i["Y"],i["X"]+i["W"],i["Y"]+i["H"],color=(255,0,0), thickness=1) # 在屏幕上绘制人脸检测框
+        canvas.draw_string(5,5,str(len(data)), scale = 1, color = (255,255,255) , thickness = 1) # 在屏幕上显示人脸数量
+    Screen.show(canvas,48,8) # 显示画布
+```
+
+## 人脸识别
+
+```python
+from AI import FaceRecognition
+```
+
+### 模型初始化
+```python
+FaceRecognition()
+```
+
+### 加载模型
+加载人脸检测模型,获取人脸信息
+```python
+loadmodel(img)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| img | image.Image() | 要识别的Image对象,必填 |
+
+### 添加人脸
+录入人脸信息保存到本地
+```python
+add(name,feature,dataPath)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| name | str | 识别到的人脸名称,必填 |
+| feature | list | 人脸数据,必填 |
+| dataPath | str | 保存路径,选填,默认为"/root/user/model/recorded_face_features.py" |
+
+### 删除人脸
+删除本地保存的最后一条人脸数据
+```python
+remove(name,dataPath)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| name | str | 要删除的人脸名称,必填 |
+| dataPath | str | 保存路径,选填,默认为"/root/user/model/recorded_face_features.py" |
+
+### 加载人脸信息
+加载人脸采集时保存到本地的人脸信息数据
+```python
+loadface(DataPath)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| dataPath | str | 保存路径,选填,默认为"/root/user/model/recorded_face_features.py" |
+
+### 样例
+#### 人脸采集
+```python
+import time
+from cocopiPython import cameraPython,Screen
+from AI import FaceRecognition
+from CocoPi import BUTTON
+
+# 按钮初始化
+key_C = BUTTON(13)
+key_D = BUTTON(7)
+
+Screen = Screen()
+camera = cameraPython()
+
+FaceRecognition = FaceRecognition()
+People_list = ["小明","小红","小刚","小花"]
+
+FaceNum = 0
+faceScore = 0
+color = (255,0,0)
+
+while True:
+    canvas = camera.capture() # 获取摄像头数据
+    canvas = canvas.crop(48,8,224,224) # 裁剪图片尺寸
+    data = FaceRecognition.loadmodel(canvas) # 加载人脸检测模型
+    for i in data:
+        canvas.draw_rectangle(i["X"],i["Y"],i["X"]+i["W"],i["Y"]+i["H"],color=color,thickness=1) # 检测框
+        if key_C.is_pressed() and FaceNum < len(People_list):
+            while not key_C.is_pressed()== False:
+                time.sleep(0.01)
+            FaceRecognition.add(People_list[len(FaceRecognition)],i["feature"]) # 录入人脸保存
+            canvas.draw_rectangle(0,0,320,20,color=(0,0,0),thickness=-1)
+            canvas.draw_string(0,0,"已采集"+str(People_list[FaceNum])+"人脸数据",scale=1,color=(255,255,255),thickness=1)
+            Screen.show(canvas,48,8)
+            FaceNum = FaceNum + 1
+            time.sleep(1)
+    if key_D.is_pressed() and FaceNum > 0:
+        while not key_D.is_pressed()== False:
+            time.sleep(0.01)
+        FaceRecognition.remove(People_list[len(FaceRecognition)-1]) # 删除人脸
+        canvas.draw_rectangle(0,0,320,20,color=(0,0,0),thickness=-1)
+        canvas.draw_string(0,0,"已删除"+str(People_list[FaceNum-1])+"人脸数据",scale=1,color=(255,255,255),thickness=1)
+        Screen.show(canvas,48,8)
+        FaceNum = FaceNum - 1
+        time.sleep(1)
+    Screen.show(canvas,48,8)
+```
+
+#### 人脸识别
+```python
+from cocopiPython import cameraPython,Screen
+from AI import FaceRecognition
+
+Screen = Screen()
+camera = cameraPython()
+FaceRecognition = FaceRecognition()
+
+faceScore = 0
+color = (255,0,0)
+    
+while True:
+    canvas = camera.capture() # 获取摄像头数据
+    canvas = canvas.crop(48,8,224,224) # 裁剪图片尺寸
+    data = FaceRecognition.loadmodel(canvas) # 加载人脸检测模型
+    FaceRecognition.loadface()
+    for i in data:
+        faceScore = round(i["recognizeScore"],2)
+        canvas.draw_rectangle(i["X"],i["Y"],i["X"]+i["W"],i["Y"]+i["H"],color=color,thickness=1) # 检测框
+        canvas.draw_string(i["X"],i["Y"],str(i["name"])+":"+str(faceScore),scale=1,color=color,thickness=1)
+        if faceScore > 80:
+            color = (0,255,0)
+        else:
+            color = (255,0,0)
+    Screen.show(canvas,48,8)
+```
+
+#### 人脸识别+人脸采集
+```python
+import time
+from cocopiPython import cameraPython,Screen
+from AI import FaceRecognition
+from CocoPi import BUTTON
+
+# 按钮初始化
+key_C = BUTTON(13)
+key_D = BUTTON(7)
+
+Screen = Screen()
+camera = cameraPython()
+
+FaceRecognition = FaceRecognition()
+People_list = ["小明","小红","小刚","小花"]
+
+FaceNum = 0
+faceScore = 0
+color = (255,0,0)
+
+while True:
+    canvas = camera.capture() # 获取摄像头图像
+    canvas = canvas.crop(48,8,224,224) # 裁剪图片尺寸
+    data = FaceRecognition.loadmodel(canvas) # 加载人脸检测模型
+    for i in data:
+        canvas.draw_rectangle(i["X"],i["Y"],i["X"]+i["W"],i["Y"]+i["H"],color=color,thickness=1) # 检测框
+        if key_C.is_pressed() and FaceNum < len(People_list):
+            while not key_C.is_pressed()== False:
+                time.sleep(0.01)
+            FaceRecognition.add(People_list[len(FaceRecognition)],i["feature"]) # 录入人脸保存
+            canvas.draw_rectangle(0,0,320,20,color=(0,0,0),thickness=-1)
+            canvas.draw_string(0,0,"已采集"+str(People_list[FaceNum])+"人脸数据",scale=1,color=(255,255,255),thickness=1)
+            Screen.show(canvas,48,8)
+            FaceNum = FaceNum + 1
+            time.sleep(1)
+        faceScore = round(i["recognizeScore"],2)
+        if faceScore > 70:
+            color = (0,255,0)
+            canvas.draw_string(i["X"],i["Y"],str(i["name"])+":"+str(faceScore),scale=1,color=color,thickness=1)
+        else:
+            color = (255,0,0)
+    if key_D.is_pressed() and FaceNum > 0:
+        while not key_D.is_pressed()== False:
+            time.sleep(0.01)
+        FaceRecognition.remove(People_list[len(FaceRecognition)-1]) # 删除人脸
+        canvas.draw_rectangle(0,0,320,20,color=(0,0,0),thickness=-1)
+        canvas.draw_string(0,0,"已删除"+str(People_list[FaceNum-1])+"人脸数据",scale=1,color=(255,255,255),thickness=1)
+        Screen.show(canvas,48,8)
+        FaceNum = FaceNum - 1
+        time.sleep(1)
+    Screen.show(canvas,48,8)
+```
+
+## 数字识别
+
+```python
+from AI import Digitalecognition
+```
+
+### 模型初始化
+```python
+Digitalecognition()
+```
+
+### 加载识别
+```python
+loadModel(img)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| img | image.Image() | 要识别的Image对象,必填 |
+
+### 样例
+```python
+from cocopiPython import cameraPython,Screen
+from AI import Digitalecognition
+
+Screen = Screen() # 画布初始化
+camera = cameraPython() # 摄像头初始化
+Digit = Digitalecognition() # 人脸检测初始化
+
+while True:
+    canvas = camera.capture() # 获取摄像头图像
+    canvas = canvas.crop(48,8,224,224) # 裁剪图像尺寸
+    data = Digit.loadModel(canvas)
+    for i in data:
+        canvas.draw_rectangle(i["X"],i["Y"],i["X"]+i["W"],i["Y"]+i["H"],color=(255,0,0),thickness=1)
+        canvas.draw_string(i["X"],i["Y"]-20,(str(i["name"])+":"+str(i["score"])),color=(255,0,0))
+    Screen.show(canvas,48,8)
+```
+
+## 物体检测
+
+```python
+from AI import ObjectDetection
+```
+
+### 模型初始化
+```python
+ObjectDetection()
+```
+
+### 加载识别
+```python
+loadModel(img)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| img | image.Image() | 要识别的Image对象,必填 |
+
+### 样例
+```python
+from cocopiPython import cameraPython,Screen
+from AI import ObjectDetection
+
+Screen = Screen() # 画布初始化
+camera = cameraPython() # 摄像头初始化
+object = ObjectDetection() # 物体检测初始化
+
+while True:
+    canvas = camera.capture() # 获取摄像头图像
+    canvas = canvas.crop(48,8,224,224) # 裁剪图像尺寸
+    data = object.loadModel(canvas)
+    for i in data:
+        canvas.draw_rectangle(i["X"],i["Y"],i["X"]+i["W"],i["Y"]+i["H"],color=(255,0,0),thickness=1)
+        canvas.draw_string(i["X"],i["Y"]-20,(str(i["name"])+":"+str(i["score"])),color=(255,0,0))
+    Screen.show(canvas,48,8)
+```
+
+## 猜拳识别
+
+```python
+from AI import RockPaperScissors
+```
+
+### 模型初始化
+```python
+RockPaperScissors()
+```
+
+### 加载识别
+```python
+loadModel(img)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| img | image.Image() | 要识别的Image对象,必填 |
+
+### 样例
+```python
+from cocopiPython import cameraPython,Screen
+from AI import RockPaperScissors
+
+Screen = Screen()
+camera = cameraPython()
+RockPaperScissors = RockPaperScissors()
+
+while True:
+    canvas = camera.capture()
+    canvas = canvas.crop(48,8,224,224)
+    data = RockPaperScissors.loadModel(canvas)
+    for i in data:
+        canvas.draw_rectangle(i["X"],i["Y"],i["X"]+i["W"],i["Y"]+i["H"],color=(255,0,0),thickness=1)
+        canvas.draw_string(i["X"],i["Y"]-10,(str(i["name"])+":"+str(i["score"])),color=(255,0,0))
+    Screen.show(canvas,48,8)
+```
+
+## 自学习识别
+
+```python
+from AI import SelfLearning
+```
+
+### 模型初始化
+```python
+SelfLearning(lables)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| lables | 列表 | 要识别的物体名称列表,必填 |
+
+### 添加类别
+```python
+addClass(img)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| img | image.Image() | 要识别的Image对象,必填 |
+
+### 训练
+```python
+trainSave(path)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| path | string | 保存路径,选填,默认为“/root/user/model/module.bin” |
+
+### 加载识别
+```python
+loadModel(img,path)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| img | image.Image() | 要识别的Image对象,必填 |
+| path | string | 保存路径,选填,默认为“/root/user/model/module.bin” |
+
+### 样例
+#### 采集
+```python
+import time
+from cocopiPython import cameraPython,Screen
+from AI import SelfLearning
+from CocoPi import BUTTON
+
+key_C = BUTTON(13)
+key_D = BUTTON(7)
+
+Screen = Screen()
+camera = cameraPython()
+lables=(['鼠标','键盘','水杯'])
+SL = SelfLearning(lables)
+
+is_train = 0
+count = 0
+str_display = "按C键添加类别,按D键進行学习"
+
+while True:
+    # 获取摄像头数据
+    canvas = camera.capture()
+    canvas = canvas.crop(48,8,224,224)
+    if key_C.is_pressed():
+        while not key_C.is_pressed()== False:
+            time.sleep(0.01)
+        if count < len(lables):
+            # 采集数据添加到列表中
+            time.sleep(1)
+            SL.addClass(canvas)
+            count += 1
+    if key_D.is_pressed():
+        while not key_D.is_pressed()== False:
+            time.sleep(0.01)
+        if count >= len(lables) and is_train == 0:
+            time.sleep(1)
+            # 训练并保存,参数:path 为保存路径默认/root/user/model/module.bin
+            SL.train()
+            is_train = 1
+            str_display = "学习已完成"
+    canvas.draw_string(0,0,str_display,scale=1,color=(255,0,0),thickness=1)
+    canvas.draw_string(0,16,"采集次数:"+str(count),scale=1,color=(255,0,0),thickness=1)
+    Screen.show(canvas,48,8)
+```
+#### 识别
+```python
+from cocopiPython import cameraPython,Screen
+from AI import SelfLearning
+
+Screen = Screen()
+camera = cameraPython()
+SL= SelfLearning(['鼠标','键盘','水杯'])
+SL.load()
+
+while True:
+    # 获取摄像头数据
+    img = camera.capture()
+    canvas = img.crop(48,8,224,224)
+    data = SL.predict(canvas)
+    canvas.draw_string(0,5,(str(data["name"])+":"+str(data["score"])),scale=1,color=(255,0,0),thickness=1)
+    Screen.show(canvas,48,8)
+```
+
+## 拼音识别
+
+```python
+from AI import PinyinRecognition
+```
+
+### 模型初始化
+```python
+PinyinRecognition(keywords)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| keywords | 列表 | 拼音参数,文字的拼音与音调,必填 |
+
+### 获取结果
+```python
+getresult()
+```
+
+### 样例
+```python
+from cocopiPython import Screen
+from AI import PinyinRecognition
+
+Screen = Screen()
+canvas = Screen.create()
+
+keywords = [["ni3 hao3",0.1],["hao3 de1",0.1],["wan3 shang4 hao3",0.1]] # 设置拼音参数
+PinyinRecognition = PinyinRecognition(keywords)
+
+data =""
+while True:
+    canvas.clear()
+    data = str(PinyinRecognition.getResult()) # 获取拼音识别结果
+    print("jieguo:"+str(data))
+    canvas.draw_string(0,0, "请对准麦克风说出指令", scale = 2, color = (255,0,0) , thickness = 1)
+    if data != "None":
+        canvas.draw_string(0, 30, "拼音识别结果:", scale=2, color=(255,0,0), thickness = 1)
+        canvas.draw_string(30, 60, (data), scale=2, color=(255,255,255), thickness = 1)
+    Screen.show(canvas)
+```
+
+## 车牌识别
+
+```python
+from AI import PlateRecognition
+```
+
+### 模型初始化
+```python
+PlateRecognition()
+```
+
+### 加载识别
+```python
+loadModel(img)
+```
+
+### 参数说明
+| 参数 | 类型 | 说明 |
+| :--- | :--- | :--- |
+| img | image.Image() | 要识别的Image对象,必填 |
+
+### 样例
+```python
+from cocopiPython import cameraPython,Screen
+from AI import PlateRecognition
+
+Screen = Screen() # 画布初始化
+camera = cameraPython() # 摄像头初始化
+PlateRecognition = PlateRecognition() # 车牌识别初始化
+while True:
+    canvas = camera.capture() # 获取摄像头图像
+    canvas = canvas.crop(48,8,224,224) # 裁剪图像尺寸
+    data = PlateRecognition.load(canvas) # 加载识别
+    for i in data:
+        canvas.draw_rectangle(i["X"],i["Y"],i["X"]+i["W"],i["Y"]+i["H"],color=(255,0,0),thickness=1) # 检测框
+        canvas.draw_string(i["X"],i["Y"]-10,(str(i["name"])),color=(255,0,0)) # 名称
+    Screen.show(canvas,48,8) # 显示
+```
+

+ 410 - 0
md/screen.md

@@ -0,0 +1,410 @@
+# 图形处理
+
+## 屏幕
+
+```python
+from cocopiPython import Screen
+```
+
+### 初始化
+```python
+Screen()
+```
+
+### 创建画布
+
+```python
+create(w=320,h=240,bgColor=(0,0,0))
+```
+会返回一个 Image 对象,后续的绘制显示操作都是Image对象的操作
+
+### 参数说明
+| 参数 |类型 |说明 |
+| --- | --- | --- |
+| w | int | 画布宽度,选填,默认为320 |
+| h | int | 画布高度,选填,默认为240 |
+| bgColor | tuple | 画布背景颜色,选填,默认为(0,0,0) |
+
+### 样例
+
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(255,255,255)) # 创建画布
+while True:
+    canvas.show(ver) # 显示画布
+```
+
+### 画布显示
+
+```python
+from cocopiPython import Screen
+
+canvas=Screen()
+
+canvas.show(img,canvas_x=0,canvas_y=0)
+```
+
+### 参数说明
+| 参数 |类型 |说明 |
+| --- | --- | --- |
+| img | object | 画布对象,必填 |
+| canvas_x | int | 画布起始点x轴坐标,选填,默认为0 |
+| canvas_y | int | 画布起始点y轴坐标,选填,默认为0 |
+
+
+### 清除画布
+
+```python
+Image.clear()
+```
+清除image.Image 对象内部的图像数据,但不删除对象。
+
+### 绘制文字
+在创建的画布上面显示文字,Image为图像对象
+
+```python
+Image.draw_string(x,y,text,scale,color,thickness)
+```
+### 参数说明
+
+| 参数 |类型 |说明 |
+| --- | --- | --- |
+| x | int | 起始点x轴坐标,必填 |
+| y | int | 起始点y轴坐标,必填 |
+| text | string | 要显示的文本内容,必填 |
+| scale | float | 文字大小,选填,默认为1 |
+| color | tuple | 字体颜色,必填 |
+| thickness | int | 文字粗细,选填,默认为1 |
+
+### 样例
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(20,20,100)) # 创建画布
+
+while True:
+    ver.draw_string(150,100, "你好", scale = 1, color = (255,255,255) , thickness = 1)
+    ver.draw_string(120,120, "Hello World!", scale = 1, color = (255,255,255) , thickness = 1)
+    canvas.show(ver) # 显示画布
+```
+
+### 绘制矩形
+在创建的画布上面绘制矩形,矩形分实心矩形和空心矩形
+```python
+Image.draw_rectangle(x1,y1,x2,y2,color=(r,g,b),thickness=1)
+```
+
+### 参数说明
+| 参数 |类型 |说明 |
+| --- | --- | --- |
+| x1 | int | 起始点x轴坐标,必填 |
+| y1 | int | 起始点y轴坐标,必填 |
+| x2 | int | 终点x轴坐标,必填 |
+| y2 | int | 终点y轴坐标,必填 |
+| color | tuple | 字体颜色,必填 |
+| thickness | int | 边框线的粗细,空心矩形为正,实心矩形为负,必填 |
+
+### 样例
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(20,20,100)) # 创建画布
+
+while True:
+    ver.draw_rectangle(40,40, 280,200, (255,0,0),1) # 绘制空心矩形
+    ver.draw_rectangle(70,70, 250,170, color=(255,255,0),thickness=-1) # 绘制实心矩形
+    canvas.show(ver) # 显示画布
+```
+
+### 绘制直线
+在创建的画布上面绘制直线
+```python
+Image.draw_line(x1,y1,x2,y2,color=(r,g,b),thickness=1)
+```
+### 参数说明
+| 参数 |类型 |说明 |
+| --- | --- | --- |
+| x1 | int | 起始点x轴坐标,必填 |
+| y1 | int | 起始点y轴坐标,必填 |
+| x2 | int | 终点x轴坐标,必填 |
+| y2 | int | 终点y轴坐标,必填 |
+| color | tuple | 字体颜色,必填 |
+| thickness | int | 粗细,必填 |
+
+### 样例
+在屏幕上绘制一条从(x1,y1)到(x2, y2)的直线
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(20,20,100)) # 创建画布
+
+while True:
+    ver.draw_line(40,40, 280,200, (255,0,0),2) 
+    ver.draw_line(280,40, 40,200, color=(255,255,0),thickness=2) 
+    canvas.show(ver) # 显示画布
+```
+
+### 绘制圆
+
+在创建的画布上面绘制圆形,圆形分实心和空心
+```python
+Image.draw_circle(x, y, radius, color = (r, g, b), thickness = 1)
+```
+### 参数说明
+| 参数 |类型 |说明 |
+| --- | --- | --- |
+| x | int | 起始点x轴坐标,必填 |
+| y | int | 起始点y轴坐标,必填 |
+| radius | int | 半径,必填 |
+| color | tuple | 字体颜色,必填 |
+| thickness | int | 线的粗细,必填 1~3 |
+
+### 样例
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(20,20,100)) # 创建画布
+
+while True:
+    ver.draw_circle(160,120, 100, color=(255, 0, 0), thickness=1)
+    ver.draw_circle(160,120, 50, color=(255, 255, 0), thickness=-1)
+    canvas.show(ver) # 显示画布
+```
+
+### 尺寸调整
+```python
+Image.resize(w, h, padding = 0)
+```
+
+### 参数说明
+将图像调整至(w, h)大小,padding 默认会按比例缩放填充,而不是 CV 的拉伸图像变形。 
+
+| 参数 |类型 |说明 |
+| --- | --- | --- |
+| W | int | 新图像的宽度 |
+| H | int | 新图像的宽度 |
+| padding | int | 缩放比例 |
+
+### 样例
+
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(20,20,100)) # 创建画布
+
+canvas.show(ver)
+time.sleep(3)
+ver = ver.resize(220, 220, padding = 0)
+while True:
+    canvas.show(ver)
+```
+
+### 图片裁剪
+别名为 cut 函数接口。 裁剪图片返回一张全新的图片 x, y, w, h裁剪图像的位置和大小 返回
+Image 对象
+```python
+Image.crop(x, y, w, h)
+```
+
+### 参数说明
+| 参数 |类型 |说明 |
+| --- | --- | --- |
+| x | int | 裁剪的起点的x轴坐标 |
+| y | int | 裁剪的起点的y轴坐标 |
+| w | int | 裁剪的宽度 |
+| h | int | 裁剪的高度 |
+
+### 样例
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(20,20,100)) # 创建画布
+canvas.show(ver)
+time.sleep(3)
+ver = ver.crop(0,0,200,200)
+while True:
+    canvas.show(ver)
+```
+
+### 图片旋转
+旋转图像到固定的角度,保持图像的尺寸不变,返回 Image 对象,rotate为旋转角度,正数时表示逆时针旋转,负数时表示顺时针旋转
+```python
+Image.rotate(rotate = 1)
+```
+
+### 样例
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(20,20,100)) # 创建画布
+
+canvas.show(ver)
+time.sleep(3)
+ver = ver.rotate(-50)
+while True:
+    canvas.show(ver)
+```
+
+### 图片翻转
+沿着 x 或 y 轴进行翻转图像,保持图像的尺寸不变,flip为1则水平翻转,flip为0则垂直翻转,返回一个Image对象
+```python
+Image.flip(flip = 1)
+```
+
+### 样例
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(20,20,100)) # 创建画布
+
+while True:
+    ver.clear()
+    ver.draw_rectangle(80,80, 150,150, color=(255,0,0), thickness=1)
+    ver.draw_string(100,100, "hello", scale = 1, color = (255,0,0) , thickness = 1)
+    canvas.show(ver)
+    time.sleep(3)
+    ver = ver.flip(0) # 垂直
+    canvas.show(ver)
+    time.sleep(3)
+    ver = ver.flip(1) # 水平
+    canvas.show(ver)
+    time.sleep(3)
+```
+
+### 图片保存
+保存图像到本地,返回一个Image对象
+```python
+Image.save("./tmp.jpg")
+```
+
+### 样例
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(20,20,100)) # 创建画布
+
+while True:
+    ver.draw_string(150,100, "你好", scale = 1, color = (255,255,255) , thickness = 1)
+    ver.draw_string(120,120, "Hello World!", scale = 1, color = (255,255,255) , thickness = 1)
+    ver.save('/root/user/img/test.jpg')
+    time.sleep(1)
+    canvas.show(ver) # 显示画布
+```
+
+### 绘制图片
+将传递的img图像画在image.Image() 对象内部的图像上, img只能传递image.Image()对象的图像。会返回 Image 对象
+```python
+Image.draw_image(img,0,0)
+```
+
+### 参数说明
+| 参数 |类型 |说明 |
+| --- | --- | --- |
+| img | image.Image() | 打开的Image对象 |
+| x | int | 起始点x轴坐标 |
+| y | int | 起始点y轴坐标 |
+
+### 样例
+```python
+from cocopiPython import Screen
+
+canvas=Screen() # 屏幕初始化
+ver = canvas.create(bgColor=(20,20,100)) # 创建画布
+while True:
+    ver.draw_image((image.open("/root/user/img/test.jpg")),0,0) # 绘制图像
+    canvas.show(ver)
+```
+
+## 摄像头
+```python
+from cocopiPython import cameraPython
+```
+
+### 摄像头初始化
+```python
+cameraPython()
+```
+
+### 获取摄像头图像
+```python
+capture()
+```
+同样会返回一个 Image 对象,可以进行绘制操作。
+
+### 样例
+```python
+from cocopiPython import cameraPython,Screen,WebPageTransmission
+
+camera = cameraPython() # 摄像头初始化
+canvas = Screen() # 画布初始化
+
+while True:
+    img = camera.capture() # 获取摄像头图像
+    img.draw_string(120,120, "Hello World!", scale = 1, color = (255,255,255) , thickness = 1)
+    canvas.show(img) # 画布显示图像
+```
+
+## 图传
+```python
+from cocopiPython import ImageTransmission
+```
+
+### 初始化
+```python
+ImageTransmission()
+```
+
+### 显示
+```python
+show(image)
+```
+
+### 参数说明
+| 参数 | 类型 | 描述 |
+| --- | --- | --- |
+| image | image.Image() | 图像 |
+
+### 样例
+```python
+from cocopiPython import cameraPython,Screen,ImageTransmission
+
+camera = cameraPython() # 摄像头初始化
+canvas = Screen()
+imageTransmission = ImageTransmission() # 画布图像传输
+
+while True:
+    img = camera.capture() # 获取摄像头图像
+    imageTransmission.show(img) # 图传至电脑
+    canvas.show(img) #屏幕显示
+```
+
+## 循线
+```python
+import cocopiPython
+
+cocopiPython.lane_tracking(img,region1,region2)
+```
+
+### 参数说明
+|参数|类型|说明|
+|:---|:---|:---|
+|img|image.Image()|输入图像,必填|
+|region1|元组,(x,y,w,h)|左侧检测框的位置与大小,必填|
+|region2|元组,(x,y,w,h)|右侧检测框的位置与大小,必填|
+
+
+
+
+
+

+ 99 - 0
md/servo.md

@@ -0,0 +1,99 @@
+# 扩展硬件
+
+## 舵机
+
+```python
+from CocoPi import multiFuncGpio
+```
+
+### 初始化
+
+```python
+multiFuncGpio(id,model)
+```
+
+### 参数说明
+
+| 参数  | 类型 | 描述 |
+| ----- | ---- | ------ |
+| id    | int  |接口引脚,必填,0表示S1接口,1表示S2接口。      |
+| model | int  | 控制模式,必填,mode=0,为空闲状态,引脚不执行任何功能mode=1,为控制舵机模式,值控制范围为0°~180°;mode=2,为数字输入模式,返回值0或1;mode=3,为数字输出模式,输出值为0或1;mode=4,为ADC采样模式,返回值为0~1023;mode=5,为PWM输出模式,输出值范围为0~255;mode=6,为控制蜂鸣器模式,控制范围为20hz~12000hz;mode=7,为控制灯带模式,暂未实现。 |
+
+### 舵机转动
+
+```python
+servoCtrl(angle)
+```
+
+### 参数说明
+
+| 参数  | 类型 | 描述 |
+| ----- | ---- | ------ |
+| angle    | int  |舵机转动角度,必填,0°-180°。      |
+
+### 样例
+
+```python
+import time
+from CocoPi import multiFuncGpio
+
+S1= multiFuncGpio(0,1) # S1舵机初始化
+S2= multiFuncGpio(1,1) # S2舵机初始化
+while True:
+    S1.servoCtrl(0) # S1转动到0°
+    S2.servoCtrl(0) # S2转动到0°
+    time.sleep(1)
+    S1.servoCtrl(90) # S1转动到90°
+    S2.servoCtrl(90) # S2转动到90°
+    time.sleep(1)
+```
+
+## 电机
+
+```python
+from CocoPi import dcMotor
+```
+
+### 初始化
+
+```python
+dcMotor(id)
+```
+
+### 参数说明
+
+| 参数  | 类型 | 描述 |
+| ----- | ---- | ------ |
+| id    | int  |电机接口对应的引脚,必填,M1引脚为1,M2引脚为2。     |
+
+### 电机转动
+
+```python
+dcMotorCtrl(dir,speed)
+```
+
+### 参数说明
+
+| 参数  | 类型 | 描述 |
+| ----- | ---- | ------ |
+| dir    | int  |电机转动方向,必填,0表示逆时针,1表示顺时针。|
+| speed    | int  |转动速度,必填,0~255|
+
+### 样例
+
+```python
+from CocoPi import dcMotor
+import time
+
+M1 = dcMotor(1) # M1电机初始化
+M2 = dcMotor(2) # M2电机初始化
+
+while True:
+    M1.dcMotorCtrl(0,150) # M1以150的速度逆时针转动
+    M2.dcMotorCtrl(0,150) # M2以150的速度逆时针转动
+    time.sleep(1)
+    M1.dcMotorCtrl(1,150) # M1以150的速度顺时针转动
+    M2.dcMotorCtrl(1,150) # M2以150的速度顺时针转动
+    time.sleep(1)
+```
+

+ 158 - 0
md/web.md

@@ -0,0 +1,158 @@
+# 物联网
+
+## WIFI
+```python
+from cocopiPython import Networking
+```
+
+### 初始化
+```python
+Networking()
+```
+
+### 连接WIFI
+```python
+wifiContent(WiFiSSID,WiFiPSD)
+```
+
+### 参数信息
+|参数|类型|说明|
+|:---|:---|:---|
+|WiFiSSID|str|WIFI名称,必填|
+|WiFiPSD|str|WIFI密码,必填|
+
+### WiFi连接状态
+```python
+wifiIsContent()
+```
+
+### 获取IP
+```python
+getWifiIP()
+```
+
+### 样例
+```python
+from cocopiPython import NetWorking
+
+Networking = NetWorking() # 初始化
+Networking.wifiContent("CocoRobo_SZ","cocorobo2019")
+while not Networking.wifiIsContent():
+    print("wifi连接中...")
+print('wifi连接成功!')
+print('IP地址:',Networking.getWifiIP())
+```
+
+## 天气预报
+```python
+from cocopiPython import Weather
+```
+
+### 初始化
+```python
+Weather()
+```
+
+### 获取天气
+```python
+getWeather(city,lang='zh-hans')
+```
+
+### 参数说明
+|参数|类型|说明|
+|:---|:---|:---|
+|city|str|城市代码,必填,详见<a target="_blank" href="https://github.com/qwd/LocationList/blob/master/China-City-List-latest.csv">中国城市代码参照</a>|
+|lang|str|语言|
+
+### 样例
+```python
+from cocopiPython import Weather,NetWorking
+# 联网 
+Networking = NetWorking()
+Weather = Weather()
+
+Networking.wifiContent("CocoRobo_SZ","cocorobo2019")
+
+while not Networking.wifiIsContent():
+    print("wifi连接中...")
+print('wifi连接成功!')  
+
+weatherData = Weather.getWeather(101280601,"zh-hans")
+print(weatherData)
+```
+
+## 邮件发送
+```python
+from cocopiPython import Email
+```
+
+### 初始化
+```python
+Email()
+```
+
+### 发送邮件
+```python
+send(email,content,title)
+```
+
+### 参数说明
+|参数|类型|说明|
+|:---|:---|:---|
+|email|string|收件人邮箱,必填|
+|content|string|邮件内容,必填|
+|title|string|邮件标题,必填|
+
+### 样例
+```python
+from cocopiPython import NetWorking,Email
+
+Net = NetWorking()
+email = Email()
+
+Net.wifiContent("CocoRobo_SZ","cocorobo2019")
+
+while not Net.wifiIsContent():
+    print("wifi连接中...")
+print('wifi连接成功!')  
+email.send('1101068574@qq.com','who are you?','name')
+```
+
+## 云端服务
+```python
+from cocopiPython import Cloud
+```
+
+### 初始化
+```python
+Cloud()
+```
+
+### 发送
+```python
+sendData(key,data)
+```
+
+### 参数说明
+|参数|类型|说明|
+|:---|:---|:---|
+|key|string|云端事件的API,必填|
+|data|字典|发送的数据,必填,以字典的格式发送,{属性:’123‘}|
+
+### 样例
+```python
+from cocopiPython import NetWorking,Cloud
+
+Net = NetWorking()
+cloud = Cloud()
+
+Net.wifiContent("CocoRobo_SZ","cocorobo2019")
+
+while not Net.wifiIsContent():
+    print("wifi连接中...")
+print('wifi连接成功!')  
+
+params = {"Property0":666}
+cloud.sendData("7219bc312639056e95a42480f9870d9f",params)
+time.sleep(2)
+```

BIN
media/help-logo.png


BIN
media/loading.gif


BIN
media/top.png


BIN
media/開始使用CocoBlocklyPi/0d63beda-14dd-4b5f-9c96-e6e739b40cd1.png


BIN
media/開始使用CocoBlocklyPi/11906485-9faa-4c1c-ae7c-fb9ccb28aed4.png


BIN
media/開始使用CocoBlocklyPi/14dcb61f-b56e-417f-9cf7-92aea81154ba.png


BIN
media/開始使用CocoBlocklyPi/20769a43-916f-4567-a2bf-541a07ac2f09.png


BIN
media/開始使用CocoBlocklyPi/244f366e-762c-4eb5-9ce3-6ed309e94aa8.png


BIN
media/開始使用CocoBlocklyPi/2e9f53ef-d348-428a-b85c-34494b5cb9f3.png


BIN
media/開始使用CocoBlocklyPi/335f0dc6-f107-4aaf-9cab-27a3268f91c0.png


BIN
media/開始使用CocoBlocklyPi/417e343f-0f1a-477c-8217-93212756b6f0.png


BIN
media/開始使用CocoBlocklyPi/4ed26e1c-ec2e-4959-a05d-84f457b478cd.png


BIN
media/開始使用CocoBlocklyPi/4fb17a09-f319-4589-ba37-84918c9a76cf.png


BIN
media/開始使用CocoBlocklyPi/7b47688c-9158-4ae3-b4d5-9762b298db0c.png


BIN
media/開始使用CocoBlocklyPi/7db8f71e-c93e-4a76-a4b9-d5ac97554c66.png


BIN
media/開始使用CocoBlocklyPi/9c8eed93-75ae-45e6-b927-d085dd5b9f40.jpg


BIN
media/開始使用CocoBlocklyPi/b6ec532e-7c2a-4520-be87-eaeb71bc23df.png


BIN
media/開始使用CocoBlocklyPi/c7d09c56-c392-422a-93bf-848001103eb9.png


BIN
media/開始使用CocoBlocklyPi/d6e2f0a2-be34-4dd0-a855-e8e1216a84a7.png


BIN
media/開始使用CocoBlocklyPi/d7d631bd-2eaf-46ad-887f-e9060aa45936.png


BIN
media/開始使用CocoBlocklyPi/e02a4793-8a23-4039-8a04-13cc8567dd4d.png


BIN
media/開始使用CocoBlocklyPi/f539f95d-1d52-4517-83c3-6479c094533b.png


BIN
media/開始使用CocoBlocklyPi/f7da71ba-a9eb-47c9-8414-6f688629b2cf.png


BIN
media/開始使用CocoBlocklyPi/ff24a19d-b110-4585-a12f-341fcd699179.png


BIN
media/開始使用CocoBlocklyPi/login.png


BIN
media/開始使用CocoBlocklyPi/loginSuccess.png


BIN
media/開始使用CocoBlocklyPi/reg.png


BIN
media/開始使用CocoPi/hardware_1.jpg


BIN
media/開始使用CocoPi/hardware_2.jpg


BIN
media/開始使用CocoPi/hardware_3.jpg


BIN
media/開始使用CocoPi/hardware_4.jpg


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
search.min.js


+ 1054 - 0
vue.css

@@ -0,0 +1,1054 @@
+@import url("https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600");
+* {
+    -webkit-font-smoothing: antialiased;
+    -webkit-overflow-scrolling: touch;
+    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+    -webkit-text-size-adjust: none;
+    -webkit-touch-callout: none;
+    box-sizing: border-box
+}
+
+
+
+body:not(.ready) {
+    overflow: hidden
+}
+
+body:not(.ready) .app-nav,
+body:not(.ready)>nav,
+body:not(.ready) [data-cloak] {
+    display: none
+}
+.body-nav{
+    position: fixed !important;
+    top: 0px !important;
+    left: 300px !important;
+    z-index: 1111 !important;
+    background: #fff !important;
+    padding-right: 25px !important;
+}
+div#app {
+    font-size: 30px;
+    font-weight: lighter;
+    margin: 40vh auto;
+    text-align: center
+}
+
+div#app:empty:before {
+    content: "Loading..."
+}
+
+.emoji {
+    height: 1.2rem;
+    vertical-align: middle
+}
+
+.progress {
+    background-color: var(--theme-color, #42b983);
+    height: 2px;
+    left: 0;
+    position: fixed;
+    right: 0;
+    top: 0;
+    transition: width .2s, opacity .4s;
+    width: 0;
+    z-index: 5
+}
+
+.search .search-keyword,
+.search a:hover {
+    color: var(--theme-color, #42b983)
+}
+
+.search .search-keyword {
+    font-style: normal;
+    font-weight: 700
+}
+
+body,
+html {
+    height: 100%
+}
+
+body {
+    -moz-osx-font-smoothing: grayscale;
+    -webkit-font-smoothing: antialiased;
+    color: #34495e;
+    font-family: Source Sans Pro, Helvetica Neue, Arial, sans-serif;
+    font-size: 15px;
+    letter-spacing: 0;
+    margin: 0;
+    overflow-x: hidden
+}
+
+img {
+    max-width: 100%
+}
+
+a[disabled] {
+    cursor: not-allowed;
+    opacity: .6
+}
+
+kbd {
+    border: 1px solid #ccc;
+    border-radius: 3px;
+    display: inline-block;
+    font-size: 12px!important;
+    line-height: 12px;
+    margin-bottom: 3px;
+    padding: 3px 5px;
+    vertical-align: middle
+}
+
+.task-list-item {
+    list-style-type: none
+}
+
+li input[type=checkbox] {
+    margin: 0 .2em .25em -1.6em;
+    vertical-align: middle
+}
+
+.app-nav {
+    padding: 14px 0 12px 25px;
+    position: absolute;
+    right: 0;
+    text-align: right;
+    z-index: 2
+}
+
+.app-nav.no-badge {
+    /* margin-right: 25px */
+}
+
+.app-nav p {
+    margin: 0
+}
+
+.app-nav>a {
+    /* margin: 0 1rem; */
+    padding: 5px 0;
+}
+
+.app-nav li,
+.app-nav ul {
+    display: inline-block;
+    list-style: none;
+    margin: 0
+}
+
+.app-nav a {
+    color: inherit;
+    font-size: 20px;
+    text-decoration: none;
+    transition: color .3s;
+    padding: 0 10px;
+    /* border-radius: 8px; */
+    position: relative;
+}
+
+.app-nav a:nth-child(2)::before{
+    content: "";   
+    display: inline-block;
+    width: 2px;
+    height: 16px;
+    background: #555;
+    position: absolute;
+    top:5px;
+    left:0px;
+}
+/* .app-nav a:nth-child(2)::after{
+    content: "";   
+    display: inline-block;
+    width: 2px;
+    height: 16px;
+    background: #555;
+    position: absolute;
+    top:5px;
+    right: 0px;
+} */
+
+.app-nav a.active{
+    color: var(--theme-color, #42b983);
+    font-weight: 800;
+}
+.app-nav a:hover {
+    color: var(--theme-color, #42b983)
+}
+
+/* .app-nav a.active {
+    background: rgb(47, 79, 205);
+    color: #fff;
+    border: 1px solid rgb(47, 79, 205);
+    border-top-left-radius: 5px;
+    border-bottom-left-radius: 5px;
+} */
+
+.app-nav>ul{
+    padding-left: 0px;
+}
+
+nav.app-nav li ul{
+    min-width: 90px;
+}
+
+.app-nav li {
+    display: inline-block;
+    margin: 0 1rem;
+    padding: 5px 0;
+    position: relative;
+}
+
+.app-nav li ul {
+    background-color: #fff;
+    border: 1px solid #ddd;
+    border-bottom-color: #ccc;
+    border-radius: 4px;
+    box-sizing: border-box;
+    display: none;
+    max-height: calc(100vh - 61px);
+    overflow-y: auto;
+    padding: 10px 0;
+    position: absolute;
+    right: -8px;
+    text-align: left;
+    top: 100%;
+    white-space: nowrap
+}
+
+.app-nav li ul li {
+    display: block;
+    font-size: 14px;
+    line-height: 1rem;
+    margin: 0;
+    margin: 8px 14px;
+    white-space: nowrap
+}
+
+.app-nav li ul a {
+    display: block;
+    font-size: inherit;
+    margin: 0;
+    padding: 0
+}
+
+.app-nav li ul a.active {
+    border-bottom: 0
+}
+
+.app-nav li:hover ul {
+    display: block
+}
+
+.github-corner {
+    border-bottom: 0;
+    position: fixed;
+    right: 0;
+    text-decoration: none;
+    top: 0;
+    z-index: 1
+}
+
+.github-corner:hover .octo-arm {
+    animation: a .56s ease-in-out
+}
+
+.github-corner svg {
+    color: #fff;
+    fill: var(--theme-color, #42b983);
+    height: 80px;
+    width: 80px
+}
+
+main {
+    display: block;
+    position: relative;
+    width: 100vw;
+    height: 100%;
+    z-index: 0
+}
+
+main.hidden {
+    display: none
+}
+
+.anchor {
+    display: inline-block;
+    text-decoration: none;
+    transition: all .3s
+}
+
+.anchor span {
+    color: #34495e
+}
+
+.anchor:hover {
+    text-decoration: underline
+}
+
+.sidebar {
+    border-right: 1px solid rgba(0, 0, 0, .07);
+    overflow-y: auto;
+    padding: 40px 0 0;
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    transition: transform .25s ease-out;
+    width: 300px;
+    z-index: 3
+}
+
+.sidebar>h1 {
+    margin: 0 auto 1rem;
+    font-size: 1.5rem;
+    font-weight: 300;
+    text-align: center
+}
+
+.sidebar>h1 a {
+    color: inherit;
+    text-decoration: none
+}
+
+.sidebar>h1 .app-nav {
+    display: block;
+    position: static
+}
+
+.sidebar .sidebar-nav {
+    line-height: 2em;
+    padding-bottom: 40px
+}
+
+.sidebar li.collapse .app-sub-sidebar {
+    display: none
+}
+
+.sidebar ul {
+    margin: 0 0 0 20px;
+    padding: 0;
+}
+
+.sidebar li>p {
+    font-weight: 700;
+    margin: 0;
+}
+
+.sidebar ul,
+.sidebar ul li {
+    list-style: none
+}
+
+.sidebar ul li a {
+    border-bottom: none;
+    display: block
+}
+
+.sidebar ul li ul {
+    padding-left: 20px
+}
+
+.sidebar::-webkit-scrollbar {
+    width: 4px
+}
+
+.sidebar::-webkit-scrollbar-thumb {
+    background: transparent;
+    border-radius: 4px
+}
+
+.sidebar:hover::-webkit-scrollbar-thumb {
+    background: hsla(0, 0%, 53%, .4)
+}
+
+.sidebar:hover::-webkit-scrollbar-track {
+    background: hsla(0, 0%, 53%, .1)
+}
+
+.sidebar-toggle {
+    background-color: transparent;
+    background-color: hsla(0, 0%, 100%, .8);
+    border: 0;
+    outline: none;
+    padding: 10px;
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    text-align: center;
+    transition: opacity .3s;
+    width: 284px;
+    z-index: 4
+}
+
+.sidebar-toggle .sidebar-toggle-button:hover {
+    opacity: .4
+}
+
+.sidebar-toggle span {
+    background-color: var(--theme-color, #42b983);
+    display: block;
+    margin-bottom: 4px;
+    width: 16px;
+    height: 2px
+}
+
+body.sticky .sidebar,
+body.sticky .sidebar-toggle {
+    position: fixed
+}
+
+.content {
+    padding-top: 60px;
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 300px;
+    transition: left .25s ease
+}
+
+.markdown-section {
+    margin: 0 auto;
+    max-width: 800px;
+    padding: 30px 15px 40px;
+    position: relative
+}
+
+.markdown-section>* {
+    box-sizing: border-box;
+    font-size: inherit
+}
+
+.markdown-section>:first-child {
+    margin-top: 0!important
+}
+
+.markdown-section hr {
+    border: none;
+    border-bottom: 1px solid #eee;
+    margin: 2em 0
+}
+
+.markdown-section iframe {
+    border: 1px solid #eee
+}
+
+.markdown-section table {
+    border-collapse: collapse;
+    border-spacing: 0;
+    display: block;
+    margin-bottom: 1rem;
+    overflow: auto;
+    width: 100%
+}
+
+.markdown-section th {
+    font-weight: 700
+}
+
+.markdown-section td,
+.markdown-section th {
+    border: 1px solid #ddd;
+    padding: 6px 13px
+}
+
+.markdown-section tr {
+    border-top: 1px solid #ccc
+}
+
+.markdown-section p.tip,
+.markdown-section tr:nth-child(2n) {
+    background-color: #f8f8f8
+}
+
+.markdown-section p.tip {
+    border-bottom-right-radius: 2px;
+    border-left: 4px solid #f66;
+    border-top-right-radius: 2px;
+    margin: 2em 0;
+    padding: 12px 24px 12px 30px;
+    position: relative
+}
+
+.markdown-section p.tip:before {
+    background-color: #f66;
+    border-radius: 100%;
+    color: #fff;
+    content: "!";
+    font-family: Dosis, Source Sans Pro, Helvetica Neue, Arial, sans-serif;
+    font-size: 14px;
+    font-weight: 700;
+    left: -12px;
+    line-height: 20px;
+    position: absolute;
+    height: 20px;
+    width: 20px;
+    text-align: center;
+    top: 14px
+}
+
+.markdown-section p.tip code {
+    background-color: #efefef
+}
+
+.markdown-section p.tip em {
+    color: #34495e
+}
+
+.markdown-section p.warn {
+    background: rgba(66, 185, 131, .1);
+    border-radius: 2px;
+    padding: 1rem
+}
+
+body.close .sidebar {
+    transform: translateX(-300px)
+}
+
+body.close .sidebar-toggle {
+    width: auto
+}
+
+body.close .content {
+    left: 0
+}
+body.close .body-nav{
+    width: 100vw !important;
+    position: fixed !important;
+    top: 0px !important;
+    left: 0 !important;
+    z-index: 1111 !important;
+    background: #fff !important;
+    padding-right: 25px;
+}
+
+@media print {
+    .github-corner,
+    .sidebar,
+    .sidebar-toggle {
+        display: none
+    }
+    .body-nav{
+        position: fixed !important;
+        top: 0px !important;
+        left: 0 !important;
+        z-index: 1111 !important;
+        background: #fff !important;
+        padding-right: 25px;
+    }
+}
+
+@media screen and (max-width:768px) {
+    .github-corner,
+    .sidebar,
+    .sidebar-toggle {
+        position: fixed
+    }
+    .app-nav {
+        /* margin-top: 16px */
+    }
+    .app-nav li ul {
+        top: 30px
+    }
+    main {
+        height: auto;
+        overflow-x: hidden
+    }
+    .sidebar {
+        left: -300px;
+        transition: transform .25s ease-out
+    }
+    .content {
+        left: 0;
+        max-width: 100vw;
+        position: static;
+        padding-top: 20px;
+        transition: transform .25s ease
+    }
+    .app-nav,
+    .github-corner {
+        transition: transform .25s ease-out
+    }
+    .sidebar-toggle {
+        background-color: transparent;
+        width: auto;
+        padding: 30px 30px 10px 10px
+    }
+    body.close .sidebar {
+        transform: translateX(300px)
+    }
+    body.close .sidebar-toggle {
+        background-color: hsla(0, 0%, 100%, .8);
+        transition: background-color 1s;
+        width: 284px;
+        padding: 10px
+    }
+    body.close .content {
+        transform: translateX(300px)
+    }
+    body.close .app-nav,
+    body.close .github-corner {
+        display: none
+    }
+    .github-corner:hover .octo-arm {
+        animation: none
+    }
+    .github-corner .octo-arm {
+        animation: a .56s ease-in-out
+    }
+    .body-nav{
+        position: fixed !important;
+        top: 0px !important;
+        left: 0 !important;
+        z-index: 1111 !important;
+        background: #fff !important;
+        padding-right: 25px;
+    }
+}
+
+@keyframes a {
+    0%,
+    to {
+        transform: rotate(0)
+    }
+    20%,
+    60% {
+        transform: rotate(-25deg)
+    }
+    40%,
+    80% {
+        transform: rotate(10deg)
+    }
+}
+
+section.cover {
+    -ms-flex-align: center;
+    align-items: center;
+    background-position: 50%;
+    background-repeat: no-repeat;
+    background-size: cover;
+    height: 100vh;
+    display: none
+}
+
+section.cover.show {
+    display: -ms-flexbox;
+    display: flex
+}
+
+section.cover.has-mask .mask {
+    background-color: #fff;
+    opacity: .8;
+    position: absolute;
+    top: 0;
+    height: 100%;
+    width: 100%
+}
+
+section.cover .cover-main {
+    -ms-flex: 1;
+    flex: 1;
+    margin: -20px 16px 0;
+    text-align: center;
+    z-index: 1
+}
+
+section.cover a {
+    color: inherit
+}
+
+section.cover a,
+section.cover a:hover {
+    text-decoration: none
+}
+
+section.cover p {
+    line-height: 1.5rem;
+    margin: 1em 0
+}
+
+section.cover h1 {
+    color: inherit;
+    font-size: 2.5rem;
+    font-weight: 300;
+    margin: .625rem 0 2.5rem;
+    position: relative;
+    text-align: center
+}
+
+section.cover h1 a {
+    display: block
+}
+
+section.cover h1 small {
+    bottom: -.4375rem;
+    font-size: 1rem;
+    position: absolute
+}
+
+section.cover blockquote {
+    font-size: 1.5rem;
+    text-align: center
+}
+
+section.cover ul {
+    line-height: 1.8;
+    list-style-type: none;
+    margin: 1em auto;
+    max-width: 500px;
+    padding: 0
+}
+
+section.cover .cover-main>p:last-child a {
+    border: 1px solid var(--theme-color, #42b983);
+    border-radius: 2rem;
+    box-sizing: border-box;
+    color: var(--theme-color, #42b983);
+    display: inline-block;
+    font-size: 1.05rem;
+    letter-spacing: .1rem;
+    margin: .5rem 1rem;
+    padding: .75em 2rem;
+    text-decoration: none;
+    transition: all .15s ease
+}
+
+section.cover .cover-main>p:last-child a:last-child {
+    background-color: var(--theme-color, #42b983);
+    color: #fff
+}
+
+section.cover .cover-main>p:last-child a:last-child:hover {
+    color: inherit;
+    opacity: .8
+}
+
+section.cover .cover-main>p:last-child a:hover {
+    color: inherit
+}
+
+section.cover blockquote>p>a {
+    border-bottom: 2px solid var(--theme-color, #42b983);
+    transition: color .3s
+}
+
+section.cover blockquote>p>a:hover {
+    color: var(--theme-color, #42b983)
+}
+
+.sidebar,
+body {
+    background-color: #fff
+}
+
+.sidebar {
+    color: #364149
+}
+
+.sidebar li {
+    margin: 6px 0
+}
+
+.sidebar ul li a {
+    color: #505d6b;
+    font-size: 14px;
+    font-weight: 400;
+    overflow: hidden;
+    text-decoration: none;
+    text-overflow: ellipsis;
+    white-space: nowrap
+}
+
+.sidebar ul li a:hover {
+    text-decoration: underline
+}
+
+.sidebar ul li ul {
+    padding: 0 0 0 7px
+}
+
+.sidebar ul li p.active a{
+    border-right: 4px solid;
+    color: var(--theme-color, #42b983);
+    background-color: rgba(34,93,213,.1);
+    padding: 2px 0px 2px 10px;
+    margin-left: -10px;
+    font-weight: 600
+}
+
+.sidebar ul li.active>a {
+    border-right: 4px solid;
+    color: var(--theme-color, #42b983);
+    background-color: rgba(34,93,213,.1);
+    padding: 2px 0px 2px 10px;
+    margin-left: -10px;
+    font-weight: 600
+}
+
+.app-sub-sidebar li:before {
+    content: "";
+    padding-right: 4px;
+    float: left
+}
+
+.markdown-section h1,
+.markdown-section h2,
+.markdown-section h3,
+.markdown-section h4,
+.markdown-section strong {
+    color: #2c3e50;
+    font-weight: 600
+}
+
+.markdown-section a {
+    color: var(--theme-color, #42b983);
+    font-weight: 600;
+    text-decoration: none;
+}
+
+.markdown-section h1 {
+    font-size: 2rem;
+    margin: 0 0 1rem
+}
+
+.markdown-section h2 {
+    font-size: 1.75rem;
+    margin: 45px 0 .8rem
+}
+
+.markdown-section h3 {
+    font-size: 1.5rem;
+    margin: 40px 0 .6rem
+}
+
+.markdown-section h4 {
+    font-size: 1.25rem
+}
+
+.markdown-section h5 {
+    font-size: 1rem
+}
+
+.markdown-section h6 {
+    color: #777;
+    font-size: 1rem
+}
+
+.markdown-section figure,
+.markdown-section p {
+    margin: 1.2em 0
+}
+
+.markdown-section ol,
+.markdown-section p,
+.markdown-section ul {
+    line-height: 1.8rem;
+    word-spacing: .05rem
+}
+
+.markdown-section ol,
+.markdown-section ul {
+    padding-left: 1.5rem
+}
+
+.markdown-section blockquote {
+    border-left: 4px solid var(--theme-color, #42b983);
+    color: #858585;
+    margin: 2em 0;
+    padding-left: 20px
+}
+
+.markdown-section blockquote p {
+    font-weight: 600;
+    margin-left: 0
+}
+
+.markdown-section iframe {
+    margin: 1em 0
+}
+
+.markdown-section em {
+    color: #7f8c8d
+}
+
+.markdown-section code {
+    border-radius: 2px;
+    color: #e96900;
+    font-size: .8rem;
+    margin: 0 2px;
+    padding: 3px 5px;
+    white-space: pre-wrap
+}
+
+.markdown-section code,
+.markdown-section pre {
+    background-color: #f8f8f8;
+    font-family: Roboto Mono, Monaco, courier, monospace
+}
+
+.markdown-section pre {
+    -moz-osx-font-smoothing: initial;
+    -webkit-font-smoothing: initial;
+    line-height: 1.5rem;
+    margin: 1.2em 0;
+    overflow: auto;
+    padding: 0 1.4rem;
+    position: relative;
+    word-wrap: normal
+}
+
+.token.cdata,
+.token.comment,
+.token.doctype,
+.token.prolog {
+    color: #8e908c
+}
+
+.token.namespace {
+    opacity: .7
+}
+
+.token.boolean,
+.token.number {
+    color: #c76b29
+}
+
+.token.punctuation {
+    color: #525252
+}
+
+.token.property {
+    color: #c08b30
+}
+
+.token.tag {
+    color: #2973b7
+}
+
+.token.string {
+    color: var(--theme-color, #42b983)
+}
+
+.token.selector {
+    color: #6679cc
+}
+
+.token.attr-name {
+    color: #2973b7
+}
+
+.language-css .token.string,
+.style .token.string,
+.token.entity,
+.token.url {
+    color: #22a2c9
+}
+
+.token.attr-value,
+.token.control,
+.token.directive,
+.token.unit {
+    color: var(--theme-color, #42b983)
+}
+
+.token.keyword {
+    color: #e96900
+}
+
+.token.atrule,
+.token.regex,
+.token.statement {
+    color: #22a2c9
+}
+
+.token.placeholder,
+.token.variable {
+    color: #3d8fd1
+}
+
+.token.deleted {
+    text-decoration: line-through
+}
+
+.token.inserted {
+    border-bottom: 1px dotted #202746;
+    text-decoration: none
+}
+
+.token.italic {
+    font-style: italic
+}
+
+.token.bold,
+.token.important {
+    font-weight: 700
+}
+
+.token.important {
+    color: #c94922
+}
+
+.token.entity {
+    cursor: help
+}
+
+.markdown-section pre>code {
+    -moz-osx-font-smoothing: initial;
+    -webkit-font-smoothing: initial;
+    background-color: #f8f8f8;
+    border-radius: 2px;
+    color: #525252;
+    display: block;
+    font-family: Roboto Mono, Monaco, courier, monospace;
+    font-size: .8rem;
+    line-height: inherit;
+    margin: 0 2px;
+    max-width: inherit;
+    overflow: inherit;
+    padding: 2.2em 5px;
+    white-space: inherit
+}
+
+.markdown-section code:after,
+.markdown-section code:before {
+    letter-spacing: .05rem
+}
+
+code .token {
+    -moz-osx-font-smoothing: initial;
+    -webkit-font-smoothing: initial;
+    min-height: 1.5rem
+}
+
+pre:after {
+    color: #ccc;
+    content: attr(data-lang);
+    font-size: .6rem;
+    font-weight: 600;
+    height: 15px;
+    line-height: 15px;
+    padding: 5px 10px 0;
+    position: absolute;
+    right: 0;
+    text-align: right;
+    top: 0
+}
+
+.loading_div {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    z-index: 10;
+    background-color: rgba(255, 255, 255, 0.5);
+    text-align: center;
+}
+.loading_div img {
+    position: relative;
+    top: calc(50% - 64px);
+}
+
+.hidden {
+    display: none;
+}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
zoom-image.min.js


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov