發表文章

目前顯示的是有「機器人」標籤的文章

Tinkercad Circuits:避障自走車 Obstacle avoidance Car

圖片
本文將使用TinkerCAD Circuits來示範超音感測器 HC-SR04(Ultrasonic sensor)的應用:「避障自走車」。讀者也可參考本部落格的其他超音感測器的應用文章 Ultrasonic 倒車雷達(Parking sensor simulation) Ultrasonic 自動照明 This tutorial uses a HC-SR04 ultrasonic distance sensor to do an obstacle avoidance car. Before assembling the hardware, the simulation could be done with TinkerCAD circuits. 材料(Materials): 1. Arduino UNO R3 板子 x 1 2. 光感測器模組 HC-SR04 ultrasonic distance sensor x 1 3. 直流馬達 DC motor x 2 4. 杜邦線 jumper wire x 8 5. 麵包板 small breadboard x 1 電路(Circuit): Trig pin is connected to Arduino UNO pin 12. Echo pin is connected to Arduino UNO pin 13. One DC motor is connected to Arduino UNO pin 5 and pin 6. The other DC motor is connected to Arduino UNO pin 10 and pin 11. 程式碼(The Code): 示範影片(Demo Video): 範例連結(Example Link): https://www.tinkercad.com/things/8U8fwcfgTbf 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.

自製Otto二足機器人

圖片
本站Otto二足機器人相關文章: Otto 組裝( Assemble Your Own Otto ) Arduino Otto 跳舞機器人( Otto Dancing Robot ) Otto機器人動作之程式碼分析(Otto Source Code Understanding Part I) Otto機器人動作之程式碼分析2(Otto Source Code Understanding Part II) Arduino Otto 指令說明Otto Command List 如何設計Android手機遙控Otto Otto機器人之簡易版的移動方式 STEMbot提供的新版Otto 程式 Otto機器人之舞蹈動作App設計 官網 Otto DIY  有很多豐富的資料。 正文開始囉。 筆者試著使用紙箱來自製二足機器人,結果成功了。 電子材料如下: 名稱 數量 Arduino Nano 1 NANO UNO 多用 擴展板 1 HC-SR04超音波模組 1 SG90伺服馬達 4 5V 有源蜂鳴器 1 usb 線 1 母母杜邦線10公分 10 工具:剪刀、熱熔膠槍等。 筆者是將兩個 SG90伺服馬達 用熱溶膠槍給黏在一起。 實際動起來就像這個影片 Otto 大軍照。 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.

Python 人臉辨識應用「戴不戴口罩」

圖片
此文的程式為修改 Github 上的專案: R4j4n/Face-recognition-Using-Facenet-On-Tensorflow-2.X 戴不戴口罩辨識方法 人臉辨識需要經過人臉偵測、特徵擷取、人臉分類(如下圖)來取得某張人臉特徵是誰的人臉。 而常見人臉辨識流程為 使用 mtcnn 偵測 人臉特徵 如額頭、眼睛、耳朵、鼻子、嘴巴、下巴。 將這些特徵與某人做對應關係。 將多人的人臉特徵使用Facenet做分類訓練。 取得的整張人臉特徵如下圖橘色長方形 戴口罩人臉辨識流程為 使用 mtcnn 偵測 人臉的上半部 特徵如額頭、眼睛、耳朵、鼻子。 將這些特徵與某人做對應關係。 將多人的人臉特徵使用Facenet做分類訓練。 透過擷取人臉的上半臉如下圖綠色長方形 成果 實作環境Environment OS :Windows 10 IDE : anaconda Anaconda3-2021.05-Windows-x86_64 到  https://www.anaconda.com/products/individual#Downloads  下載最新版本。 函數庫(Libraries)安裝 : 安裝tensorflow 2.3.0 可參考  TensorFlow — Anaconda documentation 無GPU安裝 conda create - n tf tensorflow conda activate tf 有GPU安裝 conda create - n tf - gpu tensorflow - gpu conda activate tf - gpu 安裝 Python Package pip install numpy pip install opencv-python pip install mtcnn pip install scikit-learn pip install scipy   在 Faces 資料夾下建立B某的資料夾,然後將B某的兩到三張照片放到B某資料夾。 注意:Faces 資料夾下的人名請用英文。 執行 train_v2.py 做訓練 , 執行 detect.py 做人臉辨識 。 結果影片: train_v2.py程式碼: # architecture 模組...

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

圖片
在上一個範例 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 模擬器 上的測試影片: 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.

手搖蜘蛛仿生機器人

