diff --git a/docs/assets/css/main-min.css b/docs/assets/css/main-min.css index 3a423d1f..5d65ebcf 100644 --- a/docs/assets/css/main-min.css +++ b/docs/assets/css/main-min.css @@ -1 +1 @@ -:root{--theme-color:hsl(204,90%,45%)}*{font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif}a{text-decoration:none !important}img{z-index:51}.product_pic img{width:30%}@media screen and (max-width:768px){.product_pic img{width:100%}}#mb_header{display:none}.el-menu-vertical-demo:not(.el-menu--collapse){width:200px;min-height:400px}#mb_header{position:fixed;top:50%;transform:translateY(-50%);box-shadow:-5px 1px 20px 0 #e7e5e5;z-index:999;border-radius:10px;right:0}#mb_header .el-menu{border-right:0;border-radius:10px}#mb_header .el-submenu__title,.el-menu-item{padding:0 10px !important;text-align:center}#mb_header .el-menu-item div{padding:0 10px !important}#mb_header .el-menu-item li{height:30px}#pc_header{position:fixed;z-index:999;left:0;top:0;right:0;background-color:white;box-shadow:0 0 10px #ddd;padding:0 20px;display:flex;justify-content:space-between}#pc_header .el-menu{display:inline-block;padding:10px 0 0 0;border-bottom:0}.markdown-section{max-width:75%;margin-top:50px}.markdown-section a{color:hsl(211,100%,50%)}body[data-page="en/quick_start/m5stickc/m5stickc_quick_start.md"] article.markdown-section{max-width:100%}body[data-page="zh_CN/quick_start/m5stickc/m5stickc_quick_start.md"] article.markdown-section{max-width:100%}.pic{width:30%}.video_size{width:50%}.uiflow_banner{position:relative}.row a{color:white;text-decoration:none}.row a:hover{color:white;text-decoration:none}.uiflow_p{height:100px}.item{width:150px;margin-right:10px;margin-top:10px;margin-bottom:10px;display:inline-block;position:relative;cursor:pointer;transition:box-shadow .3s;text-decoration:none;background-color:white}.related_links{position:fixed;top:35%;right:0;z-index:900;width:50px}.related_links a{display:block;width:50px;height:50px;text-decoration:none;transition:all .25s ease;float:right}.related_links a:first-child{border-top-left-radius:3px;background-color:#76c5f0}.related_links a:nth-child(2){background-color:#007cc2}.related_links a:nth-child(3){background-color:#dc214c}.related_links a:nth-child(4){background-color:#1f1a17}.related_links a:nth-child(5){border-bottom-left-radius:3px}.related_links a:hover{width:90px}.related_links a img{position:relative;top:5px;left:5px;width:40px}.related_links a:nth-child(4) img{top:3.5px;left:3.5px;width:43px}.related_links div img{position:relative;top:10px;left:0;width:50px;transition:all .25s ease}.related_links div img:hover{transform:scale(1.05)}@media screen and (max-width:768px){.related_links{display:none}}.item-title{white-space:nowrap;text-align:center;margin-top:0 !important;margin-bottom:28px !important}.item a{color:black;text-decoration:none}.item a:hover{text-decoration:none}.dropdown{display:inline-block;transition:all .25s ease;color:#343a40}.dropdown div{position:absolute;overflow:hidden;height:0;background-color:#fff;transition:all .25s ease;left:-50px;text-align:center;top:40px;z-index:1001;min-width:10rem}.dropdown:hover{box-shadow:0 2px 0 0 #007bff;color:#007bff}.dropdown:hover div{padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;list-style:none;background-clip:padding-box;height:max-content;box-shadow:0 17px 18px 0 #f0f0f0}.dropdown div a:hover{color:#007bff !important}.dropdown div a:active{background-color:#ccc !important}.mask{position:absolute;top:0;left:0;width:150px;height:100%;background:rgba(0,0,0,0.28);color:#fff;opacity:0}.mask h3{text-align:center}.product_page .item:hover{transform:scale(1.3);transition:all .2s ease;z-index:31 !important;box-shadow:0 0 10px #6ab2ff}.product_page .item:hover .quickstart_btn{display:block}.mask-btn1{position:relative;top:30px;border:0;width:90px;background-color:#007bffc7;color:white}.product_list div.btn-group-vertical{display:none}.product_list:hover div.btn-group-vertical{position:fixed;display:block;margin:0;z-index:9999}.item .mask_sku{position:absolute;bottom:0;width:100%;text-align:center;font-size:19px}main>.content{margin:0}div.card-img-overlay{background-color:rgba(0,0,0,0.6)}div.card-img-overlay:hover{background-color:rgba(0,0,0,0.25);color:blue !important}.banner{width:100%;height:300px;background-color:#fffbff}.product_page{margin-left:60px;margin-top:100px}.search{position:fixed;z-index:2000;top:22px;left:260px;padding:0 20px}.search input{border-radius:40px;border:0;outline:0;background:#eee;width:240px;height:38px;padding:0 0 0 20px}.search .search-btn{position:absolute;top:10px;right:40px;border-radius:100px;width:30px;height:30px}.search i{position:absolute;top:6px;right:7px;font-size:18px}.search .search_point{background-color:#f7f7f7;margin:2px 22px;display:none;overflow-y:auto;max-height:300px;box-shadow:0 2px 0 0 #007bff;max-width:260px;z-index:2000}.search .search_point a{padding:4px 20px;display:block}.search .search_point a:hover{color:#007bff}body[data-page="index.md"] .search{display:inline-block}body[data-page="en/faq.md"] .search{display:inline-block}body[data-page="zh_CN/README.md"] .search{display:inline-block}body[data-page="zh_CN/faq.md"] .search{display:inline-block}body[data-page="index.md"] .markdown-section{margin-top:25px}body[data-page="zh_CN/README.md"] .markdown-section{margin-top:25px}@media screen and (max-width:768px){.dropdown{display:block}#mb_header{display:block}#pc_header{display:none}.markdown-section{max-width:100%;margin-top:0;padding-left:45px;padding-right:45px}.banner div.card-img-overlay h4{font-size:1.3em;color:#fff;text-align:center}.banner{margin-left:8px;margin-right:0;width:130px}.item{width:130px;margin-left:5px;margin-right:5px;margin-top:10px;margin-bottom:10px;display:inline-block;position:relative;cursor:pointer;transition:box-shadow .3s;text-decoration:none}.uiflow_p{height:auto}.pc-navigation{display:none}.product_page{margin-left:0;margin-top:0}.mb-navigation{z-index:9999;position:fixed;top:0;left:0;right:50px;height:50px;color:#343a40;border-radius:0;background:white;line-height:inherit;display:block;box-shadow:-12px -1px 10px #888}.nav-content{position:fixed;top:50px;left:0;color:white;right:0;z-index:999}.search{position:fixed;top:15px !important;left:50%;transform:translateX(-50%)}.video_size{width:100%}}@media screen and (max-width:768px){.pic{width:50%}}mark{background-color:#2673ffe0;color:white;border-radius:1px}.faq-class{border:1px solid #d9d9d9;margin-bottom:1.5%;background-color:#d9d9d9;padding:20px;border-radius:10px;height:auto}.faq-class h5{color:#666 !important;font-size:16px !important;position:relative;margin:0 !important}.search-tips{border:1px solid #d9d9d9;margin-bottom:1.5%;background-color:#d9d9d9;padding:20px;border-radius:10px;height:auto}.search-tips h5{color:#666 !important;font-size:16px !important;position:relative;margin:0 !important}.faq-item{border:1px solid #d9d9d9;margin-bottom:1.5%;background-color:#fff;padding:20px;border-radius:10px;height:auto}.faq-title{color:#666 !important;font-size:16px !important;position:relative;margin:0 !important;padding-right:30px !important}.faq-title.open{max-height:600px}.faq-title::before{background-color:#007bff;content:"";width:20px;height:20px;border-radius:20px;position:absolute;right:0;top:0;bottom:0;margin:auto}.faq-button{height:0;margin:0 !important}.faq-button::after{background-color:white;content:"";width:12px;height:2px;position:absolute;top:0;right:4px;bottom:0;margin:auto;z-index:10}.faq-button::before{background-color:white;content:"";width:12px;height:2px;position:absolute;top:0;right:4px;bottom:0;margin:auto;transform:rotate(90deg);z-index:10}.faq-answer{border:0;outline:0;font-weight:400;max-height:0;overflow:auto;transition:max-height .35s ease}.faq-answer div{padding-top:30px;color:#666 !important}.faq-answer div span{display:block}.faq-item .faq-title.open+.faq-answer{max-height:600px}.faq-img{margin-top:20px;margin-bottom:20px;width:40%;display:inline-block}.cases-item{border:1px solid #d9d9d9;margin-bottom:1.5%;background-color:#fff;padding:20px;border-radius:10px;height:auto}.cases-title{color:#666 !important;font-size:16px !important;position:relative;margin:0 !important;padding-right:30px !important}.anchor-box{position:fixed;top:22%;left:50px;display:-webkit-flex;display:flex;flex-direction:column;z-index:50;width:max-content}.anchor-box img{width:30px;height:31px;margin-left:10px;margin-top:2px}.anchor-box svg{margin-left:10px;margin-top:2px}.anchor-box>a{display:-webkit-flex;display:flex;flex-direction:row;height:40px;width:180px;padding:2px 10px;text-decoration:none;outline:0;border:0;border-radius:25px;color:#fff !important;font-size:16px;line-height:1.2;transition:all .3s ease;background-color:#333;box-shadow:4px 4px 8px 0 #aeaeae;-moz-box-shadow:4px 4px 8px 0 #aeaeae;-webkit-box-shadow:4px 4px 8px 0 #aeaeae;margin-top:12px}.anchor-box>a:hover{background-color:#007aff !important;box-shadow:4px 4px 8px 0 #007aff5c !important;-moz-box-shadow:4px 4px 8px 0 #007aff5c !important;-webkit-box-shadow:4px 4px 8px 0 #007aff5c !important}.anchor-box span{width:100px;text-align:center;margin-left:6px;overflow:hidden;white-space:nowrap}.anchor-box svg{margin-left:12px;margin-top:4px}.anchor-active{background-color:#007aff !important;box-shadow:4px 4px 8px 0 #007aff5c !important;-moz-box-shadow:4px 4px 8px 0 #007aff5c !important;-webkit-box-shadow:4px 4px 8px 0 #007aff5c !important}.anchor-quiet{background-color:#333 !important;box-shadow:4px 4px 8px 0 #aeaeae !important;-moz-box-shadow:4px 4px 8px 0 #aeaeae !important;-webkit-box-shadow:4px 4px 8px 0 #aeaeae !important}@media screen and (max-width:1645px){.anchor-box{left:20px}}@media screen and (max-width:1460px){.anchor-box{left:0}}@media screen and (max-width:1300px){.anchor-box{left:-30px}.search{top:100px}}@media screen and (max-width:1180px){.anchor-box{left:-54px}#pc_header>a{display:none}}@media screen and (max-width:768px){.anchor-box{position:fixed;top:32%;left:auto;right:-120px;display:-webkit-flex;display:flex;flex-direction:column;z-index:9999;display:none}.anchor-active{float:left;transform:translateX(-100px) !important}.anchor-quiet{float:left;transform:translateX(0px) !important}}.easyloader-box{display:flex;flex-direction:row;width:80%}.easyloader-box>div{position:relative;width:50%;overflow:hidden}.easyloader-box img,video{width:100%}.easyloader-box p{margin:10px 25px;color:white}.easyloader-box p:last-child{overflow-y:scroll;height:20%;font-size:10px}.easyloader-mask{position:absolute;right:0;bottom:6px;height:100%;width:100%;background-color:black;opacity:.7;transition:all .3s;display:flex;flex-direction:column;justify-content:center}.easyloader-mask a{margin-top:50px;text-align:center}.video_play{bottom:-100%}.easyloader-btn{position:absolute;display:flex;flex-direction:row;justify-content:space-around;bottom:7%;width:100%;padding:0 20px}.easyloader-btn a{width:90px;text-align:center;padding:2px 10px;background-color:#007bff;color:white !important;border-radius:10px}.easyloader-btn a:hover{background-color:#45a9ff}@media screen and (max-width:768px){.easyloader-box{flex-direction:column;width:100%}.easyloader-box>div{width:100%}}.platform-box{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap}.platform-item{position:relative;overflow:hidden;margin:20px;box-shadow:0 0 5px 0 #dbdbdb;border-radius:15px}.platform-box>div:nth-of-type(1)::after{content:"";position:absolute;width:2px;height:450px;background-color:#d9d9d9;right:-22px;top:43px}.platform-item h3{position:absolute;top:50%;width:100%;text-align:center;font-size:20px;font-weight:normal;color:#fff;z-index:11}.platform-tag{position:absolute;top:50%;left:45%;width:150px;height:150px;margin:-60px 0 0 -60px;background:#333;opacity:.8;border-radius:50%;z-index:10;-webkit-transform:scale(1,1);-moz-transform:scale(1,1);transform:scale(1,1);-webkit-transition:all .3s;-moz-transition:all .3s;transition:all .5s cubic-bezier(0.23,0.53,0.22,0.93)}.platform-item a:hover .platform-tag{transform:scale(4.3,4.3)}@media screen and (max-width:768px){.platform-box>div:nth-of-type(1)::after{content:"";position:absolute;width:300px;height:2px;background-color:#d9d9d9;right:-30px;top:455px}}.markdown-section h1{font-family:Montserrat;font-weight:1000;font-size:48px;display:inline}.markdown-section h2{font-family:Montserrat;font-weight:600;font-size:25px;padding:0;padding-top:110px;margin-top:-70px}.markdown-section p{font-family:Montserrat}.product_sku_tag{margin-left:5px;margin-top:5px}table thead,table tr{border-top-width:1px;border-top-style:solid;border-top-color:#aabfdc}table{border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#aabfdc;border-top-width:1px;border-top-style:solid;border-top-color:#aabfdc;overflow:auto;display:table !important}table td,table th{padding:5px 10px;font-size:13px;font-family:Montserrat;color:#597da1 !important;border-color:hsl(212,42%,88%);min-width:50px}table tr:nth-child(even){background:#d3dfed !important}table tr:nth-child(odd){background:#FFF !important}@media screen and (max-width:768px){table{display:block !important;overflow:scroll}}.files_download{display:flex;flex-direction:row;justify-content:space-evenly;flex-wrap:wrap;margin:45px}.files_download .item{display:flex;justify-content:center;width:200px;box-shadow:4px 4px 7px 0 #cecece;transition:all .25s ease}.files_download .item:hover{transform:scale(1.2)}#tag_title{position:absolute;color:#fff;width:160px;font-size:14px;padding:4px;background:#007bffc7;border:solid 1px #e9f7f6;border-radius:5px;text-align:center;z-index:40}#tag_title::after{content:" ";position:absolute;top:50%;left:-18px;width:0;height:0;border-width:8px;border-style:solid;border-color:transparent #007bffc7 transparent transparent;transform:translateY(-50%)}.el-icon-loading{font-size:88px}[v-cloak]{display:none}#search_cover{z-index:1998;position:fixed;top:0;right:0;bottom:0;left:0;background-color:#00000087;overflow:scroll}#search_contant_box{margin:90px 15% 10% 15%;padding:50px 100px 50px 100px;background-color:#ffffffd6;overflow:scroll}#close_search{position:fixed;right:20%;font-size:30px;z-index:2000}@media screen and (max-width:768px){#search_contant_box{margin:0;padding:60px 20px 60px 20px;height:100%}#search_contant_box .el-tabs__header{margin-left:55px}#close_search{right:15px}}#product_result img{width:100%}.quickstart_btn{position:absolute;border:0;color:white;left:30px;bottom:38px;transform:scale(1);font-size:9px;display:none}.box-card .el-tag {margin-top: 5px;} +:root{--theme-color:hsl(204,90%,45%)}*{font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif}a{text-decoration:none !important}img{z-index:51}.product_pic img{width:30%}@media screen and (max-width:768px){.product_pic img{width:100%}}#mb_header{display:none}.el-menu-vertical-demo:not(.el-menu--collapse){width:200px;min-height:400px}#mb_header{position:fixed;top:50%;transform:translateY(-50%);box-shadow:-5px 1px 20px 0 #e7e5e5;z-index:999;border-radius:10px;right:0}#mb_header .el-menu{border-right:0;border-radius:10px}#mb_header .el-submenu__title,.el-menu-item{padding:0 10px !important;text-align:center}#mb_header .el-menu-item div{padding:0 10px !important}#mb_header .el-menu-item li{height:30px}#pc_header{position:fixed;z-index:999;left:0;top:0;right:0;background-color:white;box-shadow:0 0 10px #ddd;padding:0 20px;display:flex;justify-content:space-between}#pc_header .el-menu{display:inline-block;padding:10px 0 0 0;border-bottom:0}.markdown-section{max-width:75%;margin-top:50px}.markdown-section a{color:hsl(211,100%,50%)}body[data-page="en/quick_start/m5stickc/m5stickc_quick_start.md"] article.markdown-section{max-width:100%}body[data-page="zh_CN/quick_start/m5stickc/m5stickc_quick_start.md"] article.markdown-section{max-width:100%}body[data-page="en/quick_start/m5stickv/m5stickv_quick_start.md"] article.markdown-section{max-width:100%}body[data-page="zh_CN/quick_start/m5stickv/m5stickv_quick_start.md"] article.markdown-section{max-width:100%}.pic{width:30%}.video_size{width:50%}.uiflow_banner{position:relative}.row a{color:white;text-decoration:none}.row a:hover{color:white;text-decoration:none}.uiflow_p{height:100px}.item{width:150px;margin-right:10px;margin-top:10px;margin-bottom:10px;display:inline-block;position:relative;cursor:pointer;transition:box-shadow .3s;text-decoration:none;background-color:white}.related_links{position:fixed;top:35%;right:0;z-index:900;width:50px}.related_links a{display:block;width:50px;height:50px;text-decoration:none;transition:all .25s ease;float:right}.related_links a:first-child{border-top-left-radius:3px;background-color:#76c5f0}.related_links a:nth-child(2){background-color:#007cc2}.related_links a:nth-child(3){background-color:#dc214c}.related_links a:nth-child(4){background-color:#1f1a17}.related_links a:nth-child(5){border-bottom-left-radius:3px}.related_links a:hover{width:90px}.related_links a img{position:relative;top:5px;left:5px;width:40px}.related_links a:nth-child(4) img{top:3.5px;left:3.5px;width:43px}.related_links div img{position:relative;top:10px;left:0;width:50px;transition:all .25s ease}.related_links div img:hover{transform:scale(1.05)}@media screen and (max-width:768px){.related_links{display:none}}.item-title{white-space:nowrap;text-align:center;margin-top:0 !important;margin-bottom:28px !important}.item a{color:black;text-decoration:none}.item a:hover{text-decoration:none}.dropdown{display:inline-block;transition:all .25s ease;color:#343a40}.dropdown div{position:absolute;overflow:hidden;height:0;background-color:#fff;transition:all .25s ease;left:-50px;text-align:center;top:40px;z-index:1001;min-width:10rem}.dropdown:hover{box-shadow:0 2px 0 0 #007bff;color:#007bff}.dropdown:hover div{padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;list-style:none;background-clip:padding-box;height:max-content;box-shadow:0 17px 18px 0 #f0f0f0}.dropdown div a:hover{color:#007bff !important}.dropdown div a:active{background-color:#ccc !important}.mask{position:absolute;top:0;left:0;width:150px;height:100%;background:rgba(0,0,0,0.28);color:#fff;opacity:0}.mask h3{text-align:center}.product_page .item:hover{transform:scale(1.3);transition:all .2s ease;z-index:31 !important;box-shadow:0 0 10px #6ab2ff}.product_page .item:hover .quickstart_btn{display:block}.mask-btn1{position:relative;top:30px;border:0;width:90px;background-color:#007bffc7;color:white}.product_list div.btn-group-vertical{display:none}.product_list:hover div.btn-group-vertical{position:fixed;display:block;margin:0;z-index:9999}.item .mask_sku{position:absolute;bottom:0;width:100%;text-align:center;font-size:19px}main>.content{margin:0}div.card-img-overlay{background-color:rgba(0,0,0,0.6)}div.card-img-overlay:hover{background-color:rgba(0,0,0,0.25);color:blue !important}.banner{width:100%;height:300px;background-color:#fffbff}.product_page{margin-left:60px;margin-top:100px}.search{position:fixed;z-index:2000;top:22px;left:260px;padding:0 20px}.search input{border-radius:40px;border:0;outline:0;background:#eee;width:240px;height:38px;padding:0 0 0 20px}.search .search-btn{position:absolute;top:10px;right:40px;border-radius:100px;width:30px;height:30px}.search i{position:absolute;top:6px;right:7px;font-size:18px}.search .search_point{background-color:#f7f7f7;margin:2px 22px;display:none;overflow-y:auto;max-height:300px;box-shadow:0 2px 0 0 #007bff;max-width:260px;z-index:2000}.search .search_point a{padding:4px 20px;display:block}.search .search_point a:hover{color:#007bff}body[data-page="index.md"] .search{display:inline-block}body[data-page="en/faq.md"] .search{display:inline-block}body[data-page="zh_CN/README.md"] .search{display:inline-block}body[data-page="zh_CN/faq.md"] .search{display:inline-block}body[data-page="index.md"] .markdown-section{margin-top:25px}body[data-page="zh_CN/README.md"] .markdown-section{margin-top:25px}@media screen and (max-width:768px){.dropdown{display:block}#mb_header{display:block}#pc_header{display:none}.markdown-section{max-width:100%;margin-top:0;padding-left:45px;padding-right:45px}.banner div.card-img-overlay h4{font-size:1.3em;color:#fff;text-align:center}.banner{margin-left:8px;margin-right:0;width:130px}.item{width:130px;margin-left:5px;margin-right:5px;margin-top:10px;margin-bottom:10px;display:inline-block;position:relative;cursor:pointer;transition:box-shadow .3s;text-decoration:none}.uiflow_p{height:auto}.pc-navigation{display:none}.product_page{margin-left:0;margin-top:0}.mb-navigation{z-index:9999;position:fixed;top:0;left:0;right:50px;height:50px;color:#343a40;border-radius:0;background:white;line-height:inherit;display:block;box-shadow:-12px -1px 10px #888}.nav-content{position:fixed;top:50px;left:0;color:white;right:0;z-index:999}.search{position:fixed;top:15px !important;left:50%;transform:translateX(-50%)}.video_size{width:100%}}@media screen and (max-width:768px){.pic{width:50%}}mark{background-color:#2673ffe0;color:white;border-radius:1px}.faq-class{border:1px solid #d9d9d9;margin-bottom:1.5%;background-color:#d9d9d9;padding:20px;border-radius:10px;height:auto}.faq-class h5{color:#666 !important;font-size:16px !important;position:relative;margin:0 !important}.search-tips{border:1px solid #d9d9d9;margin-bottom:1.5%;background-color:#d9d9d9;padding:20px;border-radius:10px;height:auto}.search-tips h5{color:#666 !important;font-size:16px !important;position:relative;margin:0 !important}.faq-item{border:1px solid #d9d9d9;margin-bottom:1.5%;background-color:#fff;padding:20px;border-radius:10px;height:auto}.faq-title{color:#666 !important;font-size:16px !important;position:relative;margin:0 !important;padding-right:30px !important}.faq-title.open{max-height:600px}.faq-title::before{background-color:#007bff;content:"";width:20px;height:20px;border-radius:20px;position:absolute;right:0;top:0;bottom:0;margin:auto}.faq-button{height:0;margin:0 !important}.faq-button::after{background-color:white;content:"";width:12px;height:2px;position:absolute;top:0;right:4px;bottom:0;margin:auto;z-index:10}.faq-button::before{background-color:white;content:"";width:12px;height:2px;position:absolute;top:0;right:4px;bottom:0;margin:auto;transform:rotate(90deg);z-index:10}.faq-answer{border:0;outline:0;font-weight:400;max-height:0;overflow:auto;transition:max-height .35s ease}.faq-answer div{padding-top:30px;color:#666 !important}.faq-answer div span{display:block}.faq-item .faq-title.open+.faq-answer{max-height:600px}.faq-img{margin-top:20px;margin-bottom:20px;width:40%;display:inline-block}.cases-item{border:1px solid #d9d9d9;margin-bottom:1.5%;background-color:#fff;padding:20px;border-radius:10px;height:auto}.cases-title{color:#666 !important;font-size:16px !important;position:relative;margin:0 !important;padding-right:30px !important}.anchor-box{position:fixed;top:22%;left:50px;display:-webkit-flex;display:flex;flex-direction:column;z-index:50;width:max-content}.anchor-box img{width:30px;height:31px;margin-left:10px;margin-top:2px}.anchor-box svg{margin-left:10px;margin-top:2px}.anchor-box>a{display:-webkit-flex;display:flex;flex-direction:row;height:40px;width:180px;padding:2px 10px;text-decoration:none;outline:0;border:0;border-radius:25px;color:#fff !important;font-size:16px;line-height:1.2;transition:all .3s ease;background-color:#333;box-shadow:4px 4px 8px 0 #aeaeae;-moz-box-shadow:4px 4px 8px 0 #aeaeae;-webkit-box-shadow:4px 4px 8px 0 #aeaeae;margin-top:12px}.anchor-box>a:hover{background-color:#007aff !important;box-shadow:4px 4px 8px 0 #007aff5c !important;-moz-box-shadow:4px 4px 8px 0 #007aff5c !important;-webkit-box-shadow:4px 4px 8px 0 #007aff5c !important}.anchor-box span{width:100px;text-align:center;margin-left:6px;overflow:hidden;white-space:nowrap}.anchor-box svg{margin-left:12px;margin-top:4px}.anchor-active{background-color:#007aff !important;box-shadow:4px 4px 8px 0 #007aff5c !important;-moz-box-shadow:4px 4px 8px 0 #007aff5c !important;-webkit-box-shadow:4px 4px 8px 0 #007aff5c !important}.anchor-quiet{background-color:#333 !important;box-shadow:4px 4px 8px 0 #aeaeae !important;-moz-box-shadow:4px 4px 8px 0 #aeaeae !important;-webkit-box-shadow:4px 4px 8px 0 #aeaeae !important}@media screen and (max-width:1645px){.anchor-box{left:20px}}@media screen and (max-width:1460px){.anchor-box{left:0}}@media screen and (max-width:1300px){.anchor-box{left:-30px}.search{top:100px}}@media screen and (max-width:1180px){.anchor-box{left:-54px}#pc_header>a{display:none}}@media screen and (max-width:768px){.anchor-box{position:fixed;top:32%;left:auto;right:-120px;display:-webkit-flex;display:flex;flex-direction:column;z-index:9999;display:none}.anchor-active{float:left;transform:translateX(-100px) !important}.anchor-quiet{float:left;transform:translateX(0px) !important}}.easyloader-box{display:flex;flex-direction:row;width:80%}.easyloader-box>div{position:relative;width:50%;overflow:hidden}.easyloader-box img,video{width:100%}.easyloader-box p{margin:10px 25px;color:white}.easyloader-box p:last-child{overflow-y:scroll;height:20%;font-size:10px}.easyloader-mask{position:absolute;right:0;bottom:6px;height:100%;width:100%;background-color:black;opacity:.7;transition:all .3s;display:flex;flex-direction:column;justify-content:center}.easyloader-mask a{margin-top:50px;text-align:center}.video_play{bottom:-100%}.easyloader-btn{position:absolute;display:flex;flex-direction:row;justify-content:space-around;bottom:7%;width:100%;padding:0 20px}.easyloader-btn a{width:90px;text-align:center;padding:2px 10px;background-color:#007bff;color:white !important;border-radius:10px}.easyloader-btn a:hover{background-color:#45a9ff}@media screen and (max-width:768px){.easyloader-box{flex-direction:column;width:100%}.easyloader-box>div{width:100%}}.platform-box{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap}.platform-item{position:relative;overflow:hidden;margin:20px;box-shadow:0 0 5px 0 #dbdbdb;border-radius:15px;width:260px}.platform-box>div:nth-of-type(1)::after{content:"";position:absolute;width:2px;height:400px;background-color:#d9d9d9;right:-22px;top:43px}.platform-item h3{position:absolute;top:50%;width:100%;text-align:center;font-size:20px;font-weight:normal;color:#fff;z-index:11}.platform-tag{position:absolute;top:50%;left:45%;width:150px;height:150px;margin:-60px 0 0 -60px;background:#333;opacity:.8;border-radius:50%;z-index:10;-webkit-transform:scale(1,1);-moz-transform:scale(1,1);transform:scale(1,1);-webkit-transition:all .3s;-moz-transition:all .3s;transition:all .5s cubic-bezier(0.23,0.53,0.22,0.93)}.platform-item a:hover .platform-tag{transform:scale(4.3,4.3)}@media screen and (max-width:768px){.platform-box>div:nth-of-type(1)::after{content:"";position:absolute;width:300px;height:2px;background-color:#d9d9d9;right:-30px;top:455px}}.markdown-section h1{font-family:Montserrat;font-weight:1000;font-size:48px;display:inline}.markdown-section h2{font-family:Montserrat;font-weight:600;font-size:25px;padding:0;padding-top:110px;margin-top:-70px}.markdown-section p{font-family:Montserrat}.product_sku_tag{margin-left:5px;margin-top:5px}table thead,table tr{border-top-width:1px;border-top-style:solid;border-top-color:#aabfdc}table{border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#aabfdc;border-top-width:1px;border-top-style:solid;border-top-color:#aabfdc;overflow:auto;display:table !important}table td,table th{padding:5px 10px;font-size:13px;font-family:Montserrat;color:#597da1 !important;border-color:hsl(212,42%,88%);min-width:50px}table tr:nth-child(even){background:#d3dfed !important}table tr:nth-child(odd){background:#FFF !important}@media screen and (max-width:768px){table{display:block !important;overflow:scroll}}.files_download{display:flex;flex-direction:row;justify-content:space-evenly;flex-wrap:wrap;margin:45px}.files_download .item{display:flex;justify-content:center;width:200px;box-shadow:4px 4px 7px 0 #cecece;transition:all .25s ease}.files_download .item:hover{transform:scale(1.2)}#tag_title{position:absolute;color:#fff;width:160px;font-size:14px;padding:4px;background:#007bffc7;border:solid 1px #e9f7f6;border-radius:5px;text-align:center;z-index:40}#tag_title::after{content:" ";position:absolute;top:50%;left:-18px;width:0;height:0;border-width:8px;border-style:solid;border-color:transparent #007bffc7 transparent transparent;transform:translateY(-50%)}.el-icon-loading{font-size:88px}[v-cloak]{display:none}#search_cover{z-index:1998;position:fixed;top:0;right:0;bottom:0;left:0;background-color:#00000087;overflow:scroll}#search_contant_box{margin:90px 15% 10% 15%;padding:50px 100px 50px 100px;background-color:#ffffffd6;overflow:scroll}#close_search{position:fixed;right:20%;font-size:30px;z-index:2000}@media screen and (max-width:768px){#search_contant_box{margin:0;padding:60px 20px 60px 20px;height:100%}#search_contant_box .el-tabs__header{margin-left:55px}#close_search{right:15px}}#product_result img{width:100%}.quickstart_btn{position:absolute;border:0;color:white;left:30px;bottom:38px;transform:scale(1);font-size:9px;display:none}.box-card .el-tag{margin-top:5px} diff --git a/docs/assets/css/main.css b/docs/assets/css/main.css index e1b1edb5..87bb022e 100755 --- a/docs/assets/css/main.css +++ b/docs/assets/css/main.css @@ -108,6 +108,14 @@ body[data-page="zh_CN/quick_start/m5stickc/m5stickc_quick_start.md"] article.mar max-width: 100%; } +body[data-page="en/quick_start/m5stickv/m5stickv_quick_start.md"] article.markdown-section { + max-width: 100%; +} + +body[data-page="zh_CN/quick_start/m5stickv/m5stickv_quick_start.md"] article.markdown-section { + max-width: 100%; +} + .pic { width: 30% @@ -929,13 +937,14 @@ mark { margin: 20px; box-shadow: 0px 0px 5px 0px #dbdbdb; border-radius: 15px; + width: 260px; } .platform-box > div:nth-of-type(1)::after{ content: ""; position: absolute; width: 2px; - height: 450px; + height: 400px; background-color: #d9d9d9; right: -22px; top: 43px; diff --git a/docs/assets/img/m5stickv_quickstart_cn.webp b/docs/assets/img/m5stickv_quickstart_cn.webp new file mode 100644 index 00000000..864ab3e9 Binary files /dev/null and b/docs/assets/img/m5stickv_quickstart_cn.webp differ diff --git a/docs/assets/img/m5stickv_quickstart_en.webp b/docs/assets/img/m5stickv_quickstart_en.webp new file mode 100644 index 00000000..baa5b144 Binary files /dev/null and b/docs/assets/img/m5stickv_quickstart_en.webp differ diff --git a/docs/assets/img/maixpy-card.webp b/docs/assets/img/maixpy-card.webp new file mode 100644 index 00000000..980f9de1 Binary files /dev/null and b/docs/assets/img/maixpy-card.webp differ diff --git a/docs/assets/img/product_pics/module/gps/module_gps_note01.webp b/docs/assets/img/product_pics/module/gps/module_gps_note01.webp new file mode 100644 index 00000000..75b41d2f Binary files /dev/null and b/docs/assets/img/product_pics/module/gps/module_gps_note01.webp differ diff --git a/docs/assets/img/quick_start/v_function/apriltag_code.webp b/docs/assets/img/quick_start/v_function/apriltag_code.webp new file mode 100644 index 00000000..4350a207 Binary files /dev/null and b/docs/assets/img/quick_start/v_function/apriltag_code.webp differ diff --git a/docs/assets/img/quick_start/v_function/bar_code.webp b/docs/assets/img/quick_start/v_function/bar_code.webp new file mode 100644 index 00000000..96d5e82f Binary files /dev/null and b/docs/assets/img/quick_start/v_function/bar_code.webp differ diff --git a/docs/assets/img/quick_start/v_function/datamatrix_code.webp b/docs/assets/img/quick_start/v_function/datamatrix_code.webp new file mode 100644 index 00000000..214bc86c Binary files /dev/null and b/docs/assets/img/quick_start/v_function/datamatrix_code.webp differ diff --git a/docs/assets/img/quick_start/v_function/face_detect.webp b/docs/assets/img/quick_start/v_function/face_detect.webp new file mode 100644 index 00000000..26d0dafd Binary files /dev/null and b/docs/assets/img/quick_start/v_function/face_detect.webp differ diff --git a/docs/assets/img/quick_start/v_function/face_detect_example_01.webp b/docs/assets/img/quick_start/v_function/face_detect_example_01.webp new file mode 100644 index 00000000..f3c56cb9 Binary files /dev/null and b/docs/assets/img/quick_start/v_function/face_detect_example_01.webp differ diff --git a/docs/assets/img/quick_start/v_function/face_detect_example_02.webp b/docs/assets/img/quick_start/v_function/face_detect_example_02.webp new file mode 100644 index 00000000..318f5a4c Binary files /dev/null and b/docs/assets/img/quick_start/v_function/face_detect_example_02.webp differ diff --git a/docs/assets/img/quick_start/v_function/qr_code.webp b/docs/assets/img/quick_start/v_function/qr_code.webp new file mode 100644 index 00000000..de4b1fad Binary files /dev/null and b/docs/assets/img/quick_start/v_function/qr_code.webp differ diff --git a/docs/assets/img/v-function-card.webp b/docs/assets/img/v-function-card.webp new file mode 100644 index 00000000..82de08e9 Binary files /dev/null and b/docs/assets/img/v-function-card.webp differ diff --git a/docs/assets/img/v-training-card.webp b/docs/assets/img/v-training-card.webp new file mode 100644 index 00000000..e49acb1d Binary files /dev/null and b/docs/assets/img/v-training-card.webp differ diff --git a/docs/assets/js/custom.js b/docs/assets/js/custom.js index 67d77acc..9cd16c1a 100644 --- a/docs/assets/js/custom.js +++ b/docs/assets/js/custom.js @@ -603,15 +603,17 @@ function isSupportWebp() { function img_zoom() { $('#main img').on('click',function(){ - window.zoom_image.url = this.src; - window.zoom_image.srcList.push(this.src); - for(var i=0 ; i<$('#main img').length;i++){ - if(window.zoom_image.srcList.indexOf($('#main img')[i].src) == -1){ - window.zoom_image.srcList.push($('#main img')[i].src); + if(this.dataset.noZoom !=''){ + window.zoom_image.url = this.src; + window.zoom_image.srcList.push(this.src); + for(var i=0 ; i<$('#main img').length;i++){ + if(window.zoom_image.srcList.indexOf($('#main img')[i].src) == -1){ + window.zoom_image.srcList.push($('#main img')[i].src); + } } + window.zoom_image.show = true; + window.zoom_image.stopScroll(); } - window.zoom_image.show = true; - window.zoom_image.stopScroll(); }) } diff --git a/docs/assets/js/custom.min.js b/docs/assets/js/custom.min.js index ab291c39..fc943542 100644 --- a/docs/assets/js/custom.min.js +++ b/docs/assets/js/custom.min.js @@ -56,8 +56,8 @@ if(page_url.indexOf(/zh_CN/)!=-1){change_title('zh_CN');} if(page_url.indexOf(/ja/)!=-1){change_title('ja');}} function isSupportWebp(){if(document.createElement('canvas').toDataURL('image/webp',0.5).indexOf('data:image/webp')===0){return true;} use_jpg();} -function img_zoom(){$('#main img').on('click',function(){window.zoom_image.url=this.src;window.zoom_image.srcList.push(this.src);for(var i=0;i<$('#main img').length;i++){if(window.zoom_image.srcList.indexOf($('#main img')[i].src)==-1){window.zoom_image.srcList.push($('#main img')[i].src);}} -window.zoom_image.show=true;window.zoom_image.stopScroll();})} +function img_zoom(){$('#main img').on('click',function(){if(this.dataset.noZoom!=''){window.zoom_image.url=this.src;window.zoom_image.srcList.push(this.src);for(var i=0;i<$('#main img').length;i++){if(window.zoom_image.srcList.indexOf($('#main img')[i].src)==-1){window.zoom_image.srcList.push($('#main img')[i].src);}} +window.zoom_image.show=true;window.zoom_image.stopScroll();}})} function page_move(divId){try{var t=$("#"+divId).offset().top;$('html, body').animate({scrollTop:(t-100)},500);}catch(err){}} window.onhashchange=page_loading page_loading();function creat_pdf(){window.header.loading(window.header.pdf_notify);window.header.$notify({title:'M5Stack-Docs',message:window.header.pdf_notify,offset:150});$('html, body').animate({scrollTop:0},0);$(".anchor-box").css("display","none");$(".related_links").css("display","none");$(".easyloader-box").css("display","none");var target=document.getElementsByTagName('body');html2canvas(target,{useCORS:true,logging:true,scale:2,background:'#FFFFFF',onrendered:function(canvas){var contentWidth=canvas.width;var contentHeight=canvas.height;var pageHeight=contentWidth/592.28*841.89;var leftHeight=contentHeight;var position=0;var imgWidth=595.28;var imgHeight=592.28/contentWidth*contentHeight;var pageData=canvas.toDataURL('image/jpeg',1.0);var pdf=new jsPDF('','pt','a4');if(leftHeight0){pdf.addImage(pageData,'JPEG',0,position,imgWidth,imgHeight) diff --git a/docs/en/module/gps.md b/docs/en/module/gps.md index 3f4a285b..f7d8ffe1 100644 --- a/docs/en/module/gps.md +++ b/docs/en/module/gps.md @@ -20,7 +20,7 @@ If you want to Change the uart baudrate,please check here ( [u-center-just-for-W *UART protocol: baud rate (default is 9600bps), data bit (8 bits), start bit (1 bit), stop bit (1 bit), Parity (none)* - + ?> **M5Stack Fire** has occupied GPIO16 / 17 to connect with the PSRAM by default, it's conflict with TXD / RXD (GPIO16, GPIO17) of GPS module. Therefore, when using the GPS module with the M5Stack Fire, you might have to cut the TXD and RXD from GPS module and wire fly to another set of UART pin diff --git a/docs/en/quick_start/m5stickv/m5stickv_quick_start.md b/docs/en/quick_start/m5stickv/m5stickv_quick_start.md index 1009cca0..631c612d 100644 --- a/docs/en/quick_start/m5stickv/m5stickv_quick_start.md +++ b/docs/en/quick_start/m5stickv/m5stickv_quick_start.md @@ -1,249 +1,26 @@ -# M5StickV Quick Start {docsify-ignore-all} - -## EasyLoader - ->EasyLoader is a concise and fast program writer, which has a built-in case program related to the product. It can be burned to the main control by simple steps to perform a series of function verification. - -
-
-
-
- Windows - -
-
-
- -
- - -

