Skip to content

Instantly share code, notes, and snippets.

@junstrix
Last active December 14, 2015 07:49
Show Gist options
  • Save junstrix/5053559 to your computer and use it in GitHub Desktop.
Save junstrix/5053559 to your computer and use it in GitHub Desktop.
raspberrypi,树莓派单板电脑业余捣鼓...

image 陆续分享一些攻略,参考...


学习的最好的地方是raspberrypi官方论坛和elinux.org,有各种有意思的hacking,再加上google 搜索结合linux的应用就有各种有意思的创意思源,然后再实现之,也体现通过Raspberry Pi小而美的方式深入学习计算机知识.

#安装系统 最小的基本硬件有Raspberry Pi单板、SD Card、Micro USB电源线,有网络接上RJ45网线就完全可以跑起来了,这些硬件都可以在官方指定代理商ickey里可以买到。

  • 下载系统

    在官方下载http://www.raspberrypi.org/downloadsRaspbian系统,更多支持的OS类型可参考link

  • 解压

  • linux使用dd命令把系统复制到SD卡

    sudo dd if=~/Downloads/2012-10-28-wheezy-raspbian/2012-12-16-wheezy-raspbian.img of=/dev/rdisk3 bs=4m
    

    文件名及SD卡设备名各自可能不同,注意查看。

dd拷贝完成后连接电源,装上SD卡就可以用了,没接上显示器要控制raspberry,可以接上网线使用ssh远程控制。

ssh网络连接,参考link

SD卡各平台详细设置,参考link

#PulseAudio跨网络传送音频

手上没有外接音频设备,又想pi播放声音怎么办,可以使用PullseAudio C/S模型,Server播放音频,Client提供音源。

以下是pi提供音源,在笔记本上播放声音,它们在同一局域网内:

  • pi和debian安装PulseAudio

    sudo apt-get install pulseaudio paprefs

  • Server笔记本配置

    vim /etc/pulse/default.pa 增加以下内容:

    load-module module-native-protocol-tcp listen=0.0.0.0 auth-anonymous=1

    配置好需要重启pulseaudio服务:

    $ pulseaudio --kill
    $ pulseaudio --start
    
  • Client pi配置

    vim /etc/pulse/client.conf,增加以下内容:

    default-server = tcp:192.168.1.105:4713

    然后安装mplayer使用测试音量了。

#微博相关 越来越流行的社交媒体,开放的数据连接,以及物联网的流行,使得联网设备能实现一些非常有趣的玩法,可以利用定时发微博,可以获取特定微博的指定内容(命令)来控制联网设备的行为。 #External Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment