1.下載軔體
2.設定IP Router
Router 預設 IP 192.168.1.1
id:admin ,password admin
3.系統工具 軟體升級
4.連線到工作仿 專用網路 (Workshop)
PASSword :8888888888
防火牆設定為lan
interface 下設定IP
192.168.5.51 開始
192.168.5.2 gateway
dns :8.8.8.8
5. 準備上傳Arduino 程式碼
#!/bin/sh
update_fb() {
source_url="https://www.facebook.com/cutespring"
url="http://api.facebook.com/restserver.php?method=links.getStats&urls=$source_url"
num="`wget -O - $url 2>/dev/null | grep total | sed -e 's/^[ ]*<total_count>\([0-9][0-9]*\).*/\1/g'`"
xnum=$((0 + num))
if [ "$xnum" -gt 0 ]; then
echo "updating $xnum"
echo "$xnum." >/dev/ttyACM0
ret=$?
fi
}
check_network_connectivity () {
run=1
while [ $run -eq 1 ]; do
ping -c 1 168.95.1.1
run=$?
done
}
# main
check_network_connectivity
while [ 1 ] ; do
update_fb
sleep 5
done
/etc/rc.local/
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |