รหัสสินค้า | AG20170 |
หมวดหมู่ | Audio/Sound/MP3/Voice |
ราคา | 1,180.00 บาท |
สถานะสินค้า | พร้อมส่ง |
จำนวน | ชิ้น |
โมดูลรู้จำเสียงพูดสำหรับใช้ในการควบคุมการเปิดปิดอุปกรณ์ไฟฟ้าผ่านทางเสียง
|
We will record the group 1 with 5 commands: White, Red, Blue, Green and OFF. Open AccessPort app and begin the serial communication at 9600 bps. (click on image). Now click on hex and type AA 11 and click the send button. This will start the recording procedure for the first group.
In this step, time is the key... You will be asked to record each command (white, red etc) three times. |
The connections are pretty easy, see the above image with the breadboard circuit schematic.
Note: Module RX - Arduino TX and Module TX - Arduino RX |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
int redPin = 9; // R petal on RGB LED module connected to digital pin 11 int greenPin = 10; // G petal on RGB LED module connected to digital pin 9 int bluePin = 11; // B petal on RGB LED module connected to digital pin 10 byte com = 0; //reply from voice recognition void setup() { Serial.begin(9600); pinMode(redPin, OUTPUT); // sets the redPin to be an output pinMode(greenPin, OUTPUT); // sets the greenPin to be an output pinMode(bluePin, OUTPUT); // sets the bluePin to be an output delay(2000); Serial.write(0xAA); Serial.write(0x37); delay(1000); Serial.write(0xAA); Serial.write(0x21); color(255,255,255); // turn RGB LED on -- white delay(5000); } void loop() // run over and over again { while(Serial.available()){ com = Serial.read(); switch(com){ case 0x11: color(255,255,255); // turn RGB LED on -- white break; case 0x12: color(255, 0, 0); // turn the RGB LED red break; case 0x13: color(0,255, 0); // turn the RGB LED green break; case 0x14: color(0, 0, 255); // turn the RGB LED blue break; case 0x15: color(0,0,0); // turn the RGB LED off break; } } } void color (unsigned char red, unsigned char green, unsigned char blue) // the color generating function { analogWrite(redPin, red*102/255); analogWrite(bluePin, blue*173/255); analogWrite(greenPin, green*173/255); } |
Download the code from here and open it with Arduino IDE.
|
|
ชำระเงินค่าสินค้าโดยการโอนเงินเข้าบัญชีธนาคาร KBANK, SCB, BBL,TMB
กรุณาเก็บหลักฐานการโอนเงินของท่านไว้เพื่อแจ้งการชำระเงินด้วยค่ะ
ท่านสามารถแจ้งการชำระเงินผ่านระบบอัตโนมัติได้โดย Click Link ข้างล่างค่ะ
https://www.arduitronics.com/informpayment
หน้าที่เข้าชม | 15,444,873 ครั้ง |
ผู้ชมทั้งหมด | 5,947,951 ครั้ง |
เปิดร้าน | 21 พ.ค. 2556 |
ร้านค้าอัพเดท | 22 ต.ค. 2568 |