วันศุกร์ที่ 28 กันยายน พ.ศ. 2561

Arduino 17 ADD VOICE TO YOUR ARDUINO PROJECTS WITHOUT USING ANY MODULE(BLINK WITH VOICE)

ADD VOICE TO YOUR ARDUINO PROJECTS WITHOUT USING ANY MODULE(BLINK WITH VOICE)

        อุปกรณ์ที่ต้องเตรียม 

Picture of Things You`re Gonna Need
Picture of Things You`re Gonna Need
Picture of Things You`re Gonna Need
Picture of Things You`re Gonna Need


  1. Arduino
  2. Speaker(with amplifier, or you can use small amps like pam8403or lm386)
  3. led
  4. Jumper wires
  5. Breadboard
  6. Creativity
  7. Patience (Most Important one)              

For the blink with voice you`ll need to upload this code .

#include "talkie.h"
Talkie voice;
const int8_t spLIGHT[] PROGMEM = {0x69, 0x18, 0x44, 0xD2, 0x83, 0xB2, 0x95, 0x69, 0x63, 0x1A, 0x17, 0x49, 0xD7, 0xA6, 0x85, 0x78, 0x5D, 0xD5, 0xFB, 0x1A, 0x33, 0xDF, 0x76, 0x97, 0x2D, 0x6B, 0x68, 0x6C, 0x4A, 0x53, 0xF7, 0xAC, 0xA9, 0x89, 0x71, 0x2D, 0xDD, 0x33, 0xA6, 0x26, 0x9B, 0xAD, 0x6D, 0x77, 0x5B, 0x7A, 0x70, 0xF4, 0xC8, 0x45, 0xE1, 0x69, 0x8E, 0xA9, 0x6B, 0x6E, 0x89, 0x62, 0x78, 0x45, 0x8D, 0x7C, 0x8C, 0xC0, 0x29, 0x4A, 0x55, 0xA8, 0x06, 0x06, 0x01, 0x0C, 0x30, 0xA4, 0x9B, 0x02, 0x36, 0x57, 0x43, 0xE0, 0x14, 0xA5, 0x2A, 0x54, 0xE3, 0xFF, 0x01}; const int8_t spON[] PROGMEM = {0x69, 0x0C, 0x69, 0xAB, 0x44, 0x92, 0x96, 0x36, 0x86, 0xED, 0x52, 0x8D, 0xD7, 0xDA, 0x10, 0xB7, 0x53, 0x35, 0x5E, 0x6B, 0x43, 0xB9, 0x4A, 0xD5, 0x78, 0xAD, 0x0D, 0xE9, 0x32, 0xD4, 0x9A, 0xB5, 0x21, 0xBA, 0x4B, 0x37, 0x4B, 0xDA, 0xE6, 0x68, 0x2E, 0xDD, 0x2D, 0x6D, 0xDB, 0x62, 0x58, 0x37, 0xF7, 0x34, 0xED, 0x48, 0xAE, 0x3D, 0xDC, 0x53, 0xA5, 0x33, 0xE5, 0x54, 0xF3, 0x6C, 0x9D, 0xCE, 0xE4, 0xCA, 0x42, 0x2A, 0x73, 0xB8, 0x8A, 0xE6, 0x72, 0x4D, 0x55, 0xE9, 0x2A, 0x46, 0x22, 0x24, 0x6C, 0xA7, 0xBB, 0x3B, 0x0E, 0x57, 0x57, 0x12, 0xEE, 0x6A, 0xC4, 0x93, 0xCD, 0x8E, 0x79, 0x6A, 0xD4, 0x60, 0x49, 0xC7, 0xFF, 0x0F}; const int8_t spOFF[] PROGMEM = {0x69, 0x70, 0xBB, 0xCD, 0x25, 0x36, 0xB5, 0xCE, 0xD7, 0x0D, 0x57, 0xED, 0x3C, 0x3A, 0x5F, 0x2F, 0xCD, 0xB4, 0xF3, 0xE8, 0x7D, 0xBE, 0x34, 0xD3, 0xCE, 0x63, 0x08, 0xFE, 0xD3, 0xDC, 0x32, 0x8F, 0x39, 0xFA, 0x0F, 0x73, 0xCF, 0xD4, 0x8E, 0xE8, 0x3E, 0xCC, 0xBC, 0x77, 0x99, 0x63, 0xB8, 0x30, 0xF3, 0x4E, 0xE9, 0x8E, 0x79, 0xDC, 0x25, 0x76, 0xFA, 0x9B, 0x00, 0xC3, 0x56, 0x10, 0x60, 0xFA, 0x0A, 0x01, 0x4C, 0x97, 0xAE, 0x80, 0x66, 0xCB, 0x08, 0x30, 0x54, 0xFA, 0xFF, 0x03}; void setup() { pinMode(2, OUTPUT); }
void loop() { digitalWrite(2, HIGH); voice.say(spLIGHT); voice.say(spON); delay(1000); digitalWrite(2, LOW); voice.say(spLIGHT); voice.say(spOFF); delay(1000); }

                

ไม่มีความคิดเห็น:

แสดงความคิดเห็น