Description:

-

Equipped with Maixpy firmware, test camera, screen graphics display function, and then press the HOME button to turn on the rear fill light.

-
-
+ - -## Download - -> Users who use an operating system other than Windows or who need to specify a burning file can use **Kflash** for firmware burning. Click the link below to download the firmware. - - - - -## Flash - ->1. Click and download the right Kflash_GUI burning tool base on your operating system. - - - ->2. Connect the device to the computer through the Type-C data cable, double-click to open the burning tool **Kflash_GUI** application, select the corresponding device port, development board type (M5StickV), firmware program, baud rate. Click to download , start burning. - - - - -### Kflash - ->3.For people who used to operate by using shell command, you can choose Kflash as your firmware burning tool.[Click for more detail](https://github.com/kendryte/kflash.py) - - -## Serial-Tool - ->1. You will need a serial debugging tool for programming M5StickV, you can use Putty [in here](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html), to be your serial debugging tool, click here to visit Putty resource page, download and install the exact Putty base on your operating system. - ->2. Run Putty, connect M5StickV to your PC, in Putty, set COM number, baud rate, click "open", by now the connect process should start.(you can check the COM number in device manager on your PC) - - - - - - -> When connected, it will automatically enter Maixpy UI. Now the device is runing the default code, you can terminate it by "Ctrl+C". - - - - -## Hello World - ->Type in the following code, a display "hello world" will show on the screen . - -``` -import lcd - -lcd.init() -lcd.draw_string(100, 100, "hello world", lcd.RED, lcd.BLACK) - -``` - - -## Edit and Run the Code - -### Editting - - -> The language shell programm(REPL) is good for instant code validatation, it can be used at short code programming and validation. In real project where we will have massive amount of code, in that case we will need a Code Editor for better orgnization of the code files. - - ->An open source Editor [Micropython Editor(pye)](https://github.com/robert-hh/Micropython-Editor) is integrated inside MaixPy,which is convenient for us to manage the code. - - -function `os.listdir()` is for checking the files in current directory. - -With function pye("hello.py"), you can create new files and enter editing mode(if file exists, it will only enter editing mode). [Click for more](https://github.com/robert-hh/Micropython-Editor/blob/master/Pyboard%20Editor.pdf) - - -If editing finished, you can do `Ctrl+S` > `Enter` to save the script. `Ctrl+Q` to exit edit mode. - - -**Notice**:This editor has some requirements on the serial tool, key BackSpace has to be set as DEL function,or BackSpace will implement the same function as Ctrl+H(character replacement) - - -### File Execution - -Function `os.chdir()` is used for switching current directory to a certain directory, such as `os.chdir("/flash")` - -#### Solution 1: `import` - -Run `import hello` - -You can see the output: `hello maixpy` - -In this way, it is simple and handy, but there is something worth your attention, `import` can only be utilized once, the second time `import` won't work. If you need to use `import` mutiple times, please refer to solution 2 below - -#### Solution 2: `exec()` - -Use `exec()` function: - -```python -with open("hello.py") as f: - exec(f.read()) - -``` - -### Auto Run after Power On - -System will create a `boot.py` file at directory `/flash` or `/sd` , it will run this script after power on. Modifying this file will make the sustem run automatically. - -## MaixPy IDE - - -#### Download MaixPy IDE - -MaixPy IDE can easily realize real-time editing, uploading, execution, and real-time monitoring of camera images, file transfer and other functions. Use MaixPy IDE, because data compression and transmission require a part of resources, performance will be reduced, but this is a great development tool for developers who are not demanding in performance or who are in the debugging phase. - - - - - -#### Install MaixPy IDE - -Windows users can directly double-click the exe file to run the installer. - -Linux command line to run permissions, then execute commands - -`chmod +x maixpy-ide-linux-x86_64-0.2.2.run` - -`./maixpy-ide-linux-x86_64-0.2.2.run` - -#### Use MaixPy IDE - ->Run the MaixPy IDE, click on the toolbar, select the model of the development board. `Tool`-> `Select Board`-> `M5StickV` (Tools -> Select Development Board) - - - ->Click the Connect button in the lower left corner and select the correct connection port, click OK. - - - ->When the connection button changes from green to red, it has been connected successfully. You can edit the code in the edit box above. Click the Run button in the lower left corner to execute the code and verify it. - - - -## V-Training Document - -V-Training Document - -

