標籤: 技術文
Raspberry pi Recall
1. 先接TTL到電腦
Rpi輸入command:
/etc/init.d/networking restart
3. Rpi連上網路後,查看IP
Rip輸入command:
hostname -I
or
ifconfig
4. 以SSH連線(這樣在Rpi打code比較順,否則用TTL連線的只能顯示一行,根本不能打code)
電腦輸入command:
ssh root@172.20.10.5
5. 在Rpi以GPIO控制LED
待續
參考:
1. 以不同使用者登入ssh:https://www.raspberrypi.org/documentation/remote-access/ssh/unix.md
2. 葉難(寫Python)(GPIO寫LED閃爍):http://yehnan.blogspot.tw/2012/07/raspberry-pigpioled.html
3. CodeSchool(寫)Java:http://www.codedata.com.tw/java/java-embedded-7-raspberry-pi-gpio-implementation-1/
4. 智慧生活(寫)Python:http://cheng-min-i-taiwan.blogspot.tw/2013/04/raspberry-pi-python.html
How to read the string to end in C
char c;
while(c=((*string)++)!=' '){
//dosomething
}
html試貼
int main(int argc , char* argv[])
{
cout<< "hello world" << ends;}
CSS語法練習
1. 修改背景顏色(background-color:#888888) + 字體顏色(color:white) + 字體大小(font-size:30)
<span style=”background-color: #888888; color: white; font-size: 20 “> 想要打的字 </span>
2. 修改背景顏色(background-color:#666666) + 字體顏色(color:white) + 字體大小(font-size:30)
<span style= “background-color:#666666; color:white; font-size:30”>想要打的字 </span>
3. 修改背景顏色(background-color:#AAAAAA) + 字體顏色(color:white) + 字體大小(font-size:30)
<span style=”background-color:#AAAAAA; color:white; font-size:30″> 想要打的字 </span>
4. 修改背景顏色(background-color:#DDDDDD) + 字體顏色(color:#AAAAAA) + 字體大小(font-size:30)
<span style=”background-color:#DDDDDD; color: #AAAAAA; font-size:30″> 想要打的字 </span>
5. 想要把整區的背景為統一 => 把span改成div (就會變成整塊),其餘語法不變
—————————————————————————————————————-
練習區:
以下為hello world的sample code:
printf(“Hello World!”);
}
git / gdb
抓檔:git clone 網址
上傳(commit): git commit “修改內容(自己想打什麼就打什麼)”
看commit log: git log
——————————————————————————————————
用gdb:gcc debugger
先gdb進去debug mode
在裡面只能使用pwd, cd指令
1. 讀檔: file “檔名”
2. 試跑: run
3. 看code: list
list –
4. 設中斷點:break 行數
b 行數
5. 設watch point: watch 參數
6. 程式執行:
逐步執行: n
離開中斷點執行: c
試用ESP8266 ESP01 WIFI模組
買了一塊ESP8266的ESP01 wifi模組 77元
想說這麼便宜就玩玩看
ESP8266是這塊模組 ESP01則是這次版本的型號
似乎ESP01 和 ESP03最常見(?
這篇似乎很詳細
1. 阿喵就像家(深入淺出 Wifi 晶片 ESP8266 with Arduino):http://mlwmlw.org/2015/07/深入淺出-wifi-晶片-esp8266-with-arduino/
這篇也不錯
2. 遊戲自己做(【技術教學】打造Wifi遙控車(之一):使用 ESP8266進行 Wifi無線通訊)
http://lets-make-games.blogspot.tw/2015/04/wifi-esp8266-wifi.html
試燒 Arduino pro mini / 用終端機讀UART
1. 接DTR
2. 接RESET
3. 用Arduino Uno燒pro mini
=> 用SPI來燒錄
———————————————————————————————————————–
用終端機讀UART
在terminal上
打
ls /dev*
看一下我們的裝置是哪一個
最簡單的判斷方法就是
不要插先查
之後插完再查一次
對照一下哪個多出來的
插入PL2303的話是 tty.usbserial 和 cu.usbserial
但是用tty才可以
tty和cu的差別看這篇
MAC電腦連接埠:http://arduino.tw/articlesindex/electricity/293-devcudevtty.html
screen tty.usbserial 9600
How to run a C++/Java program?
1. C++:
How to hide the ActionBar/StatusBar in Android
在Manifest.xml裡