發表文章

目前顯示的是 6月, 2021的文章

MIT App Inventor 2 Text To Speech Robot 日韓文語音機器人

圖片
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or buy me a coffee . Thank you very much. 在上一個範例 MIT App Inventor 2 乒乓球遊戲 裡使用 App Inventor Starter Apps 的範例 PongStarter.aia 來製作遊戲,而這些範例裡沒有和 文字轉語音積木 ( TextToSpeech )有關的範例。筆者就來介紹 文字轉語音積木 ( TextToSpeech )的應用範例。可以先看官網所提供的 Talk to Me 教程 或是 影片教學 與 教學文件 。 那筆者想問對 文字轉語音積木 ( TextToSpeech )有一些了解的讀者一個問題:「如何讓App發出日文或韓文呢?」 提示:需要設定 Country 與 Language 這兩個屬性。 底下為筆者的解法。 畫面設計如下 TextToSpeech1 用來發出 TextBox1 裡的日文。 TextToSpeech2 用來發出 TextBox2 裡的韓文。 積木程式如下 日文與韓文的 Country Code 與 Language Code 是筆者用Google搜尋找到的。 在 MEMU Play 模擬器 上的測試影片:

Tinkercad Circuits:在LCD上顯示英文姓名(Display name on LCD)

圖片
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much. This tutorial uses an LCD to show someone's name on the screen. This project is based on TinkerCAD LCD sample code. 本文使用 LCD 來顯示英文姓名。此範例是修改 TinkerCAD Circuits 的內建範例。 材料(Materials): 1. Arduino UNO R3 板子 x 1 2. 可變電阻 Potentiometer x 1 3.  16 x 2  LCD 模組 x 1 4. 杜邦線 jumper wire x 22 5. 麵包板 small breadboard x 1 6. 220歐姆電阻 220 ohm resistor x 2 電路(Circuit): 程式碼(The Code): // include the library code: #include   <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal   lcd ( 12 ,  11 ,  5 ,  4 ,  3 ,  2 ); void   setup () {   // set up the LCD's number of columns and rows:    lcd . begin ( 16 ,  2 );      ...