V-Function

- -V-Function is a series of **visual recognition** function firmware developed by the M5Stack team for V series devices. Click the V-Funciton title to view the instructions. - - -**Video Tutorial** - - - - -## WS2812 - -The firmware has a built-in WS2812 RGB LED driver library. The following is a reference routine: - -``` -from modules import ws2812 -from fpioa_manager import * -fm.register(board_info.CONNEXT_A) -class_ws2812 = ws2812(board_info.CONNEXT_A,130) -r=0 -dir = True -while True: - if dir: - r += 1 - else: - r -= 1 - if r>=255: - r = 255 - dir = False - elif r<0: - r = 0 - dir = True - for i in range(130): - a = class_ws2812.set_led(i,(0,0,r)) - a=class_ws2812.display() -``` - - -## Example - -get Maixpy examples - -get more examples - -Github - - - diff --git a/docs/en/quick_start/m5stickv/m5stickv_quick_start_maixpy.md b/docs/en/quick_start/m5stickv/m5stickv_quick_start_maixpy.md new file mode 100644 index 00000000..32ba0f7e --- /dev/null +++ b/docs/en/quick_start/m5stickv/m5stickv_quick_start_maixpy.md @@ -0,0 +1,228 @@ +# M5StickV Maixpy Quick Start + +## EasyLoader + +>EasyLoader is a concise and fast program writer, which has a built-in case program related to the product. It can be burned to the main control by simple steps to perform a series of function verification. + +
+
+
+
+ Windows + +
+
+
+ +
+ + +

Description:

+

Equipped with Maixpy firmware, test camera, screen graphics display function, and then press the HOME button to turn on the rear fill light.

+
+
+
+ +## Firmware + +> Users who use an operating system other than Windows or who need to specify a burning file can use **Kflash** for firmware burning. Click the link below to download the firmware. + + + + +>1. Click and download the right Kflash_GUI burning tool base on your operating system. + + + +>2. Connect the device to the computer through the Type-C data cable, double-click to open the burning tool **Kflash_GUI** application, select the corresponding device port, development board type (M5StickV), firmware program, baud rate. Click to download , start burning. + + + + +### Kflash + +>3.For people who used to operate by using shell command, you can choose Kflash as your firmware burning tool.[Click for more detail](https://github.com/kendryte/kflash.py) + + +## Serial-Tool + +>1. You will need a serial debugging tool for programming M5StickV, you can use Putty [in here](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html), to be your serial debugging tool, click here to visit Putty resource page, download and install the exact Putty base on your operating system. + +>2. Run Putty, connect M5StickV to your PC, in Putty, set COM number, baud rate, click "open", by now the connect process should start.(you can check the COM number in device manager on your PC) + + + + + + +> When connected, it will automatically enter Maixpy UI. Now the device is runing the default code, you can terminate it by "Ctrl+C". + + + + +## Hello World + +>Type in the following code, a display "hello world" will show on the screen . + +``` +import lcd + +lcd.init() +lcd.draw_string(100, 100, "hello world", lcd.RED, lcd.BLACK) + +``` + + +## Edit and Run the Code + +### Editting + + +> The language shell programm(REPL) is good for instant code validatation, it can be used at short code programming and validation. In real project where we will have massive amount of code, in that case we will need a Code Editor for better orgnization of the code files. + + +>An open source Editor [Micropython Editor(pye)](https://github.com/robert-hh/Micropython-Editor) is integrated inside MaixPy,which is convenient for us to manage the code. + + +function `os.listdir()` is for checking the files in current directory. + +With function pye("hello.py"), you can create new files and enter editing mode(if file exists, it will only enter editing mode). [Click for more](https://github.com/robert-hh/Micropython-Editor/blob/master/Pyboard%20Editor.pdf) + + +If editing finished, you can do `Ctrl+S` > `Enter` to save the script. `Ctrl+Q` to exit edit mode. + + +**Notice**:This editor has some requirements on the serial tool, key BackSpace has to be set as DEL function,or BackSpace will implement the same function as Ctrl+H(character replacement) + + +### File Execution + +Function `os.chdir()` is used for switching current directory to a certain directory, such as `os.chdir("/flash")` + +#### Solution 1: `import` + +Run `import hello` + +You can see the output: `hello maixpy` + +In this way, it is simple and handy, but there is something worth your attention, `import` can only be utilized once, the second time `import` won't work. If you need to use `import` mutiple times, please refer to solution 2 below + +#### Solution 2: `exec()` + +Use `exec()` function: + +```python +with open("hello.py") as f: + exec(f.read()) + +``` + +### Auto Run after Power On + +System will create a `boot.py` file at directory `/flash` or `/sd` , it will run this script after power on. Modifying this file will make the sustem run automatically. + +## MaixPy IDE + + +#### Download MaixPy IDE + +MaixPy IDE can easily realize real-time editing, uploading, execution, and real-time monitoring of camera images, file transfer and other functions. Use MaixPy IDE, because data compression and transmission require a part of resources, performance will be reduced, but this is a great development tool for developers who are not demanding in performance or who are in the debugging phase. + +MaixPy IDE + +#### Install MaixPy IDE + +Windows users can directly double-click the exe file to run the installer. + +Linux command line to run permissions, then execute commands + +`chmod +x maixpy-ide-linux-x86_64-0.2.2.run` + +`./maixpy-ide-linux-x86_64-0.2.2.run` + +#### Use MaixPy IDE + +>Run the MaixPy IDE, click on the toolbar, select the model of the development board. `Tool`-> `Select Board`-> `M5StickV` (Tools -> Select Development Board) + + + +>Click the Connect button in the lower left corner and select the correct connection port, click OK. + + + +>When the connection button changes from green to red, it has been connected successfully. You can edit the code in the edit box above. Click the Run button in the lower left corner to execute the code and verify it. + + + +**Video Tutorial** + + + + +## WS2812 + +The firmware has a built-in WS2812 RGB LED driver library. The following is a reference routine: + +``` +from modules import ws2812 +from fpioa_manager import * +fm.register(board_info.CONNEXT_A) +class_ws2812 = ws2812(board_info.CONNEXT_A,130) +r=0 +dir = True +while True: + if dir: + r += 1 + else: + r -= 1 + if r>=255: + r = 255 + dir = False + elif r<0: + r = 0 + dir = True + for i in range(130): + a = class_ws2812.set_led(i,(0,0,r)) + a=class_ws2812.display() +``` + + +## Example + +get Maixpy examples + +Maixpy docs + +Github + + + diff --git a/docs/en/quick_start/unitv/unitv_quick_start.md b/docs/en/quick_start/unitv/unitv_quick_start.md index 5a432696..2a76754c 100644 --- a/docs/en/quick_start/unitv/unitv_quick_start.md +++ b/docs/en/quick_start/unitv/unitv_quick_start.md @@ -1,291 +1,26 @@ -# UnitV Quick Start {docsify-ignore-all} - -## EasyLoader - - - - - ->1.EasyLoader is a simple and fast program burner, and each product page has a product-related case program for EasyLoader.For users who don't need to customize the firmware or perform other operations, using EasyLoader to burn firmware for M5StickV is the simplest solution.(**Currently EasyLoader is only available for Windows OS**) - ->2.After downloading the software, double-click to run the application, connect the M5 device to the computer via the data cable, select the port parameters, and click **"Burn"** to start burning. - - -## Firmware - -> Users who use an operating system other than Windows or who need to specify a burning file can use **Kflash** for firmware burning. Click the link below to download the firmware. - - - - ->1. Flash tool Kflash_GUI. - -
-

