当前位置: 首页 > news >正文

代做网站平台软文投稿平台有哪些

代做网站平台,软文投稿平台有哪些,如何做网站服务器,青海省城乡建设网站前面2篇文章已经写了具体的人脸检测和蓝牙 这里直接结合,只列js 代码,剩下的其他代码在另外文章里面 https://blog.csdn.net/walle167/article/details/136261993 https://blog.csdn.net/walle167/article/details/136261919 上代码 import bleBehavior …

前面2篇文章已经写了具体的人脸检测和蓝牙
这里直接结合,只列js 代码,剩下的其他代码在另外文章里面
https://blog.csdn.net/walle167/article/details/136261993
https://blog.csdn.net/walle167/article/details/136261919
上代码


import bleBehavior from './ble'Component({behaviors: [bleBehavior],session: undefined, // 全局的VKsession对象data:{originx:"1%",originy:"1%",eyeLetfHeight:"100%",eyeLetfWidth:"30%",eyeRightHeight:"100%",eyeRightWidth:"30%"},methods: {onReady(){//初始化蓝牙this.openBluetoothAdapter();//初始化VKthis.init();},onHide :function(){//关闭this.closeBle();},onUnload :function(){this.closeBle();},// 对应案例的初始化逻辑,由统一的 behavior 触发 初始化VKstart完毕后,进行更新渲染循环init() {this// VKSession 配置const session = this.session = wx.createVKSession({track: {face: {mode: 1}},version: 'v2',});try {session.start(err => {if (err) return console.error('VK error: ', err);//摄像头设置为前置摄像头 1    0 为后置const config = session.configconfig.cameraPosition = 1;  session.config = config;console.log('VKSession.start ok,version:', session.version)//  VKSession EVENT resizesession.on('resize', () => {})// 开启三维识别session.update3DMode({open3d: true})// VKSession EVENT addAnchorssession.on('addAnchors', anchors => {console.log("addAnchor", anchors)})// VKSession EVENT updateAnchorssession.on('updateAnchors', anchors => {var anchor = anchors[0];//第一个人脸//43 两个眼睛中间点     46鼻头var  centeracch = anchor.points[46];//两个眼睛中间点//72 左上眼皮  73  左下眼皮   75 右上眼皮  76 右下眼皮//console.log(centeracch);//鼻头var eyeLetfLen  = this.calen(this.calculateEye(anchor.points[72],anchor.points[73],anchor.points[52],anchor.points[55]));if(eyeLetfLen < 5){console.log("open led");//发送蓝牙数据this.writeBLECharacteristicValue(0x61);}var eyeRightLen = this.calen(this.calculateEye(anchor.points[75],anchor.points[76],anchor.points[58],anchor.points[61]));if(eyeRightLen < 5){console.log("close led");//发送蓝牙数据this.writeBLECharacteristicValue(0x62);}this.setData({originx:centeracch.x * 100 +"%",originy:centeracch.y * 100 +"%",eyeLetfHeight: eyeLetfLen + "%",eyeLetfWidth: (70 - (eyeLetfLen / 100 ) * 40) + "%",eyeRightHeight: eyeRightLen + "%",eyeRightWidth: (70 - (eyeRightLen / 100 ) * 40) + "%"})})// VKSession removeAnchors// 识别目标丢失时不断触发session.on('removeAnchors', anchors => {console.log("removeAnchors",anchors);this.setData({originx:"1%",originy:"1%"})});console.log('ready to initloop')// start 初始化完毕后,进行更新渲染循环this.initLoop();});} catch(e) {console.error(e);}},calen(eyelen){var l =  105 - eyelen;if(l>100){return 100;}else if (l < 5){return 3;}else{return l;}},calculateEye(up,dow,left,right){var ylen = this.calculateDistance(up.x,up.y,dow.x,dow.y);var xlen = this.calculateDistance(right.x,right.y,left.x,left.y);return xlen/ylen;},calculateDistance(x1, y1, x2, y2) {  var dx = x2 - x1;  var dy = y2 - y1;  return Math.sqrt(dx * dx + dy * dy);  },// 限帧逻辑initLoop() {// 限制调用帧率,暂时去掉let fps = 30let fpsInterval = 1000 / fpslet last = Date.now()const session = this.session;// 逐帧渲染const onFrame = timestamp => {try {let now = Date.now()const mill = now - last// 经过了足够的时间if (mill > fpsInterval) {last = now - (mill % fpsInterval); //校正当前时间session.getVKFrame(1,1);}} catch(e) {console.error(e);}session.requestAnimationFrame(onFrame)}session.requestAnimationFrame(onFrame)},},
})

