發表文章

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.

雜談:快速建立手機App的四個小技巧

圖片
在開發手機App之前,要了解怎麼快速建立一個基本版App的流程:「定義App最低限度功能需求」、「選擇工具與素材」、「試用這些元件的功能」、「美化App」。 一、定義App最低限度功能需求 這是最煩人的步驟,在此步驟 要先定義好App的基本功能 。剩下的功能會在後續開發過程中慢慢浮現出來。 範例一: 要設計一個像臉書的社群網站App,基本的功能可能會有: 1. 會員註冊、登入、登出。 2. 發文。 3. 交友。 範例二: 要設計一個計算機App,基本的功能可能會有: 1. 輸入數字。 2. 有兩個數字的加減乘除。 範例三: 要設計一個人臉辨識App,基本的功能可能會有: 1. 拍照。 2. 錄影。 3. 輸入人臉照片名稱。 4. 可以辨別是男性還是女性。 5. 可以辨識年齡。 但請記得這步驟是要找出「 最低限度功能需求 」而非找出App的所有功能。 二、選擇工具與素材 再來要選擇工具(tools)與素材(materials),這些工具(tools)與素材(materials)可以統稱為元件(components)。元件就是App上的按鈕、圖片、相機等。以 App Inventor 與 Thunkable  來說,圖中的紅色長方形就是這兩個手機App設計平台所提供的元件。 在此步驟可以試著使用平台上所提供的範例來快速瞭解元件的基本功能,但尚不需要很詳細瞭解。隨著開發過程,就會慢慢地深入瞭解元件的功能。 三、試用這些元件的功能 這步驟最重要的是「找出這些元件功能是否有符合 最低限度功能需求 」,這步驟會一直不斷測試、修改、測試、修改地循環,直到找出滿足App 最低限度功能需求 的元件。 四、美化App 找出元件後,就會開始著手進行開發App的雛型(Prototype),等到App的基本功能都有了,就可以開始美化App,例如在App中增加動畫,「歡迎畫面」、「音效」等。那如何美化App呢?可以多試試  Apple App Store 與 Google Play  上排名在前面的App來激發想法。 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you...

Scratch 3 免費線上教材

在知道Scratch 線上的免費資源之前,當然要先知道Scratch這個軟體在那兒可以取得。Scratch的官網有提供兩種版本: 網頁版(線上版) 使用瀏覽器,不用安裝額外,需要帳號登入。 https://scratch.mit.edu/ 單機版(離線版) 目前提供Windows 10以上與macOS 10.13以上的版本 https://scratch.mit.edu/download 圖文教材 STEAM 教育學習網 https://steam.oxxostudio.tw/category/scratch/index.html 今晚誰來Code https://sites.google.com/view/tonight-code/scratch3 橘子蘋果開放教材: https://orangeapple.co/csr/open-material 影音教材 Scratch 3 小小程式設計師 http://163.27.51.24/scratch3-s083/html/lesson1.html ***個人 推薦 *** 均一Scratch : https://www.junyiacademy.org/computing/programming/scratch/scratch-3-m01 *** 個人 推薦 *** 個人推薦均一Scratch來學習 。 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.

讀書筆記:《用Google玩人工智慧實驗》

圖片
最近幾年資訊科技一直圍繞在人工智慧與物聯網(物廉網)上,而《 用Google玩人工智慧實驗 》這本書介紹了只需開起瀏覽器就可以在電腦、手機、平板上體驗人工智慧實驗,於是筆者就高興地閱讀此書了。 第1章 認識人工智慧 此章介紹了人工智慧的定義與起源,以及它的發展與現況。在1956年,科學家在一次的研討會中,提出「人工智慧」一詞,希望機器 能夠使用語言 、 能理解抽象概念 、 能解決只有人類可解決的問題 、 能自我改良 等。而 Alan Turing 提出了 Turing Test 來檢驗機器是否具有智慧。 人工智慧經歷過 幾次的起伏 ,從「推理與探索」到「專家系統」到「深度學習」為主流的精采歷史。目前人工智慧可大約分成 專用型人工智慧(弱人工智慧) 以及 通用型人工智慧(強人工智慧) 兩種。 世界各大企業持續提供方便的人工智慧工具,例如 Google AI Experiments 。 第2章人工智慧如何運作 此章介紹了人工智慧如何運作以及機器學習、類神經網路、深度學習的基礎觀念。機器學習、類神經網路、深度學習的關係可參考下圖: 人工智慧研究如何讓 機器(電腦) 表現得有智慧,於是得先有資料給它進行 學習(輸入) ,讓電腦進一步 計算與分析(處理) ,最後產生 結果或功能(輸出) ,如下圖所示: 機器學習 通常分為三種類型:監督式學習(Supervised Learning)、非監督式學習(Unsupervised Learning)、強化學習(Reinforcement Learning)。 深度學習是從類神經網路發展而來的,而類神經網路利用機器來模擬人腦神經系統運作模式。( https://playground.tensorflow.org/ ) 類神經網路 如下圖所示,含有輸入層(Input Layer)、隱藏層(Hidden Layer)、輸出層(Output Layer)。 圖上的每一個圓圈為一個節點,是模仿生物神經元發送訊號。每個節點的輸出若高於一個指定的臨界值,就會啟動該節點,並將訊號傳送給下一個節點。而深度學習為含有多個隱藏層(通常為三層以上)的類神經網路。 AI Experiments 實作體驗 Teachable Machine 網站: https://teachablemachine.withgoogle.com/ Teachable Machi...

Tree Search: BFS, DFS, Best-First, and A* Search

圖片
This example is from MIT OCW   Artificial Intelligence . Consider the tree shown below. The numbers on the arcs are the arc lengths; the numbers near states B, C, and D are the heuristic estimates; all other states have a heuristic estimate of 0. Assume that the children of a node are expanded in alphabetical order when no other order is specified by the search, and that the goal is state J . No visited or expanded lists are used. What order would the states be expanded by each type of search. Write only the sequence of states expanded by each search. Breadth First Setep 1: Visited: A Queue: B, C, D Step 2: Visited: A, B Queue: C, D, E, F G Step 3: Visited: A, B, C Queue: D, E, F G, H Step 4: Visited: A, B, C, D Queue: E, F, G, H, I, J Step 5: Visited: A, B, C, D, E Queue: F, G, H, I, J Step 6: Visited: A, B, C, D, E, F Queue: G, H, I, J Step 7: Visited: A, B, C, D, E, F, G Queue: H, I, J Step 8: Visited: A, B, C, D, E, F, G,...

自製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.

Solutions to SQL Zoo practice Part 2

圖片
For solutions to  SELECT basics and SELECT from world please refer to Solutions to SQL Zoo practice Part 1 . This post contains solutions to  SELECT from nobel .  針對 SQL Zoo ( https://sqlzoo.net/wiki/SQL_Tutorial ) 這個SQL學習網站的 SELECT from nobel 練習題,本文提供了一些參考解法。 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.