- - - Windows10 - -

- -

- - - MacOS - -

- -

- - - Linux - -

+ - ->2. Connect the device to the computer through the Tpye-C data cable, double-click to open the burning tool**Kflash_GUI** application, select the corresponding device port, development board type (M5StickV), firmware program, baud rate. Click to download , start burning. - - - -### Kflash - -> 3. For users who are used to command line operation, [can also choose Kflash as the firmware burning tool.](https://github.com/kendryte/kflash.py) - - -### Serial-Tool - ->1. You will need a serial debugging tool for programming M5StickV, you can use Putty [in here](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html),for download and information. - ->2. Run Putty, connect M5StickV to your PC, in Putty, set com number, baudrate, click "open", by now the connect process should started.(you can check the com number in device manager on your PC) - - - -> When connected, it will automatically enter Maixpy UI. Now the device is runing the default code, you can terminate it by "Ctrl+C". - - - - -## Edit and Run the Code - -### Editting - - -> The language shell programm(REPL) is good for instant code validatation, it can be used at short code programming and validation. In real project where we will have massive amount of code, in that case we will need a Code Editor for better orgnization of the code files. - - ->Inside MaixPy,integrates a open source Editor [Micropython Editor(pye)](https://github.com/robert-hh/Micropython-Editor),which is convenient for us to manage the code. - -function `os.listdir()` is for checking the files in current directory. - - -With function `pye("hello.py")`, you can create new files and enter editing mode(if file exist, only enter editting mode)[click for more](https://github.com/robert-hh/Micropython-Editor/blob/master/Pyboard%20Editor.pdf) - -If editing finished, you can do `Ctrl+S` > `Enter` to save the script. `Ctrl+Q` to exit edit mode. - - -**Notice**: This editor have some requiremnt on the Serial tool, KEY `BackSpace` have to set as `DEL` function,or `BackSpace` will implement the same function as `Ctrl+H`(charater replacement) - - -### File Execution - -Function `os.chdir()` is used for switch current directory to a certain directory, for example `os.chdir("/flash")` - -#### Solution 1: `import` - -Run `import hello` - -You can see the output: `hello maixpy` - -In this way, it is simple and handy, but thers something worth your attention, `import` can only be utilized once, the second time `import` won't work. If you need to use `import` mutiple times, please refers to solution 2 below - -#### Solution 2: `exec()` - -Use `exec()` function: - -```python -with open("hello.py") as f: - exec(f.read()) - -``` - -### AutoRun after Power On - - -System will create a `boot.py` file at directory `/flash` or `/sd` , it will run this script after power on, modify this file will realize the AutoRun. - -## MaixPy IDE - - -#### Download MaixPy IDE - -MaixPy IDE can easily realize real-time editing, uploading, execution, and real-time monitoring of camera images, file transfer and other functions. Using MaixPy IDE, because data compression and transmission require a part of resources, performance will be reduced, but This is a great development tool for developers who are not demanding in performance or who are in the debugging phase. - - - - -#### Install MaixPy IDE - -Windows platform can directly double-click the exe file to run the installer. - -Linux command line to run permissions, then execute commands - -`chmod +x maixpy-ide-linux-x86_64-0.2.2.run` - -`./maixpy-ide-linux-x86_64-0.2.2.run` - -#### Use MaixPy IDE - ->Run the MaixPy IDE, click on the toolbar, select the model of the development board. `Tool`-> `Select Board`-> `M5StickV` (Tools -> Select Development Board) - - - ->Click the Connect button in the lower left corner and select the correct connection port, click OK. - - - ->When the connection button changes from green to red, it has been connected successfully. You can edit the code in the edit box above. Click the Run button in the lower left corner to execute the code and verify it. - - - - -## V-Training - -V-Training is an online recognition model training service customized for K210 series products launched by M5Stack. - - -### boot program - ->The boot program is a picture material shooting program suitable for UnitV, which is used for material collection in the early stage of model training. - - - ->The training materials will be saved to the SD card by default, so please insert the SD card into the UnitV card slot before running the boot program. (Note: UnitV has requirements for the selection of SD cards, [click here to see the type of support](en/unit/unitv?id=sd-card-test)) - - ->Run the MaixPy IDE and connect to the UnitV device. Click the "Open File" option, open the downloaded boot.py file, and click the Run button. After running successfully, the camera image will be monitored in real time in the upper right corner of MaixPy IDE - ->Match the camera screen on the IDE for shooting operations. Press the A button to take a picture. The B button is used to switch the class number. The output log will correspond to the class number of each operation and the number of pictures taken. Click "Serial Port Monitor" below to see the log output. - - - ->At present, the program provides a total of 10 groups of classes for users to shoot training materials, each group represents a kind of recognition object. In order to obtain better training results, users must shoot more than 3 groups of Class Recognition object). In order to ensure the accuracy of recognition, the number of Class shooting materials in each group needs to exceed 35, otherwise it will not be passed during cloud training. The greater the number of materials, the better the recognition training effect and the higher the recognition rate high - - - ->When shooting training materials, please try to keep the ambient light conditions of the material shooting consistent with the actual recognition application scene. The shooting distance is recommended to fill the screen with the recognition object completely and there is no other debris in the background. - - -### Material inspection and suppression - ->After shooting the materials, click the disconnect option in the IDE, remove the SD card, and copy the image materials ("train" and "vaild" folders) in the SD to the computer through a card reader. - - - - ->The "Class" and "vaild" folders have the same Class number folder directory. When you switch between Classes and shoot material, the program will create files with the same Class number in "train" and "vaild" at the same time. Folder, and store the captured pictures into the Class folder under the respective directories of "train" and "vaild" according to the storage rules. - ->In addition to checking the correctness of the picture content before suppressing the packaging, you must ensure that the sum of the material pictures in the same Class serial number directory in the two folders of "train" and "vaild" is greater than 35. The class serial number catalog when the total number is less than 35 please Delete or backup. After completing the inspection, the next thing to do is to suppress the material files. Press the "train" and "vaild" folders into a "zip" format compressed package. - -## Upload Data to Cloud - ->[Click to visit upload page](http://v-training.m5stack.com/),type in your personal information(upload file should under 200MB, and had to be ZIP format) - - - -> After the Upload is done, file will enter request queue. At bottom left corner will show the current queue status. - - - - -## Download Model - ->After training accomplished, code file will sent to your personal e-mail, copy the download link to download the file to your computer.Unzip the file, copy it to SD card, keep the SD card in the M5StickV - - - - - -## Program modification - ->The guidance program returned after training is only provided with the object recognition function, but it is the output of the designated recognition or unrecognition state, so the user can modify it according to the existing program according to his own needs. To realize the output of identification data, or the corresponding execution function after the identification is successful. For example, the identification information is printed out serially. - -**The following is the boot program with serial port printing program added. It is only a partial comment and is not a complete program. Please use the boot program file returned by training to modify it.** - -``` - ... - - task = kpu.load("/sd/c33723fb62faf1be_mbnet10_quant.kmodel")//载入模型文件 - - labels=["1","2","3","4","5","6"] #The list corresponds to the Class order of the training material, and corresponds to each identifier. You can also modify the elements in the list into other string fields. - - - while(True): - img = sensor.snapshot() - fmap = kpu.forward(task, img) - plist=fmap[:] - pmax=max(plist) - max_index=plist.index(pmax) - a = lcd.display(img) - if pmax > 0.95://Determine whether the recognition rate of the object is greater than 95% - lcd.draw_string(40, 60, "Accu:%.2f Type:%s"%(pmax, labels[max_index].strip())) - print(labels[max_index])//Print the identified object name through the serial port. - - .... -``` - ->After the UnitV is powered, it will run the boot program in SD by default to automatically recognize it. After adding the serial printing program, you can use the serial debugging tool to check the identification information. - - - -## WS2812 - -The firmware has a built-in WS2812 RGB LED driver library. The following is a reference routine. Note: Since the expansion port of UnitV does not have a driving load function, this program is only suitable for driving the built-in RGB LED: - -``` -from modules import ws2812 -from fpioa_manager import * -fm.register(8) -class_ws2812 = ws2812(8,100) -r=0 -dir = True -while True: - if dir: - r += 5 - else: - r -= 5 - if r>=255: - r = 255 - dir = False - elif r<0: - r = 0 - dir = True - for i in range(100): - a = class_ws2812.set_led(i,(0,0,r)) - a=class_ws2812.display() -``` - -## Library - -In the library documentation, you can find more APIs to help you build a variety of applications。 - -See more program examples - -Github - -

V-Function

