進階搜尋


下載電子全文  
系統識別號 U0026-2108201716220900
論文名稱(中文) eBlockly:基於Blockly之可擴充程式學習環境
論文名稱(英文) eBlockly, An expandable programming learning environment based on the Blockly
校院名稱 成功大學
系所名稱(中) 資訊工程學系
系所名稱(英) Institute of Computer Science and Information Engineering
學年度 105
學期 2
出版年 106
研究生(中文) 李明益
研究生(英文) Ming-Yi Li
學號 P76034656
學位類別 碩士
語文別 英文
論文頁數 47頁
口試委員 指導教授-蘇文鈺
口試委員-張順志
口試委員-陳中和
口試委員-紀宗衡
口試委員-洪士灝
中文關鍵字 Blockly  具擴充性  程式學習環境  開放原始碼 
英文關鍵字 Blockly  expandable  programming learning environment  Open Source 
學科別分類
中文摘要 隨著全球程式教育的興起與網路的普及,程式設計不再侷限於修讀電資相關科系的人員,只要是對程式設計有興趣的人,甚至連國小的學生都可以學習。為此,諸多便利的程式學習工具應運而生,例如著名的「積木式」程式學習工具Scratch與App Inventor,然而,其應用與擴充皆有所限制。本論文的目標在於開發一個可擴充的程式學習環境,此乃基於Google的一項開源專案,又被稱為Blockly,除了與Scratch有相同的積木式程式模型外,還能將積木轉譯為不同的程式碼,如JavaScript、 Python、PHP、Lua及Dart。且Blockly無須安裝Adobe Flash Player即可直接運行於瀏覽器、能一步步執行每塊積木進行追蹤除錯。Blockly雖有上述的優點,但是卻缺乏豐富的多媒體支援。本論文計畫以積木拖拉方式,利用客製化的介面程式與元件,用以操控多種開源軟硬體,進一步改進上述的缺點。
論文實作的環境分為三大部分:Blockly端、Daemon中介層與Service端。首先,Blockly端為使用者創作程式的介面,其功能包含積木與程式碼之間的轉譯;其次,Daemon中介層為背景運行的程式,負責Blockly端與Service端間的命令轉送;再者,Service端為使用者可操控的各種軟硬體。目前的實作部份包括電腦音樂軟體如Pure Data (PD) 和Max/MSP、深度學習軟體如MNIST手寫數字辨識與硬體開發板如Arduino和Raspberry Pi。
本環境優點有三。其一,對於程式初學者來說,只需學習如何在Blockly端創作,不須學習所要操控的軟硬體之各自程式語言。其二,可藉由本環境達到Service端之間互相通訊,舉例來說:當Arduino所連接之光敏感測器受到觸發時,可以將此觸發訊號送Blockly端,由Blockly端送命令至Max/MSP進行音樂播放。其三,本環境具備可擴充性,開發者只需遵守本環境所制定的協定,即可串接新的Service至本環境。所衍生的好處是,只要串接既有的軟硬體至本環境,即可讓本環境享有該軟硬體原有的廣大社群。
本論文提供之程式學習環境,降低了程式設計學習者的門檻,使用者只需簡單地在Blockly端拖拉積木,即可控制Service端之各個軟硬體,也就是說,使用者不需要學習軟硬體各自的程式語言,也不需要思考軟硬體和其後端元件之間的連結方式與程式編寫。另外,此程式學習環境採用Apache License 2.0,凡有興趣者皆可加入開發,改善擴充其功能。
英文摘要 With the rise of computer science education and the popularity of the Internet, programming is no longer limited to those who study electronic engineering and computer science. People who are interested in programming, even an elementary school student, can learn it. To this end, lots of convenient tools for programming learning have been developed such as the famous visual block-based programming languages, Scratch and App Inventor. However, their applications are limited. The purpose of this thesis is developing an expandable programming learning environment which is based on the open-source project of Google, Blocky. Except the block-based programming as scratch, Blockly can also translate visual blocks to source code such as JavaScript, Python, PHP, Lua and Dart. Besides, Blockly directly runs in browsers without Adobe Flash Player. It’s also supported step-by-step code execution for tracing and debugging code. However, Blockly lacks a rich support of music and multimedia though it has above advantages. To improve the above-mentioned disadvantage further. This thesis plans using custom user interface and component to control various open-source software and hardware by dragging and dropping blocks.
The implementation of this thesis’s programming learning environment includes three parts: Blockly-end, Daemon and Service-end. Firstly, the Blockly-end is an interface for users to create programs, and contains the translation of visual blocks into source code. Secondly, Daemon is a computer program that runs as a background process, and is responsible for the transfer of command between Blockly-end and Service-end; Lastly, Service-end includes kinds of software and hardware for users to control. Up to now, Service-end has implemented computer music software, Pure Data (PD) and Max/MSP, the deep learning software, MNIST handwritten digits recognition, as well as the single circuit boards, Arduino and Raspberry Pi.
The programming learning environment has three advantages. Firstly, for program beginners, they only need to learn how to create programs at Blockly-end, need not to learn the programming language of each software and hardware individually. Secondly, each service can communicate with each other through our learning environment, for example, when the light sensor connected with Arduino triggered, Blockly-end send a command of playing music to Max/MSP.
Thirdly, The environment is expandable. A developer who can connect a new service to the environment only have to abide by the protocol of this environment. The benefit is the environment can hold communities of software and hardware by connect software and hardware to it.
The programming learning environment reduces the threshold of beginning programming learners. Users can simply control each software and hardware of Service-end by means of dragging and dropping blocks at the Blockly-end. In other words, users neither need to learn the programming language of each software and hardware individually nor have to consider the connection and programming methods between software/hardware and diverse components. In addition, the programming learning environment is open-source under the Apache License 2.0, so that everyone who is interested in this environment can improve and expand its functions.
論文目次 LIST OF TABLES IX
LIST OF FIGURES XI
Chapter 1 Introduction 1
1.1 Blockly Introduction 1
1.2 Motivation and Goal 2
1.2.1 Motivation 2
1.2.2 Goal 2
Chapter 2 Background 3
2.1 Arduino 3
2.2 Raspberry Pi 5
2.3 Pure Data 6
2.4 Max/MSP 8
2.5 TensorFlow & MNIST Database 9
2.5.1 TensorFlow 9
2.5.2 THE MNIST DATABASE of handwritten digits 9
2.6 ESP8266 WiFi chip 11
2.7 Websocket 11
Chapter 3 Implementation & Methods 13
3.1 System Architecture 13
3.2 Blockly-end 14
3.2.1 Source-code directory structure 14
3.2.2 Defining blocks looks 17
3.2.3 Generating blocks code (its function) 20
3.2.4 Rebuilding Blockly-end source-code 21
3.2.5 Adding new blocks to web page 21
3.3 Daemon 23
3.4 Service-end 24
3.4.1 Arduino 24
3.4.2 Raspberry Pi 30
3.4.3 Pure Data 34
3.4.4 Max/MSP 36
3.4.5 TensorFlow 40
Chapter 4 Conclusion and Future works 44
4.1 Conclusion 44
4.2 Future works 45
Chapter 5 Reference 46
Chapter 6 Appendix I 47
參考文獻 [1] Blockly official website [Online]: https://developers.google.com/blockly/
[2] Scratch official website [Online]: https://scratch.mit.edu/
[3] S4A official website [Online]: http://s4a.cat/
[4] RoboBlockly official website [Online]: roboblockly.ucdavis.edu/
[5] S2A official website [Online]: http://mryslab.blogspot.tw/
[6] Pure Date official website [Online]: https://puredata.info/
[7] Arduino official website [Online]: https://www.arduino.cc/
[8] Raspberry Pi official website [Online]: https://www.raspberrypi.org/
[9] Raspberry Pi wiki [Online]: http://elinux.org/RPi_Hub
[10] Max/MSP official website [Online]: https://cycling74.com/
[11] TensorFlow official website [Online]: https://www.tensorflow.org/
[12] MNIST database official website [Online]: http://yann.lecun.com/exdb/mnist/
[13] ESP8266 official github [Online]: https://github.com/esp8266/Arduino
[14] WebSocket - RFC 6455 [Online]: https://tools.ietf.org/html/rfc6455
[15] Git official website [Online]: https://git-scm.com/
[16] Python official website [Online]: https://www.python.org/
[17] Raspberry Pi GPIO Introduction [Online]: https://www.raspberrypi.org/documentation/usage/gpio-plus-and-raspi2/README.md
[18] Max/MSP external user manual [Online]: https://pcm.peabody.jhu.edu/~gwright/stdmp/docs/writingmaxexternalsinjava.pdf
論文全文使用權限
  • 同意授權校內瀏覽/列印電子全文服務,於2017-08-25起公開。
  • 同意授權校外瀏覽/列印電子全文服務,於2017-08-25起公開。


  • 如您有疑問,請聯絡圖書館
    聯絡電話:(06)2757575#65773
    聯絡E-mail:etds@email.ncku.edu.tw