Navigation

    obniz Developer's Community Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. 桑畑佳祐
    桑
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    桑畑佳祐

    @桑畑佳祐

    0
    Reputation
    2
    Posts
    460
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    桑畑佳祐 Follow

    Best posts made by 桑畑佳祐

    This user hasn't posted anything yet.

    Latest posts made by 桑畑佳祐

    • RE: UARTで音声合成LSI(ATP3011)を喋らせたい

      @桑畑佳祐
      ArduinoでATP3011の使用例を参考にして自己解決しました。
      UARTの送信内容の文末のデミリタが[CR]ではなくて、\rにしたら上手くいきました。

      例
      修正前
      obniz.uart0.send("aiueo.[CR]");

      修正後
      obniz.uart0.send("aiueo.\r");

      お騒がせしてすみません。

      posted in Question and Troubles
      桑
      桑畑佳祐
    • UARTで音声合成LSI(ATP3011)を喋らせたい

      ATP3011のデーターシートを参考にしてセーフモードで配線して、obnizのTX:2とRXDに繋げて、RX:3とTXDに繋げています。
      試しにobnizのボタンを押したら、「あいうえお」と発声させるプログラムを作ってみたのですが、発声してくれません。

      <html>
      <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <script src="https://obniz.io/js/jquery-3.2.1.min.js"></script>
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
      <script src="https://unpkg.com/obniz@latest/obniz.js" crossorigin="anonymous"></script>
      <script src="https://unpkg.com/obniz-parts-kits@0.11.2/iothome/index.js"></script>
      <script src="https://unpkg.com/obniz-parts-kits@0.11.2/ai/index.js"></script>
      <script src="https://unpkg.com/obniz-parts-kits@0.11.2/airobot/index.js"></script>
      <script src="https://unpkg.com/obniz-parts-kits@0.11.2/ui/index.js"></script>
      <script src="https://unpkg.com/obniz-parts-kits@0.11.2/ai/opencv3.4/opencv.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.13.5"> </script>
      <script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/mobilenet@0.2.2"> </script>

      </head>

      <div id="OBNIZ_OUTPUT"></div>

      <script>
      (async function(){
      var obniz;

      obniz = new Obniz("XXXX-XXXX");
      obniz.onconnect = async function() {
      console.log(obniz.connectionState)
      obniz.io0.output(true);
      obniz.io1.output(false);
      var uart0 = obniz.getFreeUart();
      obniz.uart0.start({tx: 2, rx: 3, baud:9600 });

      // Javascript Example
      obniz.display.clear();
      obniz.switch.onchange = function(state) {
         if (state === "push") {
           obniz.display.print("Pushing");
           obniz.uart0.send("aiueo.[CR]");
         } else {
            obniz.display.clear();
         }
      }
      

      }
      })();

      </script>
      </body>
      </html>

      同じ回路でATP3011をデモモードにすると、ちゃんとプリセットの内容を読み上げてくれるので、ATP3011の配線自体は問題なさそうです。
      ATP3011の13番ピン(/PLAYピン)にLEDを付けて、発声中に光る様にしてあり、プリセットを読み上げ中はちゃんと光ってくれるんですが、obnizからUARTでデータを送ってもLEDが光りません。
      おそらく、UARTの通信が上手く行ってないと思うのですが原因が判りません。

      ご教授お願い致します。

      posted in Question and Troubles
      桑
      桑畑佳祐