發表文章

目前顯示的是 2020的文章

First NDS Programming Project: hello nds

圖片
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much. 此篇文章介紹如何在 Windows 系統上建立 Nintendo DS 的遊戲程式開發環境。 This post introduces "how to setup  Nintendo DS  game programming development environment on Windows". 步驟一:安裝 devkitPro Step 1: Install devkitPro 可至 https://github.com/devkitPro/installer/releases/tag/v3.0.3 下載。 Go to  https://github.com/devkitPro/installer/releases/tag/v3.0.3  to download.  安裝方式可參考此影片 Watch this video to install devkitPro 在選擇 Choose Components 時,請將 NDS Development 勾選。 Check the NDS Development in "Choose Components" window.  步驟二:下載模擬器與韌體 Step 2: Down DS emulator and firmware DS的模擬器有好幾款 ,而筆者選用 melonDS  ,下載解壓縮即可。 There are serveral emulator for NDS . We could choose  melonDS . Just download it and extract it. 至  https://emulation.gametechwiki.com/index.php/Emulator_Files#Nintendo_DS_.2F_DSi  下載 DS BIOS 與 firmware 檔案。 Go to  https://emul...

bDesigner 設計 Arduino 離線模式

圖片
若您覺得文章寫得不錯,請點選網誌上的廣告,來支持小編,謝謝。 本網誌介紹了 bDesigner 與 Arduino 互動 ,那麼 那要如何讓 Arduino 自行運作(不需要電腦的離機模式)呢? 本篇文章將告訴筆者所知道的方法,首先感謝 蔡佳倫老師 在臉書上提供了如何用bDesigner在Scratch上用blockly設計離線Arduino的程式之方法。底下先介紹如何用此種方式來讓Arduino程式離線(不用電腦下)執行。 方法一:使用 Scratch 3 步驟一:開啟 Scratch 3 軟體點選  Scratch 3 ,積木類型選  USB連多個 Arduino 。 步驟二:開啟 C離線燒錄模式 點選在   Scratch 3上方選單【檔案】==> 【C離線燒錄】。 此時會出現如下的Scratch 3畫面: 接著設計閃爍的程式吧。 步驟三:設計 LED 閃爍積木程式 在Scratch 3積木區設計如下積木程式 步驟四:燒錄 LED 閃爍積木程式 將Arduino UNO 接上電腦,再點選在 Scratch 3上方選單【上傳與監看】==> 【用Arduino IDE開啟】。 選擇好 Board: "Arduino Uno" 以及 Port: "COM" (請選擇自己電腦上的Uno COM編號) ,按下燒錄按鈕 。 成功時,即可看到Uno板內建LED在閃爍。 方法二:使用 C Blockly 步驟一:開啟 C Blockly 軟體點選  C Blockly ,積木類型不用選。 步驟二:  設計 LED 閃爍積木程式 在C Blockly積木區設計如下積木程式 步驟三:  燒錄 LED 閃爍積木程式 將Arduino UNO 接上電腦,再點選在 C Blockly 上方選單【上傳】==> 【用IDE開啟】 選擇好 Board: "Arduino Uno"  以及  Port: "COM" (請選擇自己電腦上的Uno COM編號) ,按下燒錄按鈕 。 成功時,即可看到Uno板內建LED在閃爍。

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)

圖片
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much. 本篇文章將講解如何製作一個簡易的遙控機器人,此篇文章所使用的機器人為【 麥昆智能小車 (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 板子向右傾斜時,...

bDesigner 與 Arduino 互動

圖片
若您覺得文章寫得不錯,請點選網誌上的廣告,來支持小編,謝謝。 bDesigner 簡短介紹 bDesigner 是由桃園市八德國小 蔡佳倫老師 自行研發之Scratch擴充積木軟體以及blockly程式。在他的  Youtube 上也有很多的教學影片。除了可以使用 Scratch 3 以外,還可與多種硬體(如Arduino UNO、Nano、ESP32、Microbit等)互動,使用這一套就可以省去了一直安裝不同軟體的時間,非常適合接觸多種硬體與blockly程式教學的老師們。 底下為筆者使用 bDesigner 與 Arduino UNO、Nano 的筆記紀錄。 與 Arduino Nano 互動 步驟一:燒錄 以MiniUSB 將 Nano 連接到電腦上,開啟 bDesigner,點選上方選單的 燒錄 --> 開啟燒錄程式 。 選擇板子 Arduino Nano 與 COM編號 (請讀者根據自己電腦上的編號做選擇),按下 燒錄 。 此時會出現燒錄的畫面。 完成後,請關閉燒錄程式視窗。 步驟二:開啟 Scratch 3 軟體點選 Scratch 3 ,積木類型選 USB連多個 Arduino 。 步驟三:添加 Scratch 3擴展 點選 Scratch 3 左下方的擴展圖示 ,選擇bDesigner(Arduino)擴展 步驟四:設計 Arduino 內建 LED閃爍積木程式 設計如下的積木程式: 此時,按下綠旗,就可以看到 Nano 板子上標示 L 的 LED 燈閃爍三次(下圖紅色矩形的LED燈) 與 Arduino UNO 互動 此部分除了在燒錄時,需選擇板子 Arduino UNO外,其餘步驟和  與 Arduino Nano 互動 一樣。 那要如何讓 Arduino 自行運作(不需要電腦的離機模式)呢?

MakeCode Microbit 遊戲設計:貓追老鼠遊戲(Microbit Game: Cat Chasing Mouse Game)

圖片
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much. 本篇文章將講解如何製作一個簡易追逐遊戲:【貓追老鼠】。 In this post, we're going to create a a simple chasing game: "cat chasing mouse", where you tilt the microbit to control a cat which is chasing a blinking mouse on the LED screen. 一、遊戲功能如下(Game Design):   遊戲時間一分鐘。One minute game. 遊戲開始時,貓在畫面正中央。The cat is at the screen center when the game on start. 老鼠不停閃爍,老鼠跑到隨機位置。The mouse is blinking and at random position on the screen. 板子往上傾斜時,貓往上移動。The cat move up when tilting the microbit front. 板子往下傾斜時,貓往下移動。The cat move down when tilting the microbit back. 板子往右傾斜時,貓往右移動。The cat move to right when tilting the microbit to the right. 板子往左傾斜時,貓往左移動。The cat move to left when tilting the microbit to the left. 貓捉到老鼠時,得一分,老鼠跑到隨機位置。 When the cat catches the mouse, the mouse runs to random position. The player scores 1 point. 二、積木程式(Blocks Code) 遊戲時間一分鐘。One minute game. 遊戲開始時,貓在畫面正中央。T...