chinese直男口爆体育生外卖, 99久久er热在这里只有精品99, 又色又爽又黄18禁美女裸身无遮挡, gogogo高清免费观看日本电视,私密按摩师高清版在线,人妻视频毛茸茸,91论坛 兴趣闲谈,欧美 亚洲 精品 8区,国产精品久久久久精品免费

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

如何通過Wekinator平臺使用手勢控制Arduino

454398 ? 來源:工程師吳畏 ? 2019-07-30 14:35 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

電路圖

將其中一個蜂鳴器的正極連接到Arduino的9針和Arduino的10針的另一個蜂鳴器的正面。然后將兩個蜂鳴器的負片連接到項目的Arduino.section的地面。

如何運行代碼

首先,在Arduino IDE中粘貼為本文末尾的Arduino提供的代碼并上傳代碼。

然后您需要從Wekinator的示例頁面下載草圖。

下載源代碼以處理簡單的10x10顏色網(wǎng)格。解壓縮并在處理中運行代碼。該程序?qū)⑹褂媚墓P記本電腦的網(wǎng)絡(luò)攝像頭,根據(jù)您在攝像頭前所做的操作,它將為Wekinator提供輸入。

您需要另一個草圖來輸出Wekinator的輸出。這篇文章末尾的草圖代碼。將其粘貼到處理中并運行草圖。這個草圖將從Wekinator輸出并將其發(fā)送到Arduino,蜂鳴器將播放不同的聲音。

兩個處理窗口應(yīng)如下所示。

現(xiàn)在打開Wekinator并進行如下圖所示的設(shè)置。將輸入設(shè)置為100,將輸出設(shè)置為2.將類型設(shè)置為“自定義”,然后單擊“配置”。

點擊“配置”時“,一個新窗口將打開,如下所示。更改設(shè)置,如下圖所示。

現(xiàn)在退出網(wǎng)絡(luò)攝像頭并點擊“隨機化”。開始錄制半秒。

現(xiàn)在將右手顯示在網(wǎng)絡(luò)攝像頭的右側(cè),然后單擊“隨機化”。然后開始錄制半秒。

現(xiàn)在將左手顯示在網(wǎng)絡(luò)攝像頭的左側(cè),然后單擊“隨機化”。然后開始錄制半秒。

然后,單擊“訓(xùn)練”,然后單擊“運行”?,F(xiàn)在,Arduino將根據(jù)您在網(wǎng)絡(luò)攝像頭前顯示的手勢播放聲音。

處理代碼(Wekinator輸出)

import vsync.*; // Importing the library that will help us in sending and receiving the values from the Arduino

import processing.serial.*; // Importing the serial library

// Below libraries will connect and send, receive the values from wekinator

import oscP5.*;

import netP5.*;

// Creating the instances

OscP5 oscP5;

NetAddress dest;

ValueSender sender;

// These variables will be syncronized with the Arduino and they should be same on the Arduino side.

public int output;

public int output1;

void setup()

{

// Starting the serial communication, the baudrate and the com port should be same as on the Arduino side.

Serial serial = new Serial(this, “COM10”, 19200);

sender = new ValueSender(this, serial);

// Synchronizing the variables as on the Arduino side. The order should be same.

sender.observe(“output”);

sender.observe(“output1”);

// Starting the communication with wekinator. listen on port 12000, return messages on port 6448

oscP5 = new OscP5(this, 12000);

dest = new NetAddress(“127.0.0.1”, 6448);

}

// Recieve OSC messages from Wekinator

void oscEvent(OscMessage theOscMessage) {

if (theOscMessage.checkAddrPattern(“/wek/outputs”) == true) {

// Receiving the output from wekinator

float value = theOscMessage.get(0).floatValue(); // First output

float val = theOscMessage.get(1).floatValue(); // Second output

// Converting the output to int type

output = int(value);

output1 = int(val);

}

}

void draw()

{

// Nothing to be drawn for this example

}

Arduino代碼

#include // Including the library that will help us in receiving and sending the values from processing

ValueReceiver《2》 receiver; /*Creating the receiver that will receive up to 2 values.

Put the number of values to synchronize in the brackets */

/* The below two variables will be synchronized in the processing

and they should be same on both sides. */

int output;

int output1;

// Pin connected to buzzer

int buzzer = 9;

int buzzer1 = 10;

int i,j;

void setup()

{

/* Starting the serial communication because we are communicating with the

Arduino through serial. The baudrate should be same as on the processing side. */

Serial.begin(19200);

// Synchronizing the variables with the processing. The variables must be int type.

receiver.observe(output);

receiver.observe(output1);

// Defines the Buzzer pins as output

pinMode(buzzer,OUTPUT);

pinMode(buzzer1,OUTPUT);

}

void loop()

{

// Receiving the output from the processing.

receiver.sync();

// Making the buzzer to beep according to the output from the processing

tone(buzzer1, output);

delay(5);

noTone(buzzer1);

tone(buzzer,output1);

delay(5);

noTone(buzzer);

}

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • Arduino
    +關(guān)注

    關(guān)注

    190

    文章

    6514

    瀏覽量

    195852
  • 手勢控制
    +關(guān)注

    關(guān)注

    4

    文章

    44

    瀏覽量

    22168
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關(guān)推薦
    熱點推薦

    傳統(tǒng)油煙機智能化升級之雷達手勢感應(yīng)喚醒控制方案

    傳統(tǒng)的油煙機需要通過按鍵觸摸開機或者語音控制開機,按鍵控制在炒菜的時候不是很方便,而語音控制在高檔位噪音大時容易受到油煙機的噪音影響,現(xiàn)在新的控制
    的頭像 發(fā)表于 11-12 09:28 ?252次閱讀
    傳統(tǒng)油煙機智能化升級之雷達<b class='flag-5'>手勢</b>感應(yīng)喚醒<b class='flag-5'>控制</b>方案

    貿(mào)澤電子開售全新Arduino UNO Q單板計算機

    貿(mào)澤電子開售全新Arduino UNO Q單板計算機。Arduino UNO Q單板計算機(SBC)將高性能計算與實時控制結(jié)合,提供理想的創(chuàng)新平臺。
    的頭像 發(fā)表于 11-08 09:50 ?924次閱讀

    基于STMicroelectronics AEK-SNS-2TOFM1手勢檢測系統(tǒng)的技術(shù)解析與應(yīng)用實踐

    STMicroelectronics AEK-SNS-2TOFM1預(yù)定義手勢檢測系統(tǒng)包括兩個飛行時間測距傳感器。這些傳感器彼此距離23cm放置。車載SPC582B60E1微控制器讀取傳感器數(shù)據(jù)并檢測預(yù)定義的手勢/腳勢。該解決方案
    的頭像 發(fā)表于 10-29 16:07 ?355次閱讀
    基于STMicroelectronics AEK-SNS-2TOFM1<b class='flag-5'>手勢</b>檢測系統(tǒng)的技術(shù)解析與應(yīng)用實踐

    【技術(shù)討論】智能戒指手勢交互:如何優(yōu)化PCBA成本與實現(xiàn)<20ms低延遲?

    我們正在開發(fā)一款通過手勢實時控制音樂的嵌入式可穿戴設(shè)備(架構(gòu)如圖:nRF5340主控 + ICM-42607 IMU)。希望重構(gòu)聽眾與音樂之間的關(guān)系。在早期小批量生產(chǎn)中,我們面臨兩個核心挑戰(zhàn),希望
    發(fā)表于 10-18 13:04

    無需手持更靈活!納祥科技智能帽夾燈方案(紅外感應(yīng)+手勢控制

    控制技術(shù),有效解決了傳統(tǒng)手持電筒笨重、依賴手持操作的局限性。方案概述本方案以低功耗單片機為中樞,支持感應(yīng)和常規(guī)2種工作模式:感應(yīng)模式可通過紅外對管實現(xiàn)手勢識別,來
    的頭像 發(fā)表于 10-10 15:09 ?237次閱讀
    無需手持更靈活!納祥科技智能帽夾燈方案(紅外感應(yīng)+<b class='flag-5'>手勢</b><b class='flag-5'>控制</b>)

    高通宣布收購 Arduino,加速普及前沿邊緣計算與 AI 技術(shù)

    UNO Q 是 Arduino 首款由高通 Dragonwing 平臺驅(qū)動的“雙大腦”開發(fā)板,它橋接了高性能計算與實時控制,能夠“眨眼間實
    的頭像 發(fā)表于 10-08 11:15 ?318次閱讀
    高通宣布收購 <b class='flag-5'>Arduino</b>,加速普及前沿邊緣計算與 AI 技術(shù)

    如何在 NuMaker-IoT-M467 板上使用 Arduino IDE 控制 Wi-Fi 模塊?

    在NuMaker開發(fā)板上,有一個ESP-12F Wi-Fi模塊;但是,Arduino IDE 中的 NuMaker UNO 包不提供該模塊的相關(guān)控制。如果您希望在 Arduino IDE 中
    發(fā)表于 09-04 08:28

    XenG202G | 揮手手勢識別參考設(shè)計(三維)

    WEMAKERFSMART-賦予萬物感知的靈魂-矽典微ICLEGENDMICROXenG202G揮手手勢識別(三維)毫米波傳感器特征手勢識別:非接觸式控制,高精度手勢動作識別,支持方向
    的頭像 發(fā)表于 08-29 08:25 ?382次閱讀
    XenG202G | 揮手<b class='flag-5'>手勢</b>識別參考設(shè)計(三維)

    免費分享Arduino入門+進階(全套例程+書籍)

    Arduino是一款開源電子原型平臺,由硬件(單片機開發(fā)板)和軟件(編程環(huán)境)組成,旨在讓非專業(yè)用戶也能輕松入門電子制作和編程。它的核心思想是簡化硬件開發(fā),通過直觀的編程和模塊化設(shè)計,讓用戶快速實現(xiàn)
    的頭像 發(fā)表于 05-22 11:40 ?759次閱讀
    免費分享<b class='flag-5'>Arduino</b>入門+進階(全套例程+書籍)

    《ESP32S3 Arduino開發(fā)指南》第二章 Arduino基礎(chǔ)知識

    的發(fā)展,在Arduino出現(xiàn)以前,雖然也有很多公司在推廣一些簡單易用的可編程控制器,但是由于開發(fā)平臺種類繁多,而且使用這些控制器基本上都需要對電子技術(shù)、數(shù)字邏輯、寄存器等內(nèi)容進行多方面
    發(fā)表于 05-13 09:28

    通過Arduino Nano Matter開發(fā)板構(gòu)建智能卷簾系統(tǒng)

    在本指南中,您將學(xué)習(xí)如何通過Arduino NanoMatter開發(fā)板和板上的Silicon Labs(芯科科技)MGM240S多協(xié)議無線模塊來構(gòu)建一個智能卷簾系統(tǒng)。該系統(tǒng)可通過 Amazon
    的頭像 發(fā)表于 02-28 09:46 ?896次閱讀
    <b class='flag-5'>通過</b><b class='flag-5'>Arduino</b> Nano Matter開發(fā)板構(gòu)建智能卷簾系統(tǒng)

    STM32、Arduino、樹莓派開發(fā)方式差異大嗎

    異同點 STM32、Arduino、樹莓派是三種不同的硬件平臺,各自具有獨特的特點和適用場景。 ? 一、硬件特性 ? 硬件平臺 STM32 Arduino 樹莓派 類型 微
    的頭像 發(fā)表于 01-02 11:33 ?1905次閱讀

    如何使用Arduino實現(xiàn)CAN總線通信呢

    CAN(Controller Area Network)總線是一種常用于汽車和工業(yè)控制系統(tǒng)的串行通信協(xié)議,以其高可靠性和實時性而聞名。Arduino,作為一種流行的開源微控制平臺,可
    的頭像 發(fā)表于 12-23 09:06 ?2793次閱讀

    Arduino Nano Matter開發(fā)板正式上市

    Silicon Labs(芯科科技)和Arduino在近日共同宣布Arduino Nano Matter開發(fā)板現(xiàn)已正式上市。這是延續(xù)今年3 月芯科科技和Arduino釋出Arduino
    的頭像 發(fā)表于 12-10 13:50 ?1407次閱讀

    HAL庫在Arduino平臺上的使用

    HAL庫在Arduino平臺上的使用 Arduino平臺是一個開源的電子原型平臺,它包括硬件(基于微控制
    的頭像 發(fā)表于 12-02 14:04 ?2286次閱讀