- -V-Function is a series of **visual recognition** function firmware developed by the M5Stack team for V series devices. Click the V-Funciton title to view the instructions. - - - diff --git a/docs/en/quick_start/unitv/unitv_quick_start_maixpy.md b/docs/en/quick_start/unitv/unitv_quick_start_maixpy.md new file mode 100644 index 00000000..5a6672cb --- /dev/null +++ b/docs/en/quick_start/unitv/unitv_quick_start_maixpy.md @@ -0,0 +1,189 @@ +# UnitV Maixpy Quick Start + +## EasyLoader + + + +click to download EasyLoader + +>1.EasyLoader is a simple and fast program burner, and each product page has a product-related case program for EasyLoader.For users who don't need to customize the firmware or perform other operations, using EasyLoader to burn firmware for M5StickV is the simplest solution.(**Currently EasyLoader is only available for Windows OS**) + +>2.After downloading the software, double-click to run the application, connect the M5 device to the computer via the data cable, select the port parameters, and click **"Burn"** to start burning. + + +## Firmware + +> Users who use an operating system other than Windows or who need to specify a burning file can use **Kflash** for firmware burning. Click the link below to download the firmware. + +click to download firmware + + +>1. Flash tool Kflash_GUI. + + + +>2. Connect the device to the computer through the Tpye-C data cable, double-click to open the burning tool**Kflash_GUI** application, select the corresponding device port, development board type (M5StickV), firmware program, baud rate. Click to download , start burning. + + + +### Kflash + +> 3. For users who are used to command line operation, [can also choose Kflash as the firmware burning tool.](https://github.com/kendryte/kflash.py) + + +### Serial-Tool + +>1. You will need a serial debugging tool for programming M5StickV, you can use Putty [in here](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html),for download and information. + +>2. Run Putty, connect M5StickV to your PC, in Putty, set com number, baudrate, click "open", by now the connect process should started.(you can check the com number in device manager on your PC) + + + +> When connected, it will automatically enter Maixpy UI. Now the device is runing the default code, you can terminate it by "Ctrl+C". + + + + +## Edit and Run the Code + +### Editting + + +> The language shell programm(REPL) is good for instant code validatation, it can be used at short code programming and validation. In real project where we will have massive amount of code, in that case we will need a Code Editor for better orgnization of the code files. + + +>Inside MaixPy,integrates a open source Editor [Micropython Editor(pye)](https://github.com/robert-hh/Micropython-Editor),which is convenient for us to manage the code. + +function `os.listdir()` is for checking the files in current directory. + + +With function `pye("hello.py")`, you can create new files and enter editing mode(if file exist, only enter editting mode)[click for more](https://github.com/robert-hh/Micropython-Editor/blob/master/Pyboard%20Editor.pdf) + +If editing finished, you can do `Ctrl+S` > `Enter` to save the script. `Ctrl+Q` to exit edit mode. + + +**Notice**: This editor have some requiremnt on the Serial tool, KEY `BackSpace` have to set as `DEL` function,or `BackSpace` will implement the same function as `Ctrl+H`(charater replacement) + + +### File Execution + +Function `os.chdir()` is used for switch current directory to a certain directory, for example `os.chdir("/flash")` + +#### Solution 1: `import` + +Run `import hello` + +You can see the output: `hello maixpy` + +In this way, it is simple and handy, but thers something worth your attention, `import` can only be utilized once, the second time `import` won't work. If you need to use `import` mutiple times, please refers to solution 2 below + +#### Solution 2: `exec()` + +Use `exec()` function: + +```python +with open("hello.py") as f: + exec(f.read()) + +``` + +### AutoRun after Power On + + +System will create a `boot.py` file at directory `/flash` or `/sd` , it will run this script after power on, modify this file will realize the AutoRun. + +## MaixPy IDE + + +#### Download MaixPy IDE + +MaixPy IDE can easily realize real-time editing, uploading, execution, and real-time monitoring of camera images, file transfer and other functions. Using MaixPy IDE, because data compression and transmission require a part of resources, performance will be reduced, but This is a great development tool for developers who are not demanding in performance or who are in the debugging phase. + +MaixPy IDE + +#### Install MaixPy IDE + +Windows platform can directly double-click the exe file to run the installer. + +Linux command line to run permissions, then execute commands + +`chmod +x maixpy-ide-linux-x86_64-0.2.2.run` + +`./maixpy-ide-linux-x86_64-0.2.2.run` + +#### Use MaixPy IDE + +>Run the MaixPy IDE, click on the toolbar, select the model of the development board. `Tool`-> `Select Board`-> `M5StickV` (Tools -> Select Development Board) + + + +>Click the Connect button in the lower left corner and select the correct connection port, click OK. + + + +>When the connection button changes from green to red, it has been connected successfully. You can edit the code in the edit box above. Click the Run button in the lower left corner to execute the code and verify it. + + + + +## WS2812 + +The firmware has a built-in WS2812 RGB LED driver library. The following is a reference routine. Note: Since the expansion port of UnitV does not have a driving load function, this program is only suitable for driving the built-in RGB LED: + +``` +from modules import ws2812 +from fpioa_manager import * +fm.register(8) +class_ws2812 = ws2812(8,100) +r=0 +dir = True +while True: + if dir: + r += 5 + else: + r -= 5 + if r>=255: + r = 255 + dir = False + elif r<0: + r = 0 + dir = True + for i in range(100): + a = class_ws2812.set_led(i,(0,0,r)) + a=class_ws2812.display() +``` + +## Library + +In the library documentation, you can find more APIs to help you build a variety of applications。 + +Maixpy docs + +Github + + + diff --git a/docs/en/quick_start/unitv/v_function.md b/docs/en/quick_start/unitv/v_function.md index c7eb26c4..5ebed08b 100644 --- a/docs/en/quick_start/unitv/v_function.md +++ b/docs/en/quick_start/unitv/v_function.md @@ -7,7 +7,7 @@ - + @@ -24,6 +24,11 @@ V-Function is a series of **visual recognition** functional firmware developed b Motion detect Target Trace Color Trace + Face detect + QRCODE + BarCode + DatamatrixCode + ApriltagCode
@@ -121,11 +126,60 @@ V-Function is a series of **visual recognition** functional firmware developed b >Program case: Enable the dynamic detection mode, and determine whether there is movement of the target in the screen by reading the maximum change rate value of the screen. When the change rate value is greater than the expected value, "Moved" is displayed, otherwise "Not Move" is displayed. The screen displays the current maximum rate of change value. - + - + +### Motion detect Packet format +#### Receive JSON + +``` +{ + "FUNC": "MOTION DETECT V1.0", + "DIFF TOTAL": 10000, //rate of difference + "DIFF MAX": 75, // max difference + "TOTAL": 3, //Number of bounding boxes + "0": { + "x": 45, + "y": 18, + "w": 126, + "h": 72, + "area": 342 //The number of changed pixels within the bounding box + }, + "1": { + "x": 0, + "y": 169, + "w": 130, + "h": 24, + "area": 173 + }, + "2": { + "x": 39, + "y": 204, + "w": 276, + "h": 34, + "area": 141 + } +} + +``` + +#### Send JSON + +``` +{ + "MOTION DETECT": 1.0, //Function mark "required" + "mode": "COMPUTE_MODE_STATIC", //"COMPUTE_MODE_STATIC" or "COMPUTE_MODE_DYNAMIC" + "thr_w": 20, //Bounding box width threshold,[3,200] + "thr_h": 20, //Bounding box length threshold,[3,200] + "stepx": 1, //X Scan interval,[0, 40],Set to 0 to turn off bounding box detection + "stepy": 2, //Y Scan interval,[0, 40],Set to 0 to turn off bounding box detection + "delta": 20, //Rate of change threshold,[0, 99] + "merge": 10 //Bounding box merge threshold,[0, 40] +} + +``` ### Target Trace @@ -149,9 +203,38 @@ V-Function is a series of **visual recognition** functional firmware developed b >Program case: Set the frame selection target by pressing button A, read the target coordinate value, used to control the movement of rectangular elements on the screen, and simulate the display of the target's trajectory - + - + + + +### Target Trace Packet format + +#### Receive JSON + +``` +{ + "FUNC": "TARGET TRACKER V1.0", + "x": 282, + "y": 165, + "w": 13, + "h": 15 +} + +``` + +#### Send JSON + +``` +{ + "TARGET TRACKER": " V1.0", + "x": 282, //xywh all "required" + "y": 165, + "w": 13, + "h": 15 +} + +``` ### Color Trace @@ -203,13 +286,318 @@ V-Function is a series of **visual recognition** functional firmware developed b >Program case: Set the LAB threshold for recognition, realize the color tracking effect, and obtain the coordinate data of the tracked object in the screen, and the number of pixels that meet the threshold. - + - + -## Protocol +### Color Trace Packet format ->Click the button below to download the Protocol format table. The user can use it to analyze the data format and connect the V-function to other programming platforms. +#### Receive JSON -Download Protocol table +``` +{ + "FUNC": "COLOR TRACKER V1.0", + "TOTAL": 3, //Number of bounding boxes + "0": { + "x": 45, + "y": 18, + "w": 126, + "h": 72, + "area": 342 //The number of changed pixels within the bounding box + }, + "1": { + "x": 0, + "y": 169, + "w": 130, + "h": 24, + "area": 173 + }, + "2": { + "x": 39, + "y": 204, + "w": 276, + "h": 34, + "area": 141 + } +} + +``` + +#### Send JSON + +``` +{ + "COLOR TRACKER": 1.0, //Function mark "required" + "thr_w": 20, //Bounding box width threshold,[3,200] + "thr_h": 20, //Bounding box length threshold,[3,200] + "stepx": 1, //X Scan interval,[0, 40],Set to 0 to turn off bounding box detection + "stepy": 2, //Y Scan interval,[0, 40],Set to 0 to turn off bounding box detection + "merge": 10, //Bounding box merge threshold,[0, 40] + "Lmin": 0, //L Lower threshold [0, 100] + "Lmax": 0, //L Upper threshold [0, 100] + "Amin": 0, //A Lower threshold [0, 255] + "Amax": 0, //A Upper threshold [0, 255] + "Bmin": 0, //B Lower threshold [0, 255] + "Bmax": 0, //B Upper threshold [0, 255] +} + +``` + + +### Face detect + +>Recognize the face information in the screen, and return the number of successful recognitions, object coordinates, and confidence rate. + + + +>Program block introduction + +- `init` + + initialization + +- `Get face numbers` + + Read the number of recognized faces + +- `Get number N face detail` + + Read the face detail data of the specified number, and the return format is a list, which includes the face frame selection coordinates, length, and placement confidence rate + +>Program case: Read the face recognition results in the screen and the confidence rate. + + + + + +### Face detect Packet format + +#### Receive JSON + +``` +{ + "FUNC": "FACE DETECT", // Function Description + "count": 3, // Number of recognized faces + "2": { // Face number + "x": 97, // ROI + "y": 26, + "w": 64, + "h": 86, + "value": 0.859508, // Confidence rate + "classid": 0, + "index": 2, + "objnum": 3 + }, + "1": { + "x": 70, + "y": 157, + "w": 38, + "h": 63, + "value": 0.712100, + "classid": 0, + "index": 1, + "objnum": 3 + }, + "0": { + "x": 199, + "y": 145, + "w": 31, + "h": 40, + "value": 0.859508, + "classid": 0, + "index": 0, + "objnum": 3 + } + } + + +``` + + +## QRCode + +>Recognize the QR code on the screen and return the recognition result and version. + + + +>Program block introduction + +- `init` + + initialization + +- `Get QR code text` + + Get the content of the identified QR code + +- `Get QR code version` + + Get the identified QR code version + +#### Receive JSON + +``` +{ + "count": 1, + "FUNC": "FIND QRCODE", + "0": { + "x": 57, + "y": 16, + "w": 197, + "h": 198, + "payload": "m5stack", //QR code data + "version": 1, + "ecc_level": 1, + "mask": 2, //QR code mask + "data_type": 4, + "eci": 0 // + } +} + +``` + +## BarCode + +>Recognize the barcode on the screen and return the recognition result and version. + + + +>Program block introduction + +- `init` + + initialization + +- `Get bar code text` + + Get the barcode content + +- `Get bar code rotation` + + Get the recognized bar code rotation angle + +- `Get bar code type` + + Get the recognized barcode category + +- `Get bar code location` + + Get the frame selection coordinates, length and width of the recognized barcode, the return value is a list + +#### Receive JSON + +``` +{ + "0": { + "x": 62, + "y": 90, + "w": 100, + "h": 45, + "payload": "123", //BarCode data + "type": 15, + "rotation": 0.000000, //Barcode rotation angle + "quality": 28 //The number of times the barcode is scanned in the image + }, + "count": 1, + "FUNC": "FIND BARCODE" +} + +``` + +## DatamatrixCode + +>Identify the Datamatrix code in the screen, and return the recognition result, the code rotation angle, and the coordinate data. + + + +>Program block introduction + +- `init` + + initialization + +- `Get datamatrix code text` + + Get the recognized Datamatrix code content + +- `Get bar code rotation` + + Get the recognized rotation angle of Datamatrix code + +- `Get bar code location` + + Get the frame selection coordinates, length and width of the recognized Datamatrix code, and the return value is a list + +#### Receive JSON + +``` +{ + "0": { + "x": 20, + "y": 116, + "w": 96, + "h": 96, + "payload": "m5stack", + "rotation": 1.588250, //DM code rotation angle + "rows": 16, //DM code lines + "columns": 16, //Number of DM code columns + "capacity": 12, //DM code capacity (bytes) + "padding": 1 //DM code remaining capacity (bytes) + }, + "count": 1, + "FUNC": "FIND DATAMATRIX" +} + +``` + + +## ApriltagCode + +>Identify the Apriltag code in the screen and get its position offset. + + + +>Program block introduction + +- `init` + + initialization + +- `Get AprilTag Translation` + + Read the position offset of Apriltag code + +- `Get AprilTag rotation` + + Returns the curl of AprilTag in radians (int) + +- `Get AprilTag location` + + Read the frame selection coordinates, center coordinates, length and width of the recognized Datamatrix code, the return value is a list + +#### Receive JSON + +``` +{ + "0": { + "x": 71, + "y": 5, + "w": 85, + "h": 88, + "id": 1, + "family": 16,// AprilTag family + "cx": 115, + "cy": 49, + "rotation": 6.219228,// Returns the curl of AprilTag in radians (int). + "decision_margin": 0.451959,// AprilTag matching color saturation (value 0.0-1.0), where 1.0 is the best. + "hamming": 0,// Acceptable digital error value of AprilTag + "goodness": 0.000000, //AprilTag The color saturation of the image + "x_translation": 0.868200, + "y_translation": 0.245313, + "z_translation": -2.725188, + "x_rotation": 3.093776, + "y_rotation": 0.065489, + "z_rotation": 6.219228 + }, + "count": 1, + "FUNC": "FIND APRILTAG" +} + +``` +#### Recognition mode setting JSON + +>The above multiple identification code functions are all implemented using the same firmware. Users can configure mode switching by sending the JSON data below. + +``` + +{ + "FIND CODE": 1.0, + "mode":"DATAMATRIX" //Recognition mode option: QRCODE,APRILTAG,DATAMATRIX,BARCODE +} +``` + +## More Information + +Github \ No newline at end of file diff --git a/docs/en/related_documents/v-training.md b/docs/en/related_documents/v-training.md index 0981b771..37ba5cbc 100644 --- a/docs/en/related_documents/v-training.md +++ b/docs/en/related_documents/v-training.md @@ -7,47 +7,114 @@ At present, V-Training provides two model training modes "Classification" (recog ## Burner Firmware -Users who have already programmed the firmware should start directly from the Second step.[for users who have not burned the firmware, please click here to view the firmware burning tutorial](en/quick_start/m5stickv/m5stickv_quick_start) +### EasyLoader + + + +click to download EasyLoader + +>1.EasyLoader is a simple and fast program burner, and each product page has a product-related case program for EasyLoader.For users who don't need to customize the firmware or perform other operations, using EasyLoader to burn firmware for M5StickV is the simplest solution.(**Currently EasyLoader is only available for Windows OS**) + +>2.After downloading the software, double-click to run the application, connect the M5 device to the computer via the data cable, select the port parameters, and click **"Burn"** to start burning. + + +### Kflash_GUI + +> Users who use an operating system other than Windows or who need to specify a burning file can use **Kflash** for firmware burning. Click the link below to download the firmware. + +click to download firmware + + +>1. Flash tool Kflash_GUI. + + + +>2. Connect the device to the computer through the Tpye-C data cable, double-click to open the burning tool**Kflash_GUI** application, select the corresponding device port, development board type (M5StickV), firmware program, baud rate. Click to download , start burning. + + + +### Kflash + +> 3. For users who are used to command line operation, [can also choose Kflash as the firmware burning tool.](https://github.com/kendryte/kflash.py) + ## Classification mode -### boot code +?>a lot of training material images are required for model training. Due to the different hardware of M5StickV and UnitV, the material shooting methods are also different. Please refer to the instructions below for shooting according to the actual hardware used. -> Material Training requires SD cards, users could downloade boot code zip files, unzip the files to SD card.(M5StickC only recognized certain type of SD card , [click to see the supported type](en/core/m5stickv?id=sd-card-test)) +### For M5StickV - +> Material Training requires SD cards, users could downloade boot-M5StickV zip files, unzip the files to SD card.(M5StickC only recognized certain type of SD card , [click to see the supported type](en/core/m5stickv?id=sd-card-test)) + +Click here download boot-M5StickV -### Footage Shooting - > Load the SD card before power on the device. SD card is used for saving the footage. Long press left button to power on, if the screen show a display Training like below, means it entered shooting program. -> By default, the code provided 10 set of Class for you to shooting the training material, each class represent a recognition object. For better result, we recommend to shoot more than 3 Class (More than 3 recognition object ) +Note: In order to ensure the accuracy of recognition, the number of materials taken by each class must exceed 35, otherwise it will not be passed during cloud training. The more the number of materials, the better the recognition training effect, and the recognition rate Higher >Navigate bar on top of the screen would display instant Class number and picture amount. Press HOME button to start shooting, right side button is to switch between Classes. ->During shooting, plase try to keep the shooting picture as close to the reality scene as possible, such as light intensity. Regars to the shooting distance, better keep it just enough to fill the recgnition object into the screen, not much choas on the background. +### For UnitV + +>The boot-UnitV program is a picture material shooting program suitable for UnitV, which is used for material collection in the early stage of model training. + +Click to download boot-UnitV + +>The training materials will be saved to the SD card by default, so please insert the SD card into the UnitV card slot before running the boot program. (Note: UnitV has requirements for the selection of SD cards, [click here to see the type of support](en/unit/unitv?id=sd-card-test)) + +>Run the MaixPy IDE and connect to the UnitV device. Click the "Open File" option, open the downloaded boot.py file, and click the Run button. After running successfully, the camera image will be monitored in real time in the upper right corner of MaixPy IDE + +>Match the camera screen on the IDE for shooting operations. Press the A button to take a picture. The B button is used to switch the class number. The output log will correspond to the class number of each operation and the number of pictures taken. Click "Serial Port Monitor" below to see the log output. + + + +>At present, the program provides a total of 10 groups of classes for users to shoot training materials, each group represents a kind of recognition object. In order to obtain better training results, users must shoot more than 3 groups of Class Recognition object). In order to ensure the accuracy of recognition, the number of Class shooting materials in each group needs to exceed 35, otherwise it will not be passed during cloud training. The greater the number of materials, the better the recognition training effect and the higher the recognition rate high + + + +>When shooting training materials, please try to keep the ambient light conditions of the material shooting consistent with the actual recognition application scene. The shooting distance is recommended to fill the screen with the recognition object completely and there is no other debris in the background. -note:In order to reach a certain accuracy, each Class should contains at least 35 pictures, or the Could Training would give out a rejection +Note: In order to ensure the accuracy of recognition, the number of materials taken by each class must exceed 35, otherwise it will not be passed during cloud training. The more the number of materials, the better the recognition training effect, and the recognition rate Higher -### Material Checking and Compress +### Material inspection and suppression ->After finish the shooting, shut down the device, take out SD card, put the photos materials into "train" and "vaild" folder. Copy to your computer. +>After shooting the materials, click the disconnect option in the IDE, remove the SD card, and copy the image materials ("train" and "vaild" folders) in the SD to the computer through a card reader. - + -> Inside folder "train","vaild", they share exact the same folder directory, when we switch Class, the program will generate the same folder (with a name of Class number) in both "train" and "vaild". The phtotos will placed either in "train" or "vaild", underneath the coorespondent Class folder. +>The "Class" and "vaild" folders have the same Class number folder directory. When you switch between Classes and shoot material, the program will create files with the same Class number in "train" and "vaild" at the same time. Folder, and store the captured pictures into the Class folder under the respective directories of "train" and "vaild" according to the storage rules. + +>In addition to checking the correctness of the picture content before suppressing the packaging, you must ensure that the sum of the material pictures in the same Class serial number directory in the two folders of "train" and "vaild" is greater than 35. The class serial number catalog when the total number is less than 35 please Delete or backup. After completing the inspection, the next thing to do is to suppress the material files. Press the "train" and "vaild" folders into a "zip" format compressed package. -> Before we compress the package, we should check the photo and photo number, make sure for the same Class, the number of photos in the coorespondent Class Folder in -"train" and "vaild" should add up over 35. If any Class photos total amount were under 35, please either delete it or copy for back up. After finish the checking, let's compress the "train" and "vaild" to ZIP. - ### Upload Data to Cloud @@ -78,6 +145,39 @@ Users who have already programmed the firmware should start directly from the Se +### Program modification + +>Since UnitV does not integrate screens, users can modify them based on existing programs according to their needs. Realize the output of identification data, or the corresponding execution function after successful identification. For example, print the identification information through the serial port. + +**The following is the boot program with serial port printing program added. It is only a partial comment and is not a complete program. Please use the boot program file returned by training to modify it.** + +``` + ... + + task = kpu.load("/sd/c33723fb62faf1be_mbnet10_quant.kmodel")//载入模型文件 + + labels=["1","2","3","4","5","6"] #The list corresponds to the Class order of the training material, and corresponds to each identifier. You can also modify the elements in the list into other string fields. + + + while(True): + img = sensor.snapshot() + fmap = kpu.forward(task, img) + plist=fmap[:] + pmax=max(plist) + max_index=plist.index(pmax) + a = lcd.display(img) + if pmax > 0.95://Determine whether the recognition rate of the object is greater than 95% + lcd.draw_string(40, 60, "Accu:%.2f Type:%s"%(pmax, labels[max_index].strip())) + print(labels[max_index])//Print the identified object name through the serial port. + + .... +``` + +>After the UnitV is powered, it will run the boot program in SD by default to automatically recognize it. After adding the serial printing program, you can use the serial debugging tool to check the identification information. + + + + ## Detection mode(Yolov3) ### Footage shooting diff --git a/docs/zh_CN/README.md b/docs/zh_CN/README.md index c8f5d916..d17735d6 100644 --- a/docs/zh_CN/README.md +++ b/docs/zh_CN/README.md @@ -39,7 +39,7 @@ {a:"/#/zh_CN/atom/atomhub_switch", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/atom_base/atomswitch.webp", p:"ATOM SWITCH Kit", sku:"K042" ,kw:"ATOM RS485 SWITCH"}, {a:"/#/zh_CN/atom/atomfly", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/atom_base/atomfly.webp", p:"ATOM FLY Kit", sku:"K040" ,kw:"ATOM FLY"}, {a:"/#/zh_CN/atom/atom_mate", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/atom_base/atom_mate.webp", p:"ATOM MATE", sku:"A086" ,kw:"ATOM MATE HAT MOUNT PIN"}, - {a:"/#/zh_CN/atom/atomic_setp_motor", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/atom_base/atom_stepmotor.webp", p:"ATOM STEPMOTOR Kit", sku:"K047" ,kw:"ATOM STEP MOTOR"}, + {a:"/#/zh_CN/atom/atomic_step_motor", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/atom_base/atom_stepmotor.webp", p:"ATOM STEPMOTOR Kit", sku:"K047" ,kw:"ATOM STEP MOTOR"}, ] const module_list = [ diff --git a/docs/zh_CN/module/gps.md b/docs/zh_CN/module/gps.md index 7adde545..9f69796d 100644 --- a/docs/zh_CN/module/gps.md +++ b/docs/zh_CN/module/gps.md @@ -20,10 +20,14 @@ M5Core与GPS模块之间使用UART通信协议,通过连接引脚**UART2 (GPIO *UART协议:波特率(默认为9600bps),数据位(8位),起始位(1位),停止位(1位),校验位(无)* - + + + ?>**M5Stack Fire** 中的 GPIO 16 / 17 默认与PSRAM连接,这使得GPS模块的TXD / RXD(GPIO16,GPIO17)与其产生冲突.因此,当你使用 M5Stack Fire 去驱动 GPS 模块时,你需要将 GPS 模块的 TXD 与 RXD 切断,然后通过飞线引至另一组 UART 引脚. + + ## 产品特性 - 工作电压:2.7 ~ 3.6 diff --git a/docs/zh_CN/quick_start/m5stickv/m5stickv_quick_start.md b/docs/zh_CN/quick_start/m5stickv/m5stickv_quick_start.md index d61f3c72..c6876c36 100644 --- a/docs/zh_CN/quick_start/m5stickv/m5stickv_quick_start.md +++ b/docs/zh_CN/quick_start/m5stickv/m5stickv_quick_start.md @@ -1,241 +1,26 @@ -# M5StickV 上手指南 - -## EasyLoader - ->EasyLoader是一个简洁快速的程序烧录器,其内置了一个产品相关的案例程序,通过简单步骤将其烧录至主控,即可进行一系列的功能验证. - -
-
-
-
- Windows - -
-
-
- -
- - -

