Skip to main content

· 2 min read

Direct link to Blocklyduino : http://www.gasolin.idv.tw/public/blockly/demos/blocklyduino/index.html

Blockly is a web-based, graphical programming editor. Users can drag blocks together to build an application. 

Arduino is an electronics prototyping platform based on flexible, easy-to-use hardware and software.

Grove "GROVE_-_Starter_Bundle_V1.0b#LED_Twig" is a modular, safe and easy to use group of items that allow you to minimise the effort required to get started with microcontroller-based experimentation and learning.

With recent blockly update, we can make image blocks in blockly, and its pretty easy to make blocks with blockfactory. I feel it's natural to see the real hardware image while program the arduino firmware. So here is my experimental attempt called Blocklyduino.

Besides the basic arduino language functions, I choose Grove blocks to make Blocklyduino fit for non-electronic/wiring-experience people.

Here's the very early version of examples written by Blocklyduino. which should generate the same code that is correspondent to examples on grove wiki.

Digital Input example

image from grove wiki

code written by Blocklyduino Analog Input example

image from grove wiki

code written by Blocklyduino

Blocklyduino

will output the arduino source

code with setup/loop blocks as usual arduino  source code.

To upload those code to the real hardware and see how it works, you need to get a standard Arduino Uno/Duemilanove board, and a set of Grove starter-kit (optional for grove blocks).

Currently Support:  (10/6 updated)

  • arduino functions:

  • compact Digital/Analog Read/Write syntax

  • auto setup pinMode

  • delay and map

  • block

  • Grove blocks: LED, Potentiometer, Tilt switch,

Currently Lack of:

  • Variables support
  • Have to copy-n-paste source to arduino IDE to upload to board

· 2 min read

firebug 是 firefox 的一個插件. 可以說是當前用來 debug javascript 程式的最佳選擇. firebug 還提供了一些好用的函式可以讓您的測試更順暢.

這段影片 展示了 firebug 提供的一些好用的函式.

廢話不多說,馬上來看看吧:

印出一般訊息 : console.log

就像許多程式語言中的 'print' 語句,firebug 提供的 console.log 語句可以直接印出變數值. 例如

console.log (變數);

或者印出包含變數的敘述

console.log ("敘述: % d"% 變數);

印出具有提示圖示的訊息 console.info/console.warn/console.error

與印出一般訊息 (console.log) 使用的方式完全相同,console.info/console.warn/console.error 只是會在訊息前加上相應圖示

console.info (a) 提示圖示 console.warn (b) 警示圖示 console.error (c) 錯誤圖示

使用除錯介面 debugger

只要在想要除錯的地方前加上一行加上 debugger 語句

debugger; .....

執行時就會彈出一個互動式的除錯介面. 除錯介面提供了單步執行等功能,並即時取得當前各相關變數的狀態. 也可以看到迴圈每次執行後改變的值

計算花費時間 console.time/console.timeEnd

對於 AJAX 程式來說有些動作會花費較多的時間,使用

console.time ("跑") ..... console.timeEnd ("跑")

將要測試的程式段包起來,執行時就會印出該段程式所花費的執行時間

· 2 min read

在智慧型手機與平板領域,蘋果和所有的智慧型手機與平板供應商競爭,大部分的供應商只能依靠 Android 系統作為反擊的基礎。

在 IT 系統領域,亞馬遜正在跟所有的 IT 系統供應商競爭,而大部分的 IT 系統供應商能依靠的是 OpenStack。

OpenStack 專案的初衷是提供類似亞馬遜的 ECS (Elastic Computing Service) 和 S3 (Simple Storage Service) 開放源始碼實現,讓一般企業也能建置私有網路服務。

若企業本身或 IT 系統供應商規模夠大的話,使用 OpenStack 自建資料中心,就能享受到彈性雲端運算所帶來的好處。

改變世界的免費雲端軟體:OpenStack 幕後創造祕辛(上)(下)

重點:

1. OpenStack 開源以前叫 NASA Nebula 2. 後來由 Rackspace 和 NASA 合作開發 3. 以 Apache 授權發佈

關鍵人 Chris C. Kemp (NASA), Rick Clark, Jim Curry (Rackspace), Vivek Kundra(美國第一個資訊長),是他們讓這個專案成真並以開源發佈。

Swift 是 OpenStack 裡類似 S3 (Simple Storage Service) 的開放源始碼實現

1. DevStack 2. OneStack

· One min read
台灣雲端計算的迷思與挑戰

從其他地方聽到過關於 "決定要自架伺服器或上雲端" 的隱喻,是將 "使用雲端" 與 "自架伺服器",比做 "使用自來水" 與 "自己到河邊打水 / 抽地下水" 的差別。

雖然也有很清楚的區別,但還少了一點什麼。

「你覺得把一大筆錢存在銀行比較安穩,還是把一大筆錢放在家裡比較安穩?」

政委在這場演講裡提到的隱喻,應該是我目前所聽到最具說服力的隱喻。

同場加映:要上雲端,先換腦袋

· 2 min read

Dropbox 提供用一般資料夾的方式存取資料,資料夾會自動同步到雲端

現在微軟,Google 都將原有的 SkyDrive, Google Docs 升級,支援類似 Dropbox 這功能

使用微軟,Google 的雲端硬碟比起Dropbox 來有以下好處:

  • Windows Live 帳號登入,降低了雲端硬碟的入門門檻
  • 微軟,Google 的雲端硬碟仍支援線上版的 Word, Powerpoint, Excel 等原有功能. Google Docs 甚至支援上傳圖檔 / PDF 的文字辨識
  • 可預期兩家的雲端硬碟將會像 Mac, iPhone 預載 iCloud 一樣整合進 Windows/Windows Phone 或 Android 下一代系統中

在這兩家進入了雲端硬碟服務領域後,已經拉高雲端硬碟服務的競爭門檻。開發者可以開始考慮,該如何應用他們提供的服務,來開發更便利使用者的應用.

參考資料