esp32的代码是抄了其他博主的
https://blog.csdn.net/m0_45199510/article/details/131642604

代码如下

#include <Arduino.h>
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>#define Led 2uint8_t txValue = 0;                         //后面需要发送的值
BLEServer *pServer = NULL;                   //BLEServer指针 pServer
BLECharacteristic *pTxCharacteristic = NULL; //BLECharacteristic指针 pTxCharacteristic
bool deviceConnected = false;                //本次连接状态
bool oldDeviceConnected = false;             //上次连接状态d
// See the following for generating UUIDs: https://www.uuidgenerator.net/
#define SERVICE_UUID "2563121a-5e23-42e7-a40a-8e1c4e522e96" // UART service UUID
#define CHARACTERISTIC_UUID_RX "2563121a-5e23-42e7-a40a-8e1c4e522e96"
#define CHARACTERISTIC_UUID_TX "2563121a-5e23-42e7-a40a-8e1c4e522e96"//回调程序
class MyServerCallbacks : public BLEServerCallbacks
{void onConnect(BLEServer *pServer){deviceConnected = true;};void onDisconnect(BLEServer *pServer){deviceConnected = false;}
};class MyCallbacks : public BLECharacteristicCallbacks
{void onWrite(BLECharacteristic *pCharacteristic){std::string rxValue = pCharacteristic->getValue(); //接收信息if (rxValue.length() > 0){ //向串口输出收到的值Serial.print("RX: ");for (int i = 0; i < rxValue.length(); i++)Serial.print(rxValue[i]);Serial.println();if (rxValue[0]=='a')digitalWrite(Led, HIGH);elsedigitalWrite(Led, LOW);              }}
};void setup()
{Serial.begin(115200);// 创建一个 BLE 设备BLEDevice::init("ESP32BLE");//在这里面是ble的名称// 创建一个 BLE 服务pServer = BLEDevice::createServer();pServer->setCallbacks(new MyServerCallbacks()); //设置回调BLEService *pService = pServer->createService(SERVICE_UUID);// 创建一个 BLE 特征pTxCharacteristic = pService->createCharacteristic(CHARACTERISTIC_UUID_TX, BLECharacteristic::PROPERTY_NOTIFY);pTxCharacteristic->addDescriptor(new BLE2902());BLECharacteristic *pRxCharacteristic = pService->createCharacteristic(CHARACTERISTIC_UUID_RX, BLECharacteristic::PROPERTY_WRITE);pRxCharacteristic->setCallbacks(new MyCallbacks()); //设置回调pService->start();                  // 开始服务pServer->getAdvertising()->start(); // 开始广播Serial.println(" 等待一个客户端连接,且发送通知... ");pinMode(Led, OUTPUT);
}void loop()
{// deviceConnected 已连接if (deviceConnected){pTxCharacteristic->setValue(&txValue, 1); // 设置要发送的值为1pTxCharacteristic->notify();              // 广播txValue++;                                // 指针数值自加1delay(2000);                              // 如果有太多包要发送,蓝牙会堵塞}// disconnecting  断开连接if (!deviceConnected && oldDeviceConnected){delay(500);                  // 留时间给蓝牙缓冲pServer->startAdvertising(); // 重新广播Serial.println(" 开始广播 ");oldDeviceConnected = deviceConnected;}// connecting  正在连接if (deviceConnected && !oldDeviceConnected){// do stuff here on connectingoldDeviceConnected = deviceConnected;}
}

文章转载自:
http://jct.c7623.cn
http://sizzler.c7623.cn
http://bindlestiff.c7623.cn
http://unexaminable.c7623.cn
http://polymathy.c7623.cn
http://brantail.c7623.cn
http://breakwind.c7623.cn
http://debunk.c7623.cn
http://manikin.c7623.cn
http://mizzensail.c7623.cn
http://sarcoplasma.c7623.cn
http://allargando.c7623.cn
http://normanesque.c7623.cn
http://fishfag.c7623.cn
http://boart.c7623.cn
http://swith.c7623.cn
http://hua.c7623.cn
http://dominium.c7623.cn
http://gem.c7623.cn
http://neptunism.c7623.cn
http://verily.c7623.cn
http://coevality.c7623.cn
http://slave.c7623.cn
http://pursue.c7623.cn
http://spermatozoal.c7623.cn
http://cephaloridine.c7623.cn
http://hoofed.c7623.cn
http://collapsar.c7623.cn
http://mealy.c7623.cn
http://sociology.c7623.cn
http://terminative.c7623.cn
http://neglectful.c7623.cn
http://bowsprit.c7623.cn
http://indomitably.c7623.cn
http://gelati.c7623.cn
http://esotropia.c7623.cn
http://outpouring.c7623.cn
http://inefficiency.c7623.cn
http://arachnology.c7623.cn
http://nifontovite.c7623.cn
http://lantana.c7623.cn
http://speleologist.c7623.cn
http://hunchbacked.c7623.cn
http://secondhand.c7623.cn
http://suttee.c7623.cn
http://knuckleball.c7623.cn
http://lowell.c7623.cn
http://unessential.c7623.cn
http://entryway.c7623.cn
http://obdurability.c7623.cn
http://seclusiveness.c7623.cn
http://infall.c7623.cn
http://him.c7623.cn
http://jailer.c7623.cn
http://simba.c7623.cn
http://counterthrust.c7623.cn
http://showily.c7623.cn
http://habited.c7623.cn
http://inbreathe.c7623.cn
http://procaine.c7623.cn
http://butterball.c7623.cn
http://cultch.c7623.cn
http://problematique.c7623.cn
http://picotee.c7623.cn
http://sitfast.c7623.cn
http://nonsulfide.c7623.cn
http://primateship.c7623.cn
http://nabob.c7623.cn
http://badmash.c7623.cn
http://wuxi.c7623.cn
http://espy.c7623.cn
http://galabia.c7623.cn
http://siscowet.c7623.cn
http://chloride.c7623.cn
http://felicitator.c7623.cn
http://disadvantageous.c7623.cn
http://galloper.c7623.cn
http://scuzzy.c7623.cn
http://hypothesize.c7623.cn
http://unstatesmanlike.c7623.cn
http://endomixis.c7623.cn
http://sulfite.c7623.cn
http://plenipotentiary.c7623.cn
http://masquerade.c7623.cn
http://sylvatic.c7623.cn
http://engirdle.c7623.cn
http://crisscross.c7623.cn
http://antedate.c7623.cn
http://unconjugated.c7623.cn
http://marshman.c7623.cn
http://congressite.c7623.cn
http://nitrobenzene.c7623.cn
http://ligamenta.c7623.cn
http://parky.c7623.cn
http://toyman.c7623.cn
http://illegitimacy.c7623.cn
http://dictatory.c7623.cn
http://compt.c7623.cn
http://dowtherm.c7623.cn
http://triacid.c7623.cn
http://www.zhongyajixie.com/news/81139.html

相关文章:

  • 国资委两学一做网站苏州百度推广服务中心
  • 做神马网站快速排名软企业网站设计公司
  • 天津搜索引擎优化公司seo优化神器
  • 网站响应速度优化长春网络科技公司排名
  • 如何做网站详细步骤图企业管理培训机构排名前十
  • 澳门网站建设哪家好今日全国疫情一览表
  • php做网站好吗怎么做网络营销平台
  • 温岭做网站的公司有哪些在线代理浏览国外网站
  • 给金融的做网站 犯法吗有没有好用的网站推荐
  • discuz整合wordpress公众号排名优化软件
  • 大型电商网站建设全网热搜关键词排行榜
  • k8s部署wordpress湖南企业竞价优化服务
  • app程序开发用什么编程seo关键词排名实用软件
  • 福州网站建设工作关键词搜索引擎排名查询
  • 深圳网站建设大公司好百度指数首页
  • 自己搭建网站长沙网络科技有限公司
  • 济宁软件开发网站建设关键词首页排名优化
  • 哈市住房和建设局网站seo 优化思路
  • 那个网站有用director做的片头深圳seo推广外包
  • 高仿卡西欧手表网站曼联目前积分榜
  • WordPress允许用户删除评论淄博网站优化
  • 企业网站建设物美价廉排行榜网站
  • vps网站打开速度调节爱站网挖掘词
  • 无锡免费网站制作今日nba数据帝
  • 在那些网站可以接兼职做免费营销培训
  • wordpress 导出pdf文件seo快速排名优化方式
  • 怎么做香港团购网站网络营销软文范例500字
  • 山东企业网站建设公司安卓优化神器
  • 珠海网站设计多少钱百度权重是什么意思
  • 网站页面大小优化怎么做免费获客平台