案例描述:

-

搭载Maixpy固件,测试摄像头,屏幕图形显示功能,单击HOME键可开关背部补光灯.

-
-
+ - - -## 下载固件 - -> 需要指定烧录文件的用户可以选用**Kflash**进行固件烧录. - - - - -## 烧录固件 - ->1.点击下方对应自己操作系统的 Kflash_GUI烧录工具进行下载. - - - - ->2.将设备通过Tpye-C数据线连接至电脑,双击打开烧录工具**Kflash_GUI**应用程序,选择对应的设备端口、开发板类型(M5StickV)、固件程序、波特率. 点击下载,开始烧录 . - - - -### Kflash - ->3.对于习惯使用命令行操作的用户来说还可以选择Kflash作为固件烧录工具.[点击此处查看详情](https://github.com/kendryte/kflash.py) - - -## 串口调试工具 - ->1.编程M5StickV需要使用到串口调试工具,您可以使用Putty作为串口调试工具, [点击此处](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)访问Putty资源页面,选择对应自己操作系统Putty进行下载,并安装. - ->2.运行Putty后,将M5StickV通过Tpye-C数据线连接至电脑端口,在Putty中设置相应的端口号与波特率,点击"open",开始连接. (你可以通过查看设备管理器得到M5StickV所使用的端口号) - - - -> 连接成功后,将自动进入,MaixPy 的交互界面. 此时设备正在运行着默认程序,您可以通过按下快捷键"Ctrl+C"中断其运行,并进入命令行. - - - - -## Hello World - ->在命令行输入下方代码,M5StickV屏幕将显示"hello world". - -``` -import lcd - -lcd.init() -lcd.draw_string(100, 100, "hello world", lcd.RED, lcd.BLACK) - -``` - - -## 编辑与运行文件 - -### 编辑文件 - ->在交互解释器(REPL)中,我们能够便捷的输入程序并马上得到运行结果,但这仅适合用作短程序的验证,在实际项目中,庞大代码量使得我们不得不将代码编辑成一个个的文件. - ->在 MaixPy 中,内置了一款编开源编辑器 [Micropython Editor(pye)](https://github.com/robert-hh/Micropython-Editor),这使得我们能够非常方便的修改程序文件. - -使用 `os.listdir()` 可以查看当前目录下的文件, - -使用 `pye("hello.py")` 可以创建文件并进入编辑模式(已存在同名文件,则仅进入编辑), 快捷键等使用说明可以在[这里查看](https://github.com/robert-hh/Micropython-Editor/blob/master/Pyboard%20Editor.pdf) - -在编辑器中完成编辑后,按 `Ctrl+S` > `Enter` 键进行保存, 按 `Ctrl+Q` 退出编辑 - -**注意**: 使用这款编辑器对使用的串口工具有一定要求, 必须将 `BackSpace` 按键设置为 `DEL` 功能, 否则按 `BackSpace` 调用的是 `Ctrl+H` 一样的功能(即字符替换) - - -### 运行文件 - -使用 `os.chdir()` 切换当前目录到文件的目录,比如 `os.chdir("/flash")` - -#### 方法一: `import` - -然后执行 `import hello` - -即可看到输出 `hello maixpy` - -使用此方法简单易用,但是需要注意的是, 目前 `import` 只能使用一次, 如果第二次 `import`, 则文件不会再执行, 如果需要多次执行,建议使用下面的方法 - -#### 方法二: `exec()` - -使用 `exec()` 函数来执行 - -```python -with open("hello.py") as f: - exec(f.read()) - -``` - -### 开机自动运行脚本 - -系统会在 `/flash` 或者 `/sd` 目录创建 `boot.py` 文件, 开机会自动先执行这个脚本, 编辑这个脚本的内容即可实现开机自启 - - -## MaixPy IDE - -#### 下载MaixPy IDE - -MaixPy IDE能够便捷的实现脚本程序的实时编辑、上传、执行,以及实时监控摄像头图像,文件传输等功能.使用 MaixPy IDE 因为数据的压缩、传输需要耗费一部分资源,所以性能会有所降低,但对性能需求不苛刻,或处于调试阶段的开发者来说这会是一个很不错的开发工具. - - - - - -#### 安装MaixPy IDE - -Windows平台可直接双击exe文件,运行安装程序. - -Linux命令行给运行权限然后,执行命令 - -`chmod +x maixpy-ide-linux-x86_64-0.2.2.run` - -`./maixpy-ide-linux-x86_64-0.2.2.run` - -#### 使用MaixPy IDE - ->运行MaixPy IDE, 点击工具栏,选择开发板的型号.`Tool`-> `Select Board`-> `M5StickV` (工具->选择开发板) - - - ->点击左下角的连接按钮,并选择正确的连接端口,点击OK. - - - ->当连接按钮由绿色变为红色的时表示,已经连接成功,你可以在上方的编辑框进行代码编辑,点击左下角的运行按钮能够执行代码,进行验证. - - - - -## V-Training 说明 - -V-Training 说明 - -

V-Function

- -V-Function是由M5Stack团队针对V系列设备开发的多个**视觉识别**功能固件,点击V-Funciton标题,查看使用说明. - - -**视频教程** - - - - -## WS2812 - -固件内置了WS2812 RGB LED驱动库,以下为参考例程: - -``` -from modules import ws2812 -from fpioa_manager import * -fm.register(board_info.CONNEXT_A) -class_ws2812 = ws2812(board_info.CONNEXT_A,130) -r=0 -dir = True -while True: - if dir: - r += 1 - else: - r -= 1 - if r>=255: - r = 255 - dir = False - elif r<0: - r = 0 - dir = True - for i in range(130): - a = class_ws2812.set_led(i,(0,0,r)) - a=class_ws2812.display() -``` -## 案例程序 - -查看Maixpy案例 - -查看更多程序案例 - -Github - - - diff --git a/docs/zh_CN/quick_start/m5stickv/m5stickv_quick_start_maixpy.md b/docs/zh_CN/quick_start/m5stickv/m5stickv_quick_start_maixpy.md new file mode 100644 index 00000000..7ab87073 --- /dev/null +++ b/docs/zh_CN/quick_start/m5stickv/m5stickv_quick_start_maixpy.md @@ -0,0 +1,219 @@ +# M5StickV Maixpy上手指南 + +## EasyLoader + +>EasyLoader是一个简洁快速的程序烧录器,其内置了一个产品相关的案例程序,通过简单步骤将其烧录至主控,即可进行一系列的功能验证. + +
+
+
+
+ Windows + +
+
+
+ +
+ + +

案例描述:

+

搭载Maixpy固件,测试摄像头,屏幕图形显示功能,单击HOME键可开关背部补光灯.

+
+
+
+ + +## 烧录固件 + +> 需要指定烧录文件的用户可以选用**Kflash**进行固件烧录. + + + +>1.点击下方对应自己操作系统的 Kflash_GUI烧录工具进行下载. + + + + +>2.将设备通过Tpye-C数据线连接至电脑,双击打开烧录工具**Kflash_GUI**应用程序,选择对应的设备端口、开发板类型(M5StickV)、固件程序、波特率. 点击下载,开始烧录 . + + + +### Kflash + +>3.对于习惯使用命令行操作的用户来说还可以选择Kflash作为固件烧录工具.[点击此处查看详情](https://github.com/kendryte/kflash.py) + + +## 串口调试工具 + +>1.编程M5StickV需要使用到串口调试工具,您可以使用Putty作为串口调试工具, [点击此处](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)访问Putty资源页面,选择对应自己操作系统Putty进行下载,并安装. + +>2.运行Putty后,将M5StickV通过Tpye-C数据线连接至电脑端口,在Putty中设置相应的端口号与波特率,点击"open",开始连接. (你可以通过查看设备管理器得到M5StickV所使用的端口号) + + + +> 连接成功后,将自动进入,MaixPy 的交互界面. 此时设备正在运行着默认程序,您可以通过按下快捷键"Ctrl+C"中断其运行,并进入命令行. + + + +## Hello World + +>在命令行输入下方代码,M5StickV屏幕将显示"hello world". + +``` +import lcd + +lcd.init() +lcd.draw_string(100, 100, "hello world", lcd.RED, lcd.BLACK) + +``` + + +## 编辑与运行文件 + +### 编辑文件 + +>在交互解释器(REPL)中,我们能够便捷的输入程序并马上得到运行结果,但这仅适合用作短程序的验证,在实际项目中,庞大代码量使得我们不得不将代码编辑成一个个的文件. + +>在 MaixPy 中,内置了一款编开源编辑器 [Micropython Editor(pye)](https://github.com/robert-hh/Micropython-Editor),这使得我们能够非常方便的修改程序文件. + +使用 `os.listdir()` 可以查看当前目录下的文件, + +使用 `pye("hello.py")` 可以创建文件并进入编辑模式(已存在同名文件,则仅进入编辑), 快捷键等使用说明可以在[这里查看](https://github.com/robert-hh/Micropython-Editor/blob/master/Pyboard%20Editor.pdf) + +在编辑器中完成编辑后,按 `Ctrl+S` > `Enter` 键进行保存, 按 `Ctrl+Q` 退出编辑 + +**注意**: 使用这款编辑器对使用的串口工具有一定要求, 必须将 `BackSpace` 按键设置为 `DEL` 功能, 否则按 `BackSpace` 调用的是 `Ctrl+H` 一样的功能(即字符替换) + + +### 运行文件 + +使用 `os.chdir()` 切换当前目录到文件的目录,比如 `os.chdir("/flash")` + +#### 方法一: `import` + +然后执行 `import hello` + +即可看到输出 `hello maixpy` + +使用此方法简单易用,但是需要注意的是, 目前 `import` 只能使用一次, 如果第二次 `import`, 则文件不会再执行, 如果需要多次执行,建议使用下面的方法 + +#### 方法二: `exec()` + +使用 `exec()` 函数来执行 + +```python +with open("hello.py") as f: + exec(f.read()) + +``` + +### 开机自动运行脚本 + +系统会在 `/flash` 或者 `/sd` 目录创建 `boot.py` 文件, 开机会自动先执行这个脚本, 编辑这个脚本的内容即可实现开机自启 + + +## MaixPy IDE + +#### 下载MaixPy IDE + +MaixPy IDE能够便捷的实现脚本程序的实时编辑、上传、执行,以及实时监控摄像头图像,文件传输等功能.使用 MaixPy IDE 因为数据的压缩、传输需要耗费一部分资源,所以性能会有所降低,但对性能需求不苛刻,或处于调试阶段的开发者来说这会是一个很不错的开发工具. + +MaixPy IDE + +#### 安装MaixPy IDE + +Windows平台可直接双击exe文件,运行安装程序. + +Linux命令行给运行权限然后,执行命令 + +`chmod +x maixpy-ide-linux-x86_64-0.2.2.run` + +`./maixpy-ide-linux-x86_64-0.2.2.run` + +#### 使用MaixPy IDE + +>运行MaixPy IDE, 点击工具栏,选择开发板的型号.`Tool`-> `Select Board`-> `M5StickV` (工具->选择开发板) + + + +>点击左下角的连接按钮,并选择正确的连接端口,点击OK. + + + +>当连接按钮由绿色变为红色的时表示,已经连接成功,你可以在上方的编辑框进行代码编辑,点击左下角的运行按钮能够执行代码,进行验证. + + + + +**视频教程** + + + + +## WS2812 + +固件内置了WS2812 RGB LED驱动库,以下为参考例程: + +``` +from modules import ws2812 +from fpioa_manager import * +fm.register(board_info.CONNEXT_A) +class_ws2812 = ws2812(board_info.CONNEXT_A,130) +r=0 +dir = True +while True: + if dir: + r += 1 + else: + r -= 1 + if r>=255: + r = 255 + dir = False + elif r<0: + r = 0 + dir = True + for i in range(130): + a = class_ws2812.set_led(i,(0,0,r)) + a=class_ws2812.display() +``` + +## 案例程序 + +查看Maixpy案例 + +Maixpy docs + +Github + + + diff --git a/docs/zh_CN/quick_start/unitv/unitv_quick_start.md b/docs/zh_CN/quick_start/unitv/unitv_quick_start.md index 8949ae6d..cf82d7dd 100644 --- a/docs/zh_CN/quick_start/unitv/unitv_quick_start.md +++ b/docs/zh_CN/quick_start/unitv/unitv_quick_start.md @@ -1,289 +1,26 @@ -# UnitV 上手指南 {docsify-ignore-all} - - -## EasyLoader - - - - - ->1.EasyLoader是一个简洁快速的程序烧录器,每一个产品页面里的EasyLoader都提供了一个与产品相关的案例程序,对于不需要对固件进行定制或进行其他操作的用户,使用EasyLoader为UnitV烧录固件,会是一个最简洁的方案(**目前EasyLoader仅适用于Windows操作系统**). - ->2.下载软件后,双击运行应用程序,将M5设备通过数据线连接至电脑,选择端口参数,点击 **"Burn"** 即可开始烧录 - - -## 固件烧录 - -> 需要指定烧录文件的用户也可以选用**Kflash**进行固件烧录. - - - - ->1.点击下方对应自己操作系统的 Kflash_GUI烧录工具进行下载. - -
-

