raspberry pi讀書會#1 - raspberry pi cookbook ch1
Post on 07-Jul-2015
54.087 Views
Preview:
DESCRIPTION
TRANSCRIPT
Raspberry Pi 讀書會 #1- Raspberry Pi Cookbook
台灣樹莓派 <sosorry@raspberrypi.com.tw>Nov 10, 2014
姓名標示 — 非商業性 — 相同方式分享
CC (Creative Commons)
姓名標示 — 你必須給予 適當表彰、提供指向本授權條款的連結,以及 指出(本作品的原始版本)是否已被變更。你可以任何合理方式為前述表彰,但不得以任何方式暗示授權人為你或你的使用方式背書。
非商業性 — 你不得將本素材進行商業目的之使用。
相同方式分享 — 若你重混、轉換本素材,或依本素材建立新素材,你必須依本素材的授權條款來散布你的貢獻物。
3
Raspberry Pi 的相關書籍
4
5
● 知名作者 , 通常可確保內容通順
● 完整性的書適合大眾 , 主題性的適合小組
● 最好有電子檔 , 長度適中 , 不是背字典
● 一定要可以動手做 , 才能做中學加深印象
● 有該書籍的相關討論串最好 , 看別人怎麼說
如何選擇一本好書?
6
● Simon Monk
● Book review
Raspberry Pi Cookbook
http://goo.gl/mZ585x
http://www.monkmakes.com/
7
● Model A● Model B rev. 1● Model B rev. 2 ( 英國製 / 中國製 / 中國製 )● Model B+
選擇適合的 Raspberry Pi 型號
http://goo.gl/UQgoQ6
Model A Model B rev. 2(UK) Model B (China) Model B (China) Model B+
8
● SD 卡
● http://elinux.org/RPi_SD_cards● 電源供應器 (power supply) 很重要 !
● 2A > 1A, 重 = 好 , 選擇大品牌● 無線網卡
● http://elinux.org/RPi_USB_Wi-Fi_Adapters● USB Hub
● http://elinux.org/RPi_Powered_USB_Hubs
選擇適合的週邊設備
9
選擇作業系統
http://en.wikipedia.org/wiki/Raspberry_Pi
10
● Windows
Win32 Disk Imager
● Linux● sudo dd if=/path/to/img of=/path/to/sd bs=4M
● Mac OSX● ApplePi-Baker
安裝作業系統
11
● 必要的設定● Expand filesystem● Internationalisation Options > Keyboard Layout > US
raspi-config 設定
12
● 列出目前所使用的參數● vcgencmd get_config int
● 更多神秘參數請參考● http://www.raspberrypi.org/documentation/config
uration/config-txt.md● http://elinux.org/RPiconfig● https://raw.githubusercontent.com/Evilpaul/RPi-
config/master/config.txt
/boot/config.txt
13
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
config_hdmi_boost=4
設定 HDMI 轉 VGA
14
● # uncomment to force a specific HDMI mode (this will force VGA)
● hdmi_group=2● hdmi_mode=16●
● #hdmi_group=2 (DMT)● #16 1024x768 60Hz
無法抓到正確解析度時 , 手動調整
http://www.raspberrypi.org/documentation/configuration/config-txt.md
15
● 更換高速 SD 卡
● 超頻 (overclock)● 調整 GPU/Memory 比例
效能調校
16
超頻- 屬於不保固行為
17
#!/usr/bin/python ● import time
●
● def factorial(n):
● if n == 0:
● return 1
● else:
● return n * factorial(n-1)
●
● before_time = time.clock()
● for i in range(1, 10000):
● factorial(200)
● after_time = time.clock()
● print(after_time - before_time)
效能評測 factorial
18
● 量測目前 CPU 頻率
● cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq● 取消動態超頻
● force_turbo=1● 手動調整最高頻率
● arm_freq=11500
實測數據
Speed test
None 700MHz 18.3
Turbo 1000Hz 11.9
Turbo 1000Hz + force turbo 11.3
Turbo 11500Hz + force turbo 9.9
19
● 指令模式● shutdown -h now● sudo sync; sudo init 0
● 視窗模式
正確的關機- 千萬不要直接拔電源
20
● The MagPi● Baking Pi Project● ...
建議未來可讀方向
Raspberry Pi Rocks the World
Thanks
top related