![]() |
Hello, World. |
本來, 萊恩大兵是想從最基本一根一根去控制 8x8 LED matrix 的腳位, 再逐點畫出 abcd 的點陣圖, 然後做位移顯示... Google 了一下, 發現有 MAX7219 這樣的好東東, 再加上網路神人早做好的範例程式, abcdABCD1234 點陣圖應有盡有, 當然不缺位移顯示功能, 甚至還能聽 serial port 輸入字串做顯示. 既然已經這麼完備了, 萊恩大兵乾脆就用它整合 SpaceBrew, 讓它支援遠端輸入.
環境準備
Arduino 端
- 程式下載 (編譯這隻程式時, 會需要 MaxMatrix 這組 library.)
- 將四組 MAX7219 和 Arduino 主板連接好. 線路圖如下.
Processing (SpaceBrew 的 Subscriber 端)
- 程式下載
- 程式裡面做的事
- 藉由 serial port 傳字串給 arduino
- 在 SpaceBrew cloud 建立兩個 subscriber, 來處理 publisher (JavaScript 端) 傳來的字串或命令
JavaScript (SpaceBrew 的 Publisher 端)
- 程式下載
- 程式裡面做的事
- 用 html 畫好操作介面
- SpaceBrew cloud 建立兩個 publisher, 來傳送字串或命令給 subscriber (Processing 端).
- 將這隻程式放在 Google Drive, 再分享公開頁面出來.
Okay, 準備就緒, 讓一切串連在一起吧.
- 將 Arduino 程式執行起來, 讓它聽 serial port 的輸入.
- 將 Processing 程式執行起來, 讓它聽 Publisher 傳來的字串或命令.
- 用 iPad 開啟 JavaScript 頁面.
- 在 SpaceBrew Cloud 的 admin 介面上, 將跑馬燈的 publisher/subscriber 串連起來.
手動將 subscriber 與 publisher 連在一起. - 在 JavaScript 頁面輸入文字或按按鈕, 遠端 arduino LED 跑馬燈即會顯示相關文字.
參考資料
[萊恩大兵的其它文章]
自製大四軸
* 自製大四軸, (1) 零組件篇, 遙控器 (Drone, Quadcopter, Futaba, Maker, Arduino, Animatronic Eye)
* 自製大四軸, (2) 零組件篇, 飛控板 (Drone, Quadcopter, MultiWii, Arduino, Futaba, Maker)
* 自製大四軸, (3) 零組件篇, 自行雷切木質機架 (Drone, Quadcopter, Maker, Laser Cut)
* 自製大四軸, (4) 零組件篇, 馬達與電變調整 (Drone, Quadcopter, Maker, Electric Speed Control, Motor)
* 自製大四軸, (5) 組裝篇, 四軸飛行器成形 (Drone, Quadcopter, MultiWii, Arduino, Maker, Electric Speed Control, Motor)
* 自製大四軸, (6) 調整篇, 飛行前兩三事 (Drone, Quadcopter, Maker, Futaba, Arduino, MultiWii)
* 自製大四軸, (7) 充電篇, iMax B6 充電器操作記要 (Charger, Battery)
* 自製大四軸, (8) 問題篇, 機架損壞維修 (Drone, Quadcopter, Laser Cut)
* 自製大四軸, (9) 改良篇, 方便拆卸的木質機架 (Drone, Quadcopter, Maker, Laser Cut)
自動報球速的棒球
* 自動報球速的棒球, (1) 概念與雛形 (Arduino, MPU-6050, HC-06)
* 自動報球速的棒球, (2) 第一版試作品 (Arduino, NanoWii, microSD, MPU6050)
* 自動報球速的棒球, (3) 拋接實驗的數據分析 (Arduino, NanoWii, microSD, MPU6050)
* 做實驗, 寫入 EEPROM 的速度能否跟得上 MPU6050 的數據產出? (Arduino, MPU-6050, EEPROM)
* 筆記, NanoWii, 一些經驗分享 (Arduino, NanoWii, MPU6050)
* Murmur, 很小很強大的穿戴式裝置模組 (Realtag, Bluetooth, CC2540, MPU6050, BMP180)
CC2540 Bluetooth Low Energy
* 筆記, CC2540 Bluetooth Low Energy, (1) 開發環境 架設 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (2) 跑第一個範例程式 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (3) SimpleBLEPeripheral 簡單介紹 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (4) 在智慧手機上執行範例程式 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (5) 偵測與發送 iBeacon 訊號 (Bluetooth, CC2540, iBeacon)
* 實作, iBeacon 發訊器 x 防丟器 (Bluetooth, CC2540, iBeacon)
* 實作, iBeacon 尋寶遊戲 (Bluetooth, CC2540, iBeacon, iOS app)
* 實作, BLE + iOS app, 遙控燈泡君 (Bluetooth, CC2540, iOS app)
* 做實驗, 用 iBeacon 做自動控制的可行性 (Bluetooth, iBeacon, CC2540, Automation, URL Scheme, iOS app)
藍色小鋪一起來做
* 藍色小鋪一起來做, (1) 用 beacon 控制開關的枱燈
* 藍色小鋪一起來做, (2) 講解 BLE CC2540 UART 通訊範例程式 (Bluetooth, CC2540, UART)
* 藍色小鋪一起來做, (3) 藍牙枱燈專案實作 (上) (Bluetooth, CC2540)
* 藍色小鋪一起來做, (4) 藍牙枱燈專案實作 (下) (Bluetooth, CC2540)
* 藍色小鋪一起來做, (5) iBeacon scanner 專案示範與解說 (Bluetooth, CC2540, iBeacon)
* 藍色小鋪一起來做, (6) 完成, 用 iBeacon 控制開關的枱燈 (Bluetooth, CC2540, iBeacon)
小惡魔 無線溫度感測器
* 小惡魔, (1) 溫度感測 + 物聯網 (Electric Imp, Xively, LM35, Internet of Things)
* 小惡魔, (2) 溫度感測 + 物聯網 + 事件觸發 (Electric Imp, Xively, LM35, Internet of Things)
108 大眼仔
* 108 大眼仔, 初登場 (Arduino, SG-90, Maker Faire Taipei 2014, Animatronic Eye)
* 108 大眼仔, 進化, (1) 專屬程式庫 (Arduino, SG90, Animatronic Eye)
* 108 大眼仔, 進化, (2) 當我們串在一起 (Arduino, SG90, Animatronic Eye, I2C)
* 108 大眼仔, 進化, (3) 檢查 Gmail 信箱 (Arduino, SG90, Animatronic Eye, Temboo)
* 108 大眼仔, 進化, (4) 看著我的臉 (Arduino, SG90, Animatronic Eye, OpenCV, Processing, I2C)
* 108 大眼仔, 進化, (5) 迎著人來人往 (Arduino, SG90, Animatronic Eye, OpenCV, Processing, I2C)
* 108 大眼仔, 檢討筆記, 我要一個打十個 (Arduino, SG90, Animatronic Eye)
Plot Clock
* Murmur, 有趣的零件售價
* Murmur, Arduino 保險桿 (Arduino, bumper, 3D printing)
* Murmur, 許一個 maker 分享網站
* Murmur, 物聯網新概念- The Physical Web (Internet of Things, The Physical Web)
* Murmur, 關於 HP Sprout 的一點想法
* Murmur, 說中文很難嗎? (Toy, Reed Switch, Voice Recorder Module)
* Murmur, 停車場自動繳費機的兩三事 (Kiosk)
* Murmur, 為什麼是 WiFi? 關於小米空氣清淨器的一點看法.. (Internet of Things)
* Murmur, 機器人是時尚元素? (Robot, Fashion)
* 體驗, 原住民互動故事書@宜蘭大同鄉泰雅生活館
* 體驗, 蛋生音互動裝置@兒童美術館 (Arduino, 3D Printing, HC-SR04, Interactive)
* 開箱, 鋼彈小劇場 (Pepper's Ghost, GUNDAM)
* 開箱, 偉力控二號機, 小四軸飛行器 (CG022, Quadcopter)
* 偉力控二號機, 修理防護罩與飛行心得 (CG022, Quadcopter)
* 偉力控二號機, 我想有個家 (CG022, Quadcopter)
* 偉控力二號機, 換馬達 (CG022, Quadcopter)
* 偉力控二號機, 盒子上的洞 (CG022, Quadcopter)
* 實作, 電容感應音樂樹
* 修理, 樂高馬達 8883 (LEGO 8883 Power Functions M-Motor)
* 修理, (part 2) 樂高馬達 8883 (LEGO 8883 Power Functions M-Motor)
* 修理, 液晶螢幕 (LCD)
自製大四軸
* 自製大四軸, (1) 零組件篇, 遙控器 (Drone, Quadcopter, Futaba, Maker, Arduino, Animatronic Eye)
* 自製大四軸, (2) 零組件篇, 飛控板 (Drone, Quadcopter, MultiWii, Arduino, Futaba, Maker)
* 自製大四軸, (3) 零組件篇, 自行雷切木質機架 (Drone, Quadcopter, Maker, Laser Cut)
* 自製大四軸, (4) 零組件篇, 馬達與電變調整 (Drone, Quadcopter, Maker, Electric Speed Control, Motor)
* 自製大四軸, (5) 組裝篇, 四軸飛行器成形 (Drone, Quadcopter, MultiWii, Arduino, Maker, Electric Speed Control, Motor)
* 自製大四軸, (6) 調整篇, 飛行前兩三事 (Drone, Quadcopter, Maker, Futaba, Arduino, MultiWii)
* 自製大四軸, (7) 充電篇, iMax B6 充電器操作記要 (Charger, Battery)
* 自製大四軸, (8) 問題篇, 機架損壞維修 (Drone, Quadcopter, Laser Cut)
* 自製大四軸, (9) 改良篇, 方便拆卸的木質機架 (Drone, Quadcopter, Maker, Laser Cut)
自動報球速的棒球
* 自動報球速的棒球, (1) 概念與雛形 (Arduino, MPU-6050, HC-06)
* 自動報球速的棒球, (2) 第一版試作品 (Arduino, NanoWii, microSD, MPU6050)
* 自動報球速的棒球, (3) 拋接實驗的數據分析 (Arduino, NanoWii, microSD, MPU6050)
* 自動報球速的棒球, (2) 第一版試作品 (Arduino, NanoWii, microSD, MPU6050)
* 自動報球速的棒球, (3) 拋接實驗的數據分析 (Arduino, NanoWii, microSD, MPU6050)
* 做實驗, 寫入 EEPROM 的速度能否跟得上 MPU6050 的數據產出? (Arduino, MPU-6050, EEPROM)
* 筆記, NanoWii, 一些經驗分享 (Arduino, NanoWii, MPU6050)
* Murmur, 很小很強大的穿戴式裝置模組 (Realtag, Bluetooth, CC2540, MPU6050, BMP180)
* 筆記, NanoWii, 一些經驗分享 (Arduino, NanoWii, MPU6050)
* Murmur, 很小很強大的穿戴式裝置模組 (Realtag, Bluetooth, CC2540, MPU6050, BMP180)
CC2540 Bluetooth Low Energy
* 筆記, CC2540 Bluetooth Low Energy, (1) 開發環境 架設 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (2) 跑第一個範例程式 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (3) SimpleBLEPeripheral 簡單介紹 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (4) 在智慧手機上執行範例程式 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (5) 偵測與發送 iBeacon 訊號 (Bluetooth, CC2540, iBeacon)
* 實作, iBeacon 發訊器 x 防丟器 (Bluetooth, CC2540, iBeacon)
* 實作, iBeacon 尋寶遊戲 (Bluetooth, CC2540, iBeacon, iOS app)
* 實作, BLE + iOS app, 遙控燈泡君 (Bluetooth, CC2540, iOS app)
* 做實驗, 用 iBeacon 做自動控制的可行性 (Bluetooth, iBeacon, CC2540, Automation, URL Scheme, iOS app)
* 筆記, CC2540 Bluetooth Low Energy, (2) 跑第一個範例程式 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (3) SimpleBLEPeripheral 簡單介紹 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (4) 在智慧手機上執行範例程式 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (5) 偵測與發送 iBeacon 訊號 (Bluetooth, CC2540, iBeacon)
* 實作, iBeacon 發訊器 x 防丟器 (Bluetooth, CC2540, iBeacon)
* 實作, iBeacon 尋寶遊戲 (Bluetooth, CC2540, iBeacon, iOS app)
* 實作, BLE + iOS app, 遙控燈泡君 (Bluetooth, CC2540, iOS app)
* 做實驗, 用 iBeacon 做自動控制的可行性 (Bluetooth, iBeacon, CC2540, Automation, URL Scheme, iOS app)
藍色小鋪一起來做
* 藍色小鋪一起來做, (1) 用 beacon 控制開關的枱燈
* 藍色小鋪一起來做, (2) 講解 BLE CC2540 UART 通訊範例程式 (Bluetooth, CC2540, UART)
* 藍色小鋪一起來做, (3) 藍牙枱燈專案實作 (上) (Bluetooth, CC2540)
* 藍色小鋪一起來做, (4) 藍牙枱燈專案實作 (下) (Bluetooth, CC2540)
* 藍色小鋪一起來做, (5) iBeacon scanner 專案示範與解說 (Bluetooth, CC2540, iBeacon)
* 藍色小鋪一起來做, (6) 完成, 用 iBeacon 控制開關的枱燈 (Bluetooth, CC2540, iBeacon)
小惡魔 無線溫度感測器
* 小惡魔, (1) 溫度感測 + 物聯網 (Electric Imp, Xively, LM35, Internet of Things)
* 小惡魔, (2) 溫度感測 + 物聯網 + 事件觸發 (Electric Imp, Xively, LM35, Internet of Things)
* 小惡魔, (2) 溫度感測 + 物聯網 + 事件觸發 (Electric Imp, Xively, LM35, Internet of Things)
108 大眼仔
Plot Clock
* 體驗, 蛋生音互動裝置@兒童美術館 (Arduino, 3D Printing, HC-SR04, Interactive)
* 實作, 電容感應音樂樹
* 修理, 樂高馬達 8883 (LEGO 8883 Power Functions M-Motor)
* 修理, (part 2) 樂高馬達 8883 (LEGO 8883 Power Functions M-Motor)
* 修理, 液晶螢幕 (LCD)
* 108 大眼仔, 初登場 (Arduino, SG-90, Maker Faire Taipei 2014, Animatronic Eye)
* 108 大眼仔, 進化, (1) 專屬程式庫 (Arduino, SG90, Animatronic Eye)
* 108 大眼仔, 進化, (2) 當我們串在一起 (Arduino, SG90, Animatronic Eye, I2C)
* 108 大眼仔, 進化, (3) 檢查 Gmail 信箱 (Arduino, SG90, Animatronic Eye, Temboo)
* 108 大眼仔, 進化, (4) 看著我的臉 (Arduino, SG90, Animatronic Eye, OpenCV, Processing, I2C)
* 108 大眼仔, 進化, (5) 迎著人來人往 (Arduino, SG90, Animatronic Eye, OpenCV, Processing, I2C)
* 108 大眼仔, 檢討筆記, 我要一個打十個 (Arduino, SG90, Animatronic Eye)
* 108 大眼仔, 進化, (1) 專屬程式庫 (Arduino, SG90, Animatronic Eye)
* 108 大眼仔, 進化, (2) 當我們串在一起 (Arduino, SG90, Animatronic Eye, I2C)
* 108 大眼仔, 進化, (3) 檢查 Gmail 信箱 (Arduino, SG90, Animatronic Eye, Temboo)
* 108 大眼仔, 進化, (4) 看著我的臉 (Arduino, SG90, Animatronic Eye, OpenCV, Processing, I2C)
* 108 大眼仔, 進化, (5) 迎著人來人往 (Arduino, SG90, Animatronic Eye, OpenCV, Processing, I2C)
* 108 大眼仔, 檢討筆記, 我要一個打十個 (Arduino, SG90, Animatronic Eye)
* Murmur, 有趣的零件售價
* Murmur, Arduino 保險桿 (Arduino, bumper, 3D printing)
* Murmur, 許一個 maker 分享網站
* Murmur, 物聯網新概念- The Physical Web (Internet of Things, The Physical Web)
* Murmur, 關於 HP Sprout 的一點想法
* Murmur, 說中文很難嗎? (Toy, Reed Switch, Voice Recorder Module)
* Murmur, 停車場自動繳費機的兩三事 (Kiosk)
* Murmur, 為什麼是 WiFi? 關於小米空氣清淨器的一點看法.. (Internet of Things)
* Murmur, 機器人是時尚元素? (Robot, Fashion)
* 體驗, 原住民互動故事書@宜蘭大同鄉泰雅生活館* Murmur, Arduino 保險桿 (Arduino, bumper, 3D printing)
* Murmur, 許一個 maker 分享網站
* Murmur, 物聯網新概念- The Physical Web (Internet of Things, The Physical Web)
* Murmur, 關於 HP Sprout 的一點想法
* Murmur, 說中文很難嗎? (Toy, Reed Switch, Voice Recorder Module)
* Murmur, 停車場自動繳費機的兩三事 (Kiosk)
* Murmur, 為什麼是 WiFi? 關於小米空氣清淨器的一點看法.. (Internet of Things)
* Murmur, 機器人是時尚元素? (Robot, Fashion)
* 體驗, 蛋生音互動裝置@兒童美術館 (Arduino, 3D Printing, HC-SR04, Interactive)
* 開箱, 鋼彈小劇場 (Pepper's Ghost, GUNDAM)
* 開箱, 偉力控二號機, 小四軸飛行器 (CG022, Quadcopter)
* 偉力控二號機, 修理防護罩與飛行心得 (CG022, Quadcopter)
* 偉力控二號機, 我想有個家 (CG022, Quadcopter)
* 偉控力二號機, 換馬達 (CG022, Quadcopter)
* 偉力控二號機, 盒子上的洞 (CG022, Quadcopter)
* 開箱, 偉力控二號機, 小四軸飛行器 (CG022, Quadcopter)
* 偉力控二號機, 修理防護罩與飛行心得 (CG022, Quadcopter)
* 偉力控二號機, 我想有個家 (CG022, Quadcopter)
* 偉控力二號機, 換馬達 (CG022, Quadcopter)
* 偉力控二號機, 盒子上的洞 (CG022, Quadcopter)
* 修理, 樂高馬達 8883 (LEGO 8883 Power Functions M-Motor)
* 修理, (part 2) 樂高馬達 8883 (LEGO 8883 Power Functions M-Motor)
* 修理, 液晶螢幕 (LCD)
沒有留言:
張貼留言