











這裡要選專家模式




這裡要選icds(忽略硬碟大小)

這裡要選擇用-j0(用dd來産生分割區...)








ExpiresActive on ExpiresByType image/jpg "access plus 60 days" ExpiresByType image/png "access plus 60 days" ExpiresByType image/gif "access plus 60 days" ExpiresByType image/jpeg "access plus 60 days" ExpiresByType text/css "access plus 1 days" ExpiresByType image/x-icon "access plus 1 month" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week"
3.重新啟動apache2
sudo /etc/init.d/apache2 restart
沒有看到錯誤內容,即完成設定,可以去檢查一下網站速度是否有變快。
git config --global user.name "帳號"
git config --global user.email "xxx@gmail.com"
git commit -m "first commit" git remote add origin https://github.com/帳號/專案名稱
sudo -s
apt-get update
apt-get install python-pip
2.顯示 pre-installed Python 套件:
pip freeze
3.如果沒有出現任何像pyserial==2.5 or pyserial==2.7 在清單中請建立使用 pip, 並安裝 PySerial:
pip install PySerial
4.安裝 PyMata 為了串行通訊在Python 用 Firmata 在 Arduino (PySerial 需要事先安裝 ):
pip install PyMata
5.下載s2a到家目錄
https://github.com/MrYsLab/s2a_fm
6.解壓縮,並複製s2a_fm_base_zh_tw.sb2到文件資料夾中
unzip s2a_fm-master.zip
chmod -R 777 s2a_fm-master
cp s2a_fm-master/ScratchFiles/ScratchProjects/s2a_fm_base_zh_tw.sb2 ~/Documents/
chmod 777 ~/Documents/s2a_fm_base_zh_tw.sb2
7.開啟終端機
sudo -s
cd ~/cd s2a_fm-master
python s2a_fm.py /dev/ttyACM0
為了避免學生輸入一堆英文字,可以把這一段做成一個sh內容如下
#!/bin/bash
cd ~/
cd s2a_fm-master
python s2a_fm.py /dev/ttyUSB0
並做成一個.desktop來執行
8.看到
s2a_fm version 1.5 Copyright(C) 2013-14 Alan Yorinks All Rights Reserved
PyMata version 1.58 Copyright(C) 2013-14 Alan Yorinks All rights reserved.
Opening Arduino Serial port /dev/ttyACM0
Please wait while Arduino is being detected. This can take up to 30 seconds ...
Board initialized in 0 seconds
Total Number of Pins Detected = 20
Total Number of Analog Pins Detected = 6
Please wait for Total Arduino Pin Discovery to complete. This can take up to 30 additional seconds.
Arduino Total Pin Discovery completed in 0 seconds
Starting HTTP Server!
Use <Ctrl-C> to exit the extension
Please start Scratch or Snap!
表示連線成功
9.啟動scratch2,並開啟文件資料夾中的s2a_fm_base_zh_tw.sb2
看到 下圖表示連線成功可以運作了。