七月 2024
1234567
891011121314
15161718192021
22232425262728
293031  

彙整

新北市程式開發社群工作坊-Scratch擴充積木設計(1060308、0315、0322)

日期:106年3月8日、3月15日、3月22日

地點:新北市教研中心

講師:蔡佳倫老師

三周的課程如下:
—————————————————————-
3/8 第一節課會先講語言的轉換
3/15 第二節講講mblock的積木撰寫
3/22 第三節會講python跟scratch
—————————————————————-

設備使用 Arduino模擬器 和 S2A,不用準備硬體!

課程內容:

Scratch 擴充積木設計:

教學範例:

base_helper.s2e


{

“extensionName": " 自訂積木 “,
“extensionPort": 50000,
“blockSpecs": [
[“r", “資料", “hello"],
[“r", “資料1″, “hello1″],
]

}


用Python擴充我的Scratch2 — 原理與Hello World篇

base_helper_py3.py


def do_GET(self):

  try:

 """
 process HTTP GET requests
 """
# skip over the first / . example: /poll -> poll 
 cmd = self.path[1:]
 # create a command list . 
 cmd_list = cmd.split('/')
 
 s = "不回傳資料"
 ###### 處理Scratch送出的命令
 ###### 若需回應Scratch的Poll命令,再把文字存在變數s ##
 ##############################################################
 
 crlf = "\r\n"
 if cmd_list[0] == "poll":
 s="hello " + "hello" + crlf
 s+="hello1 " + "hello1" + crlf
 
 #############################################################

except:

s = “不回傳資料"

finally:

self.send_resp(s)


Creating Scratch 2.0 Extensions 摘要說明:

Block description

Each block is described by an array with the following fields:

  • block type
  • block format
  • operation or remote variable name
  • (optional) zero or more default parameter values

The block type is one of these strings:

  • " " – command block
  • “w" – command block that waits
  • “r" – number reporter block (round ends) ==> 前面有帶一個 checkbox
  • “b" – boolean reporter block (pointy ends)
  • “R" – Reporters that wait (round ends)

The block format is a string that describes the labels and parameter slots that appear on the block. Parameter slots are indicated by a word starting with “%" and can be one of:

  • %n – number parameter (round ends)
  • %s – string parameter (square ends)
  • %b – boolean parameter (pointy ends)

Menu parameters

Both command and reporter blocks can include menu parameters:

  • %m.menuName – menu parameter (not editable)
  • %d.menuName – editable number parameter with menu
{ 
  "extensionName": "Kinect",
  "extensionPort": 12345,
  "blockSpecs": [ 
    ["r", "get %m.coordinate position of %m.bodyPart", "position"],
  ], 
  "menus": { 
    "coordinate": ["x", "y", "z"],
    "bodyPart": ["head", "shoulder", "elbow", "hand"],
  },
}

position/y/hand 247 => 回傳值為 247 (鍵、值用空格分隔)

Polling (每秒 30 次)

Scratch to retrieves sensor values and status information from the helper app by sending a poll command:

request: /poll

Here’s an example poll response:

response: 鍵、值用空格分隔,每一筆資料用 crlf (\r\n) 分隔

brightness 75 + crlf (\r\n)
slider 17 + crlf (\r\n)

Commands

/beep                    (command with no parameters)
/setVolume/5   (command with a numeric parameter)

Commands that wait

turn motor on for 3 seconds

turns on the motor, waits three seconds, then turns it off again. When this block is used in a script, execution does not continue to the next block until the command completes. A command that waits is indicated by the “w" block type in the command descriptor.

When a “w" command is invoked, Scratch adds a unique command_id parameter to the request (before any other parameters). For example, for the motor command above Scratch would send:

request:     /motorOn/2437/3

The first parameter, 2437, is a unique identifier for this invocation of the command. For the three seconds that this command takes to complete, the helper app adds a busy line to the poll request:

response:  _busy 2437 …

A busy line consists of the string “_busy" followed by a list of unique identifiers separated by spaces. When Scratch gets a poll result that doesn’t include 2437 in the busy line (or doesn’t even have a busy line), it knows that the command is complete and allows the script that invoked that command to proceed.

Reporters that wait (目前已實作出來) => “R"

temperature in city_name

request:     /getTemperature/7639/Boston

response:  _result 7639 82

Reset command

Scratch extensions can control motors or music synthesizers. Users expect to be able to stop everything — turn off motors, silence music synthesizers, and reset hardware back to it’s original state — by clicking the stop button in the Scratch editor. Thus, when the stop button is clicked, Scratch sends a reset command to all active extensions:

request: /reset_all


參考資料與範例:

mBlock 擴充積木設計:

mBlock 積木程式轉Arduino 程式教學:

範例一:

Autodesk 123D circuits 繪圖

mBlock 積木程式:

Arduino 程式

#include <Arduino.h>
#include <Wire.h>
#include <SoftwareSerial.h>

double angle_rad = PI/180.0;
double angle_deg = 180.0/PI;
double switchStatus;

void setup(){
Serial.begin(9600); //改成9600,才能於123D中執行
pinMode(2,INPUT);
}

void loop(){
switchStatus = digitalRead(2);
Serial.println(switchStatus);
_loop();
}

void _delay(float seconds){
long endTime = millis() + seconds * 1000;
while(millis() < endTime)_loop();
}

範例二:

Autodesk 123D circuits 繪圖

mBlock 積木程式:

Arduino 程式

#include <Arduino.h>
#include <Wire.h>
#include <SoftwareSerial.h>

double angle_rad = PI/180.0;
double angle_deg = 180.0/PI;
double Button;
double LED;

void setup(){
    Button = 2;
    LED = 12;
    pinMode(Button,INPUT);
    pinMode(LED,OUTPUT);
}

void loop(){
    if(((digitalRead(Button))==(1))){
        digitalWrite(LED,1);
    }else{
        digitalWrite(LED,0);
    }
    _loop();
}

void _delay(float seconds){
    long endTime = millis() + seconds * 1000;
    while(millis() < endTime)_loop();
}

void _loop(){
}

參考資料:

BlocklyDesigner 安裝教學:

蔡佳倫教學影片:

活動照片:

轉知臺灣學術網路維運中心(TANet NOC)網路維護公告(1060306)

轉知臺灣學術網路維運中心(TANet NOC)網路維護公告

3/6 22:00 ~ 3/7 06:00 科技大樓原國網中心電力線路移轉。教育部(含所屬機(關)構)對外網路中斷,影響所有對外網路服務。

科技大樓 ISP Peering 電路中斷,TANet 經科技大樓到國內 ISP 網路服務中斷。區網中心與 Hinet Peering 互連服務中斷估有臺灣學術網路維運中心 (TANet NOC)、台北區網 2(政治大學)、南投區網(國際暨南大學)、宜蘭區網、臺東區網。

========================================

新北市教育網路影響範圍:

施工期間新北市教育網校園內網路服務及公務網路服務正常。

對政大出口internet網路服務將中斷。

TANET 維護公告如附,
並同步更新於 TANet NOC 網站( http://noc.tanet.edu.tw/ )

李煒

80723456-517

==============================================

圖書館三樓電腦及影印機安裝設定暨使用說明(1060307)

圖書館三樓電腦及影印機安裝設定暨使用說明

  • 安裝圖書館三樓 2 部 Acer L480 電腦,並連上網路。(作業系統為 Windows 10 x64 中文版)
  • 安裝 Ricoh 2045e 影印機,設定 IP,連上網路。
  • 電腦安裝影印機驅動程式,下載的驅動程式置於 \\winserver\shareware\驅動程式\印表機\影印機 RICOH 資料夾中。
    • 原廠 Ricoh 2035e/2045e 影印機驅動程式不支援 Windows 10 x64,安裝後會導致無法從任何瀏覽器列印文件,亦無法管理印表機。
    • 改裝為 Ricoh MP 5000 影印機驅動程式,可正常列印。
  • 設定網路掃描:(在影印機上掃描,文件會自動轉成 PDF 檔傳到指定電腦分享的資料夾中,即 D:\scan。)
    • 使用 SMB 協定列印 → 失敗
    • 使用 FTP 協定列印 → 成功
      • 建左側電腦 D:\scan 資料夾
      • 使左側電腦開機,即自動執行 FTP Service
  • Windows 10 “啟動" 資料夾的位置在那裏?
    • 打開[執行],輸入開啟啟動資料夾的命令:
      • 系統啟動資料夾
        shell:Common Startup
      • 個人啟動資料夾
        shell:startup
  • 圖書館三樓影印機掃描使用說明

碧華國小行動學習學校工作會議暨成長研習(1060303)

日期:106年3月3日下午 1:30 – 4:30

地點:電腦教室(三)

與會人員:陳明秀、邱昭士、鄭佑津、詹莉萍、陳瓊娟、吳金芳、林崇慧、文玉琳

簽到單:1060303行動學習工作會議暨成長研習簽到單

活動照片:

工作報告:

行動學習專案:

宣導與重要公告:

  • 新北市立崇林國民中學辦理「教育部106年度行動學習推動計畫全國示範觀摩研習」,敬邀各縣市國中小有意願參與行動學習之教師及團隊踴躍報名參加
  • 加強宣導資訊素養相關觀念,提升親師生健康上網之認知,以達合理且合宜使用網路資源
    • 教育部建置之「全民資安素養網」宣導網站(https://isafe.moe.edu.tw/)。
    • 本局建置之「資訊安全與倫理」教學網站(http://infosense.ntpc.edu.tw/)。
    • 臺北市教育局建置之「臺北市高中職、國中小資訊素養與倫理」教學教材網站(http://ile.tp.edu.tw/)。
    • 「iWIN網路內容防護機構」(http://www.win.org.tw/)。
    • 教育部網路守護天使防制軟體 NGA官方網站(http://nga.moe.edu.tw)。
    • 教育部建置之「中小學網路素養與認知」教學網站(https://eteacher.edu.tw/)。
    • 「教育部數位學習服務平臺」(https://ups.moe.edu.tw/):提供相關數位學習課程,其中為協助教師對網路沉迷的認識,特製作「上網,不迷網」數位學習課程,請教師踴躍參與該課程。
  • 轉知國家教育研究院106年「愛學網名人講堂勵志留言板」活動計畫,歡迎學生踴躍參與
    • 愛學網活動網址:http://stv.moe.edu.tw
  • 新北市106年度第一期教師教學科技增能培訓,請教師踴躍報名參加
  • 高雄市政府教育局106年第1次達客飆程式「Coding Game Based Learning」網路競賽,歡迎本校學生踴躍參加

研習活動:

參考資料:

資訊工作日誌(106年3月份)

3月30日(四):

  • 製作 L480 主機最新 Clonezilla 映像檔,上傳至雲端硬碟,整理雲端硬碟。
  • 整理本校網站,將長期不再更新的本校網頁關閉。
  • 探討解決校務行政系統學生自訂帳號錯誤及校務評鑑家長問卷誤填等相關問題。

3月29日(三):

3月28日(二):

3月27日(一):

  • 上午 10:30 於電腦教室(三)舉行「校務評鑑上傳資料說明會」。
  • 設定雲端硬碟上「校務評鑑上傳資料」及「行政檔案」區。
  • webnas 伺服器 Cloud Sync 出狀況「停用」,重新將其啟用,不過一陣子後,又再度停用,連續兩、三次都是這樣,可能是由於雲端硬碟上的資料有大量資料與 webnas 不同步所致,待所有行政檔案資料皆上傳至雲端硬碟後,再重新啟用 Cloud Sync。
  • 合志工程師至校安裝修好的電腦教室(三)液晶顯示器。
  • 送出校務行政系統重設自訂帳號申請表。
  • 四年8班教師電腦 L480 主機板故障。

3月26日(日):

3月25日(六):

3月24日(五):

3月23日(四):

3月22日(三):

3月21日(二):

  • 至仁愛國小參加「106年3月份三重區資訊組長會議暨成長研習」。
  • 合志工程師至校將電腦教室(三)故障的螢幕送廠維修。
  • 群準工程師將於明日上午9:30至校更換電腦教室(二) EVO 廣播系統的網路線,約需 2 小時。

3月20日(一):

3月17日(五):

3月16日(四):

3月15日(三):

3月14日(二):

3月13日(一):

3月11日(六):

3月10日(五):

3月9日(四):

  • 張貼「圖書館三樓影印機掃描使用說明」至圖書館三樓影印機上。
  • 電腦教室(二)有 1 部電腦開機後操作一陣子後就會當機,昨日重建系統快取,無效,今將硬碟整個格式化,再重新發佈新的系統節點,再觀察。
  • 製作電腦教室(一)新的 Evo Cloud系統 Ubuntu 映像檔節點,解決無法取得 DNS 設定,不能上網的情形,並關掉 WiFi 功能。
  • 製作電腦教室(三)新的 Evo Cloud系統 Windows 10 映像檔節點,安裝必要的教學軟體,並更新自由軟體。下列情形會導致安裝程式時,系統會掛掉:
    • 直接從 \\winserver\shareware 安裝較大型的軟體,必須先將檔案複製到本機再安裝。
    • 在使用 IE 11 時,不能再開其他的瀏覽器。
  • 四年3班教室電腦因使用簡易型VGA同步器,導致顯示畫面會有重影,甚至閃動的情形,更換過VGA同步器後,問題已排解。
  • 校務行政系統因尚未產生週課表,以致新請假模組,無法取得代課資料,已電連全誼資訊協助處理完成。
  • 更新本校自由軟體

3月8日(三):

  • 電腦教室(二)報修 3 台電腦故障:
    • 其中 2 部主要是群準廣播系統廣播盒故障所致,重接線路,電源重接後即恢復正常。
    • 電腦開機後操作一陣子後就會當機,研判是系統硬碟快取爆滿所致,重建系統硬碟快取,再重開機即可。
  • 下午至教研中心參加「新北市程式開發社群工作坊-Scratch擴充積木設計」,並將研習相關教材、學習資源加入「本校程式教育中心 – Scratch 積木設計」。
  • Synology NAS 網站維運(1060308)

3月7日(二):

  • 圖書館三樓影印機掃描使用說明
  • 全誼資訊回覆:新北市校務行政系統「學籍管理」的「報表列印」問題已解決。
  • 發現圖書館三樓影印機電腦驅動程式有問題,無法從任何瀏覽器列印文件。
    • 改裝為 Ricoh MP 5000 影印機驅動程式,可正常列印。
  • Windows 10 中文版,使用 Microsoft Office 2010,除了書法注音字型外,其他如華康或文鼎注音字型雖正常列印,但轉成 PDF 檔後該字型會消失不見。

3月6日(一):

3月5日(日):

  • 本校程式教育中心
    • 新增【Greenfoot】、【Alice 3D動畫設計】專題網頁。
    • 於【Scratch】專題中新增臺北市南港高中高慧君老師發表的一系列範例教學影片

3月4日(六):

3月3日(五):

  • 本校網站首頁新增「音樂班公告」。
  • 下午,本校行動學習106年3月份第一次工作會議暨成長研習
  • 新北市校務行政系統「學籍管理」的「報表列印」發生問題,出現錯誤警訊,已向全誼資訊報修,現正處理中。
  • 大同工程師至校更換昨日報修的 DLink miniGBIC。

3月2日(四):

  • 線上報修 1 顆 DLink miniGBIC 故障。
  • 本校程式教育中心」初步建置完工,對外正式開放。
  • 五年6班教師電腦L480故障報修,查電腦沒壞,替換 1 條VGA短線。
  • 六年1班單槍故障報修,查單槍沒壞,VGA線沒插好。

3月1日(三):

  • 電腦教室(三)伺服器開機後,EVO Cloud Key Pro 無法正常啟用,導致客戶端開機緩慢且系統如同當機一般,沒有反應,將伺服器重開機,正常啟用 EVO Cloud Key Pro 後,客戶端不必重新開機即恢復正常。
  • 下午至教研中心參加「新北市程式開發社群工作坊」。
  • 本校創客教育中心設定網路上的所有人都可以造訪我的網站。
  • 新設「本校程式教育中心」。
  • 為何學校的 L3 Switch 要設定 DNS Relay?
    • 把gw ip 設在dns 上可以當server查詢,也就類似家用ap那樣,client把dns設定為分享器的 ip。