使用 yotta 建立 microbit samples (C++)

動機:想要學習 BBC micro:bit 的 C++ 範例檔,要如何實作呢?!

準備環境
1.Windows 10 / MacBook Pro 筆電
2.BBC micro:bit (插USB數據線)
3.Yotta (offline C/C++ tools)

實作步驟
1.首先,請參見 Martin 示範影片...如下

2.接著,再按 https://lancaster-university.github.io/microbit-docs/offline-toolchains/ 視平台安裝 yotta, cmake, srecord...等

3.再用 git 抓 microbit-samples 範例檔,如下
git clone https://github.com/lancaster-university/microbit-samples
cd microbit-samples

4.再執行相關的步驟,因此,我做了一個 batch file 來重複執行及避免做錯(以 bluetooth-eddystone-url 為例),如下


心得
有了這些工具,之後,在 micro:bit 研究或設計C++就方便了...

參攷
1.Martin Woolley, How to build a microbit samples example using yotta, https://www.youtube.com/watch?v=OqU-OOkyPlQ
2.microbit-samples, https://github.com/lancaster-university/microbit-samples

留言