- - - Windows10 - -

- -

- - - MacOS - -

- -

- - - Linux - -

+ - ->2.将设备通过Tpye-C数据线连接至电脑,双击打开烧录工具**Kflash_GUI**应用程序,选择对应的设备端口、开发板类型(M5StickV)、固件程序、波特率. 点击下载,开始烧录 . - - - -### Kflash - ->3.对于习惯使用命令行操作的用户来说还可以选择Kflash作为固件烧录工具.[点击此处查看详情](https://github.com/kendryte/kflash.py) - - -### 串口调试工具 - ->1.编程UnitV需要使用到串口调试工具,您可以使用Putty作为串口调试工具, [点击此处](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)访问Putty资源页面,选择对应自己操作系统Putty进行下载,并安装. - ->2.运行Putty后,将UnitV通过Tpye-C数据线连接至电脑端口,在Putty中设置相应的端口号与波特率,点击"open",开始连接. (你可以通过查看设备管理器得到UnitV所使用的端口号) - - - -> 连接成功后,将自动进入,MaixPy 的交互界面. 此时设备正在运行着默认程序,您可以通过按下快捷键"Ctrl+C"中断其运行,并进入命令行. - - - - - -## 编辑与运行文件 - -### 编辑文件 - ->在交互解释器(REPL)中,我们能够便捷的输入程序并马上得到运行结果,但这仅适合用作短程序的验证,在实际项目中,庞大代码量使得我们不得不将代码编辑成一个个的文件. - ->在 MaixPy 中,内置了一款编开源编辑器 [Micropython Editor(pye)](https://github.com/robert-hh/Micropython-Editor),这使得我们能够非常方便的修改程序文件. - -使用 `os.listdir()` 可以查看当前目录下的文件, - -使用 `pye("hello.py")` 可以创建文件并进入编辑模式(已存在同名文件,则仅进入编辑), 快捷键等使用说明可以在[这里查看](https://github.com/robert-hh/Micropython-Editor/blob/master/Pyboard%20Editor.pdf) - -在编辑器中完成编辑后,按 `Ctrl+S` > `Enter` 键进行保存, 按 `Ctrl+Q` 退出编辑 - -**注意**: 使用这款编辑器对使用的串口工具有一定要求, 必须将 `BackSpace` 按键设置为 `DEL` 功能, 否则按 `BackSpace` 调用的是 `Ctrl+H` 一样的功能(即字符替换) - - -### 运行文件 - -使用 `os.chdir()` 切换当前目录到文件的目录,比如 `os.chdir("/flash")` - -#### 方法一: `import` - -然后执行 `import hello` - -即可看到输出 `hello maixpy` - -使用此方法简单易用,但是需要注意的是, 目前 `import` 只能使用一次, 如果第二次 `import`, 则文件不会再执行, 如果需要多次执行,建议使用下面的方法 - -#### 方法二: `exec()` - -使用 `exec()` 函数来执行 - -```python -with open("hello.py") as f: - exec(f.read()) - -``` - -### 开机自动运行脚本 - -系统会在 `/flash` 或者 `/sd` 目录创建 `boot.py` 文件, 开机会自动先执行这个脚本, 编辑这个脚本的内容即可实现开机自启 - - -## MaixPy IDE - -#### 下载MaixPy IDE - -MaixPy IDE能够便捷的实现脚本程序的实时编辑、上传、执行,以及实时监控摄像头图像,文件传输等功能.使用 MaixPy IDE 因为数据的压缩、传输需要耗费一部分资源,所以性能会有所降低,但对性能需求不苛刻,或处于调试阶段的开发者来说这会是一个很不错的开发工具. - - - - -#### 安装MaixPy IDE - -Windows平台可直接双击exe文件,运行安装程序. - -Linux命令行给运行权限然后,执行命令 - -`chmod +x maixpy-ide-linux-x86_64-0.2.2.run` - -`./maixpy-ide-linux-x86_64-0.2.2.run` - -#### 使用MaixPy IDE - ->运行MaixPy IDE, 点击工具栏,选择开发板的型号.`Tool`-> `Select Board`-> `M5StickV` (工具->选择开发板) - - - ->点击左下角的连接按钮,并选择正确的连接端口,点击OK. - - - ->当连接按钮由绿色变为红色的时表示,已经连接成功,你可以在上方的编辑框进行代码编辑,点击左下角的运行按钮能够执行代码,进行验证. - - - - -## V-Training - -V-Training 是由M5Stack推出的一个针对K210系列产品而定制的在线识别模型训练服务,以下为使用步骤。 - - -### boot程序 - -> boot程序是适用于UnitV的一个图片素材拍摄程序,用于模型训练前期的素材收集。 - - - ->拍摄的训练素材将默认储存到SD卡,因此在运行boot程序前请将SD卡插入UnitV的卡槽。(注意:UnitV对SD卡的选型有所要求,[点击此处查看支持类型](zh_CN/unit/unitv?id=sd卡测试)) - - ->运行MaixPy IDE,连接UnitV设备.点击"打开文件"选项,打开已经下载的boot.py文件,点击运行按钮。运行成功后,在MaixPy IDE的右上角将实时监视摄像头画面 - ->配合IDE上的摄像头画面进行拍摄操作,按下A键进行图片拍摄,B键按键则用于切换Class序号.输出日志将对应每一次操作的Class序号以及拍摄图片数量。点击下方的"串口监视器",查看日志输出。 - - - ->目前程序一共提供了10组Class供用户拍摄训练素材,每一组Class代表着一种识别对象.为了获得更好的训练效果,用户必须要拍摄3组以上的Class(三个以上的识别对象).为了保证识别的准确率,每组Class拍摄素材张数需要超过35张,否则在进行云端训练时将不给予通过. 素材的数量越多,识别训练的效果越好,识别率越高 - - - ->在拍摄训练素材时,请尽可能保持素材拍摄的环境光线情况与实际识别应用场景一致,拍摄距离建议将识别对象刚好完整填入屏幕,且背景无其他杂物. - - -### 素材检查与压制 - ->素材拍摄完成后,点击IDE中的断开连接选项,取出SD卡,通过读卡器将SD中的图片素材("train"、"vaild"两个文件夹),复制至电脑端. - - - - ->"train"、"vaild"两个文件夹中的Class序号文件夹目录是保持一致的,当切换Class并拍摄素材时,程序将会在"train"、"vaild"中同时创建Class序号一致的文件夹,并按照存放规则将所拍摄的图片分别存储到"train"、"vaild"各自目录下的Class文件夹中. - ->在压制打包前除了检查图片内容的正确性以外,必须确保"train"、"vaild"两个文件夹中同一Class序号目录里的素材图片总和大于35.数量总和小于35时的Class序号目录请自行删除或是备份处理.完成了检查工作,接下来要做就是素材文件的压制.将"train"、"vaild"两个文件夹通过压制工具压制为"zip"格式的压缩包. - -## 数据上传云端 - ->[点击此处访问数据上传页面](http://v-training.m5stack.com/),按照信息提示填写个人邮箱,点击上传文件(上传文件大小控制在200MB以内,且必须为zip格式.) - - - ->上传成功后,文件将会进入请求队列,页面的左下方的表格将会显示出当前的队列情况. - - - - -## 下载识别模型 - ->等待训练完成,程序文件下载地址将会以邮件的形式发送到上传文件时预留的邮箱中去.复制邮件中的下载地址,下载程序文件到本地进行解压,并复制到SD卡中去. - - - - - -## 程序修改 - ->训练完成后的返回的boot程序仅提供物体识别功能,但并为指定识别或未识别状态的输出内容,因此用户可以根据自己的需求,基于现有程序进行修改。实现识别数据的输出,或是识别成功后相应的执行功能。例如将识别信息通过串口打印出来。 - -**以下为添加了串口打印程序的boot程序,仅作部分内容注释,并非完整程序,实际使用请基于训练返回的boot程序文件修改** - -``` - ... - - task = kpu.load("/sd/c33723fb62faf1be_mbnet10_quant.kmodel")//载入模型文件 - - labels=["1","2","3","4","5","6"] #该列表对应训练素材时的Class顺序,分别对应每一个识别物,你也可以将列表内的元素,修改成其他字符串字段. - - - while(True): - img = sensor.snapshot() - fmap = kpu.forward(task, img) - plist=fmap[:] - pmax=max(plist) - max_index=plist.index(pmax) - a = lcd.display(img) - if pmax > 0.95://判断对象的识别率是否大于95% - lcd.draw_string(40, 60, "Accu:%.2f Type:%s"%(pmax, labels[max_index].strip())) - print(labels[max_index])//将所识别的对象名称通过串口打印出来。 - - .... -``` - ->UnitV在供电后,会默认运行SD中的boot程序,自动进行识别。添加了串口打印程序后,你可以使用串口调试工具,进行识别信息查看。 - - - - - -## WS2812 - -固件内置了WS2812 RGB LED驱动库,以下为参考例程. 注意:由于UnitV的拓展端口不具备驱动负载功能,因此该程序仅适用于驱动内置的RGB LED: - -``` -from modules import ws2812 -from fpioa_manager import * -fm.register(8) -class_ws2812 = ws2812(8,100) -r=0 -dir = True -while True: - if dir: - r += 5 - else: - r -= 5 - if r>=255: - r = 255 - dir = False - elif r<0: - r = 0 - dir = True - for i in range(100): - a = class_ws2812.set_led(i,(0,0,r)) - a=class_ws2812.display() -``` - -## 程序库 - -在程序库文档中,你可以找到更多的API,方便你搭建各式各样的应用。 - -查看更多程序案例 - -Github - -

V-Function