圖片
來製作一個用手搖控制的蜘蛛仿生機器人囉! 材料: Y-S4201蜘蛛仿生機器人(本文採用 https://www.ark-handmade.com/product_view.php?id=7843 ) TT減速馬達 瓶蓋 竹筷 熱熔膠 單芯線 製作步驟 依照Y-S4201蜘蛛仿生機器人的說明書組裝,但不要裝上電池座。 將瓶蓋鑽孔及切出可以讓竹筷放進瓶蓋的切口,用熱溶膠將竹筷固定在瓶蓋上,這就是我們的手搖把手。 將單芯線焊好在TT減速馬達與蜘蛛仿生機器人的馬達兩端。 將手搖把手固定在TT減速馬上。 完成圖: 影片: 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.

2021 雲林縣仁和國小 mBot 冬令營課程紀錄

圖片
2021/01/29、2021/02/01、2021/02/02 三天上午,筆者受邀至 雲林縣仁和國小 進行 mBot 冬令營的活動,在此紀錄,也感謝仁和國小 余老師的邀請。 此次主要是進行 mBot擴充包 的組裝、擴充包的程式設計、認識人工智慧。擴充包含有 六足機器人 、 動感小貓 、 聲光互動 。 2021冬令營課程大綱 2021/01/29 mBot 冬令營 Day 1: mBot擴充包介紹 Beetle 甲蟲組裝 Beetle 程式設計 Beetle 循跡 2021/02/01 mBot 冬令營 Day 2: Otto二足機器人程式設計 動感小貓組裝 聲控天蠍組裝 螳螂組裝 程式設計自由發揮 2021/02/02 mBot 冬令營 Day 3: 語音辨識 影像辨識 文字轉語音 表情面板介紹 心得紀錄: 第一天上午提供小朋友組裝手冊與組裝影片,讓小朋友自己做選擇,當天課程要結束前,小朋友都喜歡看組裝手冊而不想看組裝影片。第二天提供小朋友Otto二足機器人,兩人控制一隻Otto機器人的雙腳,讓小朋友慢慢摸索出怎麼控制二足機器人,當小朋友自己找出方法控制Otto時,他們都很開心。第三天介紹了mBlock提供的認知服務功能,以及mBot表情面板,而小朋友對文字轉語音非常有興趣。這一群小朋友都會先自己試著設計程式,當程式功能不如自己所預期時,才會來問我。而筆者好喜歡這樣子的小朋友喔! 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.

Solution to Karel Coding – Hour of Code

圖片
If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much. Here comes the possible solutions to Karel Coding: Hour of Code  https://hoc.nclab.com/karel/ Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 Level 8 Level 9 Level 10 Level 11 Level 12 Level 13 Level 14 Level 15

MakeCode Microbit 遙控機器人 (Microbit Remote-Controlled Robot)

圖片
本篇文章將講解如何製作一個簡易的遙控機器人,此篇文章所使用的機器人為【 麥昆智能小車 (Maqueen) 】。This post will build a simple remote car with Maqueen which is a micro:bit based robot platform for education. 一、功能如下(Game Design):   訊號說明(The communication way): 使用英文字母f、b、l、r、s 五個字母,對應動作為:f 為前進、b 為後退、l 為左轉、r 為右轉、s 為停止。Using the first letter of each action: f orward, b ackward, l eft, r ight, s top. That is, the letter f stands for forward. The letter b stands for backward, and so on.  遙控器(The controller) 按下 A + B 按鈕時,送出停止(stop)訊號。Sending a s top signal when button A and B are pressed. Microbit 板子向上傾斜時,送出前進f(forward)訊號。Sending a f orward signal when tilting the microbit front. Microbit 板子向下傾斜時,送出後退b(backward)訊號。Sending a  b ackward signal when tilting the microbit back. Microbit 板子向左傾斜時,送出左轉l(left)訊號。Sending a  l eft signal when tilting the microbit to the left. Microbit 板子向右傾斜時,送出右轉r(right)訊號。Sending a  r ight signal when tilting the microbit to the right. 車子(The car) 收到停止(stop)訊號時,車子停止。On receiving a sto...

Solutions to Lightbot

圖片
底下是  LightBot : Code Hour  的參考解法 The following pictures are possible solutions to LightBot : Code Hour . Level 1-1: Level 1-2: Level 1-3: Level 1-4: Level 1-5: Level 1-6: Level 1-:7 Level 1-8: Level 2-1: Level 2-2: Level 2-3: Level 2-4: Level 2-5: Level 2-6: Level 3-1: Level 3-2: Level 3-:3 Level 3-4: Level 3-5: Level 3-6: 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.