- -V-Function是由M5Stack团队针对V系列设备开发的多个**视觉识别**功能固件,点击V-Funciton标题,查看使用说明. - - diff --git a/docs/zh_CN/quick_start/unitv/unitv_quick_start_maixpy.md b/docs/zh_CN/quick_start/unitv/unitv_quick_start_maixpy.md new file mode 100644 index 00000000..58926b41 --- /dev/null +++ b/docs/zh_CN/quick_start/unitv/unitv_quick_start_maixpy.md @@ -0,0 +1,185 @@ +# UnitV Maixpy上手指南 + + +## EasyLoader + + + + + +>1.EasyLoader是一个简洁快速的程序烧录器,每一个产品页面里的EasyLoader都提供了一个与产品相关的案例程序,对于不需要对固件进行定制或进行其他操作的用户,使用EasyLoader为UnitV烧录固件,会是一个最简洁的方案(**目前EasyLoader仅适用于Windows操作系统**). + +>2.下载软件后,双击运行应用程序,将M5设备通过数据线连接至电脑,选择端口参数,点击 **"Burn"** 即可开始烧录 + + +## 固件烧录 + +> 需要指定烧录文件的用户也可以选用**Kflash**进行固件烧录. + + + + +>1.点击下方对应自己操作系统的 Kflash_GUI烧录工具进行下载. + + + +>2.将设备通过Tpye-C数据线连接至电脑,双击打开烧录工具**Kflash_GUI**应用程序,选择对应的设备端口、开发板类型(M5StickV)、固件程序、波特率. 点击下载,开始烧录 . + + + +### Kflash + +>3.对于习惯使用命令行操作的用户来说还可以选择Kflash作为固件烧录工具.[点击此处查看详情](https://github.com/kendryte/kflash.py) + + +### 串口调试工具 + +>1.编程UnitV需要使用到串口调试工具,您可以使用Putty作为串口调试工具, [点击此处](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)访问Putty资源页面,选择对应自己操作系统Putty进行下载,并安装. + +>2.运行Putty后,将UnitV通过Tpye-C数据线连接至电脑端口,在Putty中设置相应的端口号与波特率,点击"open",开始连接. (你可以通过查看设备管理器得到UnitV所使用的端口号) + + + +> 连接成功后,将自动进入,MaixPy 的交互界面. 此时设备正在运行着默认程序,您可以通过按下快捷键"Ctrl+C"中断其运行,并进入命令行. + + + + + +## 编辑与运行文件 + +### 编辑文件 + +>在交互解释器(REPL)中,我们能够便捷的输入程序并马上得到运行结果,但这仅适合用作短程序的验证,在实际项目中,庞大代码量使得我们不得不将代码编辑成一个个的文件. + +>在 MaixPy 中,内置了一款编开源编辑器 [Micropython Editor(pye)](https://github.com/robert-hh/Micropython-Editor),这使得我们能够非常方便的修改程序文件. + +使用 `os.listdir()` 可以查看当前目录下的文件, + +使用 `pye("hello.py")` 可以创建文件并进入编辑模式(已存在同名文件,则仅进入编辑), 快捷键等使用说明可以在[这里查看](https://github.com/robert-hh/Micropython-Editor/blob/master/Pyboard%20Editor.pdf) + +在编辑器中完成编辑后,按 `Ctrl+S` > `Enter` 键进行保存, 按 `Ctrl+Q` 退出编辑 + +**注意**: 使用这款编辑器对使用的串口工具有一定要求, 必须将 `BackSpace` 按键设置为 `DEL` 功能, 否则按 `BackSpace` 调用的是 `Ctrl+H` 一样的功能(即字符替换) + + +### 运行文件 + +使用 `os.chdir()` 切换当前目录到文件的目录,比如 `os.chdir("/flash")` + +#### 方法一: `import` + +然后执行 `import hello` + +即可看到输出 `hello maixpy` + +使用此方法简单易用,但是需要注意的是, 目前 `import` 只能使用一次, 如果第二次 `import`, 则文件不会再执行, 如果需要多次执行,建议使用下面的方法 + +#### 方法二: `exec()` + +使用 `exec()` 函数来执行 + +```python +with open("hello.py") as f: + exec(f.read()) + +``` + +### 开机自动运行脚本 + +系统会在 `/flash` 或者 `/sd` 目录创建 `boot.py` 文件, 开机会自动先执行这个脚本, 编辑这个脚本的内容即可实现开机自启 + + +## MaixPy IDE + +#### 下载MaixPy IDE + +MaixPy IDE能够便捷的实现脚本程序的实时编辑、上传、执行,以及实时监控摄像头图像,文件传输等功能.使用 MaixPy IDE 因为数据的压缩、传输需要耗费一部分资源,所以性能会有所降低,但对性能需求不苛刻,或处于调试阶段的开发者来说这会是一个很不错的开发工具. + +MaixPy IDE + +#### 安装MaixPy IDE + +Windows平台可直接双击exe文件,运行安装程序. + +Linux命令行给运行权限然后,执行命令 + +`chmod +x maixpy-ide-linux-x86_64-0.2.2.run` + +`./maixpy-ide-linux-x86_64-0.2.2.run` + +#### 使用MaixPy IDE + +>运行MaixPy IDE, 点击工具栏,选择开发板的型号.`Tool`-> `Select Board`-> `M5StickV` (工具->选择开发板) + + + +>点击左下角的连接按钮,并选择正确的连接端口,点击OK. + + + +>当连接按钮由绿色变为红色的时表示,已经连接成功,你可以在上方的编辑框进行代码编辑,点击左下角的运行按钮能够执行代码,进行验证. + + + +## WS2812 + +固件内置了WS2812 RGB LED驱动库,以下为参考例程. 注意:由于UnitV的拓展端口不具备驱动负载功能,因此该程序仅适用于驱动内置的RGB LED: + +``` +from modules import ws2812 +from fpioa_manager import * +fm.register(8) +class_ws2812 = ws2812(8,100) +r=0 +dir = True +while True: + if dir: + r += 5 + else: + r -= 5 + if r>=255: + r = 255 + dir = False + elif r<0: + r = 0 + dir = True + for i in range(100): + a = class_ws2812.set_led(i,(0,0,r)) + a=class_ws2812.display() +``` + +## 程序库 + +在程序库文档中,你可以找到更多的API,方便你搭建各式各样的应用。 + +Maixpy docs + +Github + + + diff --git a/docs/zh_CN/quick_start/unitv/v_function.md b/docs/zh_CN/quick_start/unitv/v_function.md index 77d59435..0280770b 100644 --- a/docs/zh_CN/quick_start/unitv/v_function.md +++ b/docs/zh_CN/quick_start/unitv/v_function.md @@ -7,7 +7,7 @@ - + @@ -24,6 +24,11 @@ V-Function是由M5Stack团队针对V系列设备开发的多个**视觉识别** 运动目标检测 目标追踪 颜色追踪 + 人脸识别 + 二维码识别 + 条形码识别 + Datamatrix码识别 + Apriltag码识别
@@ -121,11 +126,62 @@ V-Function是由M5Stack团队针对V系列设备开发的多个**视觉识别** >程序案例:启用动态检测模式,通过读取画面的最高变化率数值大小,判断画面内目标是否存在运动情况。当变化率数值大于预期值时,显示"Moved",否则显示"Not Move"。屏幕显示当前的最高变化率数值。 - + - + +### 运动目标检测-数据包格式 + +#### 回传JSON + +``` +{ + "FUNC": "MOTION DETECT V1.0", + "DIFF TOTAL": 10000, //画面变动率 + "DIFF MAX": 75, // 最高变化率 + "TOTAL": 3, //边界框数量 + "0": { + "x": 45, + "y": 18, + "w": 126, + "h": 72, + "area": 342 //该边界框内变化像素的数量 + }, + "1": { + "x": 0, + "y": 169, + "w": 130, + "h": 24, + "area": 173 + }, + "2": { + "x": 39, + "y": 204, + "w": 276, + "h": 34, + "area": 141 + } +} + +``` + +#### 设置JSON + +``` +{ + "MOTION DETECT": 1.0, //功能标记,不可缺省 + "mode": "COMPUTE_MODE_STATIC", //可缺省 "COMPUTE_MODE_STATIC" 静态检测模式 or "COMPUTE_MODE_DYNAMIC" 动态检测模式 + "thr_w": 20, //可缺省 边界框宽阈值,[3,200] + "thr_h": 20, //可缺省 边界框长阈值,[3,200] + "stepx": 1, //可缺省 X扫描间隔,[0, 40],设置为0则关闭边界框检测 + "stepy": 2, //可缺省 Y扫描间隔,[0, 40],设置为0则关闭边界框检测 + "delta": 20, //可缺省 变化率阈值,[0, 99] + "merge": 10 //可缺省 边界框合并阈值,[0, 40] +} + +``` + ### 目标追踪 >设置追踪目标,实时获取目标对象处于画面中位置信息。 @@ -148,9 +204,36 @@ V-Function是由M5Stack团队针对V系列设备开发的多个**视觉识别** >程序案例:通过按键A设置框选目标,读取目标坐标值,用于控制屏幕上的矩形元素移动,模拟显示物体的运动轨迹。 - + - + + +### 目标追踪-数据包格式 + +#### 回传JSON + +``` +{ + "FUNC": "TARGET TRACKER V1.0", + "x": 282, + "y": 165, + "w": 13, + "h": 15 +} + +``` +#### 设置JSON + +``` +{ + "TARGET TRACKER": " V1.0", + "x": 282, //xywh均不可缺省 + "y": 165, + "w": 13, + "h": 15 +} + +``` ### 颜色追踪 @@ -165,7 +248,7 @@ V-Function是由M5Stack团队针对V系列设备开发的多个**视觉识别** + 初始化 - `Set color by L-min L-max A-min A-max B-min B-max` - + 设置追踪的LAB阈值 + + 设置追踪的LAB阈值(LAB颜色空间的颜色值,在该范围外的颜色将会被过滤) - `Get area pixel number` + 读取框选目标中符合LAB阈值的像素数量 @@ -202,13 +285,317 @@ V-Function是由M5Stack团队针对V系列设备开发的多个**视觉识别** >程序案例:设置识别的LAB阈值,实现颜色追踪效果,并获取被追踪对象在画面中的坐标数据,符合阈值的像素数量。 - + - + -## 数据包格式 +### 颜色追踪-数据包格式 ->点击下方按钮,下载数据包格式表格,用户可用于分析数据格式,将V-function接入到别的编程平台中使用。 +#### 回传JSON -下载数据包格式表格 +``` +{ + "FUNC": "COLOR TRACKER V1.0", + "TOTAL": 3, //边界框数量 + "0": { + "x": 45, + "y": 18, + "w": 126, + "h": 72, + "area": 342 //该边界框内变化像素的数量 + }, + "1": { + "x": 0, + "y": 169, + "w": 130, + "h": 24, + "area": 173 + }, + "2": { + "x": 39, + "y": 204, + "w": 276, + "h": 34, + "area": 141 + } +} + +``` +#### 设置JSON + +``` +{ + "COLOR TRACKER": 1.0, //功能标记,不可缺省 + "thr_w": 20, //可缺省 边界框宽阈值,[3,200] + "thr_h": 20, //可缺省 边界框长阈值,[3,200] + "stepx": 1, //可缺省 X扫描间隔,[0, 40],设置为0则关闭边界框检测 + "stepy": 2, //可缺省 Y扫描间隔,[0, 40],设置为0则关闭边界框检测 + "merge": 10, //可缺省 边界框合并阈值,[0, 40] + "Lmin": 0, //可缺省 L阈值下限 [0, 100] + "Lmax": 0, //可缺省 L阈值上限 [0, 100] + "Amin": 0, //可缺省 A阈值下限 [0, 255] + "Amax": 0, //可缺省 A阈值上限 [0, 255] + "Bmin": 0, //可缺省 B阈值下限 [0, 255] + "Bmax": 0, //可缺省 B阈值上限 [0, 255] +} + +``` + + +### 人脸识别 + +>识别画面中的人脸信息,并返回识别个数,对象坐标,置信率。 + + + +>程序块介绍 + +- `init` + + 初始化 + +- `Get face numbers` + + 读取识别到的人脸数量 + +- `Get number N face detail` + + 读取指定编号的人脸详情数据,返回格式为列表,其中包含人脸框选坐标,长度宽度,以及置信率 + +>程序案例:读取画面中人脸识别结果,以及置信率。 + + + + + +### 人脸识别-数据包格式 + +#### 回传JSON + +``` +{ + "FUNC": "FACE DETECT", // 功能说明 + "count": 3, // 识别到的人脸数量 + "2": { // 人脸编号 + "x": 97, // ROI + "y": 26, + "w": 64, + "h": 86, + "value": 0.859508, // 置信率 + "classid": 0, + "index": 2, + "objnum": 3 + }, + "1": { + "x": 70, + "y": 157, + "w": 38, + "h": 63, + "value": 0.712100, + "classid": 0, + "index": 1, + "objnum": 3 + }, + "0": { + "x": 199, + "y": 145, + "w": 31, + "h": 40, + "value": 0.859508, + "classid": 0, + "index": 0, + "objnum": 3 + } + } + + +``` + + +## 二维码识别 + +>识别画面中的二维码,并返回识别结果,以及版本。 + + + +>程序块介绍 + +- `init` + + 初始化 + +- `Get QR code text` + + 读取识别到的二维码内容 + +- `Get QR code version` + + 读取识别到的二维码版本 + +#### 回传JSON + +``` +{ + "count": 1, + "FUNC": "FIND QRCODE", + "0": { + "x": 57, + "y": 16, + "w": 197, + "h": 198, + "payload": "m5stack", //二维码数据 + "version": 1, //二维码版本 + "ecc_level": 1, //二维码ECC水平 + "mask": 2, //二维码掩码 + "data_type": 4, //二维码数据类型 + "eci": 0 //返回二维码的ECI。 + } +} + +``` + +## 条形码识别 + +>识别画面中的条形码,并返回识别结果,以及版本。 + + + +>程序块介绍 + +- `init` + + 初始化 + +- `Get bar code text` + + 读取识别到的条形码内容 + +- `Get bar code rotation` + + 读取识别到的条码旋转角度 + +- `Get bar code type` + + 读取识别到的条码类别 + +- `Get bar code location` + + 读取识别到的条码的框选坐标,长度宽度,返回值为列表 + +#### 回传JSON + +``` +{ + "0": { + "x": 62, + "y": 90, + "w": 100, + "h": 45, + "payload": "123", //数据 + "type": 15, //条码类别 + "rotation": 0.000000, //条码旋转角度 + "quality": 28 //条码在图像中被扫描的次数 + }, + "count": 1, + "FUNC": "FIND BARCODE" +} + +``` + +## Datamatrix码识别 + +>识别画面中的Datamatrix码,并返回识别结果,以及码旋转角度,坐标数据。 + + + +>程序块介绍 + +- `init` + + 初始化 + +- `Get datamatrix code text` + + 读取识别到的Datamatrix码内容 + +- `Get bar code rotation` + + 读取识别到的Datamatrix码旋转角度 + +- `Get bar code location` + + 读取识别到的Datamatrix码的框选坐标,长度宽度,返回值为列表 + +#### 回传JSON + +``` +{ + "0": { + "x": 20, + "y": 116, + "w": 96, + "h": 96, + "payload": "m5stack", + "rotation": 1.588250, //DM码旋转角度 + "rows": 16, //DM码行数 + "columns": 16, //DM码列数 + "capacity": 12, //DM码容量(字节) + "padding": 1 //DM码剩余容量(字节) + }, + "count": 1, + "FUNC": "FIND DATAMATRIX" +} + +``` + + +## Apriltag码识别 + +>识别画面中的Apriltag码,并获取其位置的偏移。 + + + +>程序块介绍 + +- `init` + + 初始化 + +- `Get AprilTag Translation` + + 读取Apriltag码的位置偏移 + +- `Get AprilTag rotation` + + 返回以弧度计的AprilTag的旋度(int) + +- `Get AprilTag location` + + 读取识别到的Datamatrix码的框选坐标,中心坐标,长度宽度,返回值为列表 + +#### 回传JSON + +``` +{ + "0": { + "x": 71, + "y": 5, + "w": 85, + "h": 88, + "id": 1, + "family": 16,// AprilTag的类别 + "cx": 115, + "cy": 49, + "rotation": 6.219228,// 返回以弧度计的AprilTag的旋度(int)。 + "decision_margin": 0.451959,// AprilTag匹配的色饱和度(取值0.0 - 1.0),其中1.0为最佳。 + "hamming": 0,// AprilTag的可接受的数位误差数值 + "goodness": 0.000000, //AprilTag图像的色饱和度 + "x_translation": 0.868200, + "y_translation": 0.245313, + "z_translation": -2.725188, + "x_rotation": 3.093776, + "y_rotation": 0.065489, + "z_rotation": 6.219228 + }, + "count": 1, + "FUNC": "FIND APRILTAG" +} + +``` +#### 识别模式设置JSON + +>以上多个识别码功能,均使用同一个固件实现,用户可以通过发送下方JSON数据,配置模式切换。 + +``` + +{ + "FIND CODE": 1.0, + "mode":"DATAMATRIX" //识别模式,可选QRCODE,APRILTAG,DATAMATRIX,BARCODE +} +``` + +## 更多内容 + +Github diff --git a/docs/zh_CN/related_documents/v-training.md b/docs/zh_CN/related_documents/v-training.md index e0a1f117..514645db 100644 --- a/docs/zh_CN/related_documents/v-training.md +++ b/docs/zh_CN/related_documents/v-training.md @@ -7,32 +7,97 @@ ## 烧录固件 -已经烧录了M5StickV固件程序的设备请直接从步骤二开始,[未烧录固件的用户请单击此处查看固件烧录教程](zh_CN/quick_start/m5stickv/m5stickv_quick_start) +### EasyLoader + + + +点击下载EasyLoader + +>1.EasyLoader是一个简洁快速的程序烧录器,每一个产品页面里的EasyLoader都提供了一个与产品相关的案例程序,对于不需要对固件进行定制或进行其他操作的用户,使用EasyLoader为UnitV烧录固件,会是一个最简洁的方案(**目前EasyLoader仅适用于Windows操作系统**). + +>2.下载软件后,双击运行应用程序,将M5设备通过数据线连接至电脑,选择端口参数,点击 **"Burn"** 即可开始烧录 + + +### Kflash_GUI + +> 需要指定烧录文件的用户也可以选用**Kflash**进行固件烧录. + +点击下载固件文件 + + +>1.点击下方对应自己操作系统的 Kflash_GUI烧录工具进行下载. + + + +>2.将设备通过Tpye-C数据线连接至电脑,双击打开烧录工具**Kflash_GUI**应用程序,选择对应的设备端口、开发板类型(M5StickV)、固件程序、波特率. 点击下载,开始烧录 . + + + +### Kflash + +>3.对于习惯使用命令行操作的用户来说还可以选择Kflash作为固件烧录工具.[点击此处查看详情](https://github.com/kendryte/kflash.py) ## 分类模式 -### boot程序 +?>进行模型训练需要使用到大量的训练素材图片,由于M5StickV与UnitV硬件上的不同,素材拍摄方法上也有着不同,请根据实际使用的硬件参考下方说明进行拍摄. -> 拍摄训练素材需要使用到SD卡,用户需下载boot程序压缩包,并将压缩包内的所有文件解压放置到SD卡中(M5StickV对SD卡的选型有所要求,[点击此处查看支持类型](zh_CN/core/m5stickv?id=sd卡测试)) +### M5StickV-素材拍摄 +> 拍摄训练素材需要使用到SD卡,用户需下载boot-M5StickV程序压缩包,并将压缩包内的所有文件解压放置到SD卡中(M5StickV对SD卡的选型有所要求,[点击此处查看支持类型](zh_CN/core/m5stickv?id=sd卡测试)) - +点击下载boot-M5StickV程序 - -### 素材拍摄 - >开机前插入SD卡,用于储存图片素材,长按左侧电源键进行开机,当屏幕出现,如下图Training字样时,则表示成功进入拍摄程序. ->目前程序一共提供了10组Class供用户拍摄训练素材,每一组Class代表着一种识别对象.为了获得更好的训练效果,用户必须要拍摄3组以上的Class(三个以上的识别对象). - >屏幕上方的导航栏将实时显示当前的Class序号以及拍摄图片数量,按下HOME键进行图片拍摄,机身右侧的按键则用于切换Class序号. +?>目前程序一共提供了10组Class供用户拍摄训练素材,每一组Class代表着一种识别对象.为了获得更好的训练效果,用户必须要拍摄3组以上的Class(三个以上的识别对象).为了保证识别的准确率,每组Class拍摄素材张数需要超过35张,否则在进行云端训练时将不给予通过. 素材的数量越多,识别训练的效果越好,识别率越高 + +### UnitV-素材拍摄 + +>boot-UnitV程序是适用于UnitV的一个图片素材拍摄程序,用于模型训练前期的素材收集。 + +点击下载boot-UnitV程序 + +>拍摄的训练素材将默认储存到SD卡,因此在运行boot程序前请将SD卡插入UnitV的卡槽。(注意:UnitV对SD卡的选型有所要求,[点击此处查看支持类型](zh_CN/unit/unitv?id=sd卡测试)) + +>运行MaixPy IDE,连接UnitV设备.点击"打开文件"选项,打开已经下载的boot.py文件,点击运行按钮。运行成功后,在MaixPy IDE的右上角将实时监视摄像头画面 + +>配合IDE上的摄像头画面进行拍摄操作,按下A键进行图片拍摄,B键按键则用于切换Class序号.输出日志将对应每一次操作的Class序号以及拍摄图片数量。点击下方的"串口监视器",查看日志输出。 + + + +?>目前程序一共提供了10组Class供用户拍摄训练素材,每一组Class代表着一种识别对象.为了获得更好的训练效果,用户必须要拍摄3组以上的Class(三个以上的识别对象).为了保证识别的准确率,每组Class拍摄素材张数需要超过35张,否则在进行云端训练时将不给予通过. 素材的数量越多,识别训练的效果越好,识别率越高 + + + >在拍摄训练素材时,请尽可能保持素材拍摄的环境光线情况与实际识别应用场景一致,拍摄距离建议将识别对象刚好完整填入屏幕,且背景无其他杂物. @@ -73,13 +138,43 @@ >最后将SD卡插入M5StickV,开机即可自动运行程序. - >默认程序将把物体按照Class序号进行识别,并显示在屏幕上,用户可以通过修改boot.py文件,修改显示的信息. +### 程序修改 + +>由于UnitV并不集成屏幕,因此用户可以根据自己的需求,基于现有程序进行修改。实现识别数据的输出,或是识别成功后相应的执行功能。例如将识别信息通过串口打印出来。 + +**以下为添加了串口打印程序的boot程序,仅作部分内容注释,并非完整程序,实际使用请基于训练返回的boot程序文件修改** + +``` + ... + + task = kpu.load("/sd/c33723fb62faf1be_mbnet10_quant.kmodel")//载入模型文件 + + labels=["1","2","3","4","5","6"] #该列表对应训练素材时的Class顺序,分别对应每一个识别物,你也可以将列表内的元素,修改成其他字符串字段. + + + while(True): + img = sensor.snapshot() + fmap = kpu.forward(task, img) + plist=fmap[:] + pmax=max(plist) + max_index=plist.index(pmax) + a = lcd.display(img) + if pmax > 0.95://判断对象的识别率是否大于95% + lcd.draw_string(40, 60, "Accu:%.2f Type:%s"%(pmax, labels[max_index].strip())) + print(labels[max_index])//将所识别的对象名称通过串口打印出来。 + + .... +``` + + + + ## 检测模式(Yolov3) ### 素材拍摄