Category Archives: Raspberry-Pi

用树莓派Raspberry pi+piCorePlayer做HiFi DSD播放端

piCorePlayer是树莓派平台上,用tinycore结合squeezelite实现网路播放终端功能。它可以接USB音频解码器,也可以通过I2S接DAC板。这个与前面介绍的Volumio和Runeaudio不同(注×),它仅仅是播放终端,类似新出auralic aries,这个加个XMOS USB audio接口和WIFI就是简易版本的auralic aries,只不过没显示而已,使用成熟的罗技软件可能比现阶段的auralic aries还方便稳定。 Continue reading 用树莓派Raspberry pi+piCorePlayer做HiFi DSD播放端

Getting a Python script to run in the background (as a service) on boot

For some of my projects I write a simple service in Python and need it to start running in the background when the Raspberry Pi boots. Different Linux distributions use different ways of starting and stopping services (some now use Upstart, some systemd). I am using the “Wheezy” Debian distribution on my Raspberry Pi, and in this case the proper way to do this is using an “init script”. These are stored in the /etc/init.d folder. In there you can find scripts that for instance, start the networking system or a print server. Debian Wheezy uses the old Sys V init system which means that these scripts are run according to symbolic links in the /etc/rc.x directories. The Debian documentationexplains this. Continue reading Getting a Python script to run in the background (as a service) on boot

Run a script on raspberry pi start up

Sometimes it’s useful to automatically run a script on a Pi when it boots up. You might want to start a script that monitors sensors, a Bittorrent client, or a program to back up your Pi to the internet. There are several ways of doing this, and each one has it’s benefits.
In the following examples I’m going to start a program called servod which manages a servo. The program runs in the background and uses the Pi’s GPIO pins to set the position of a servo. Continue reading Run a script on raspberry pi start up

树莓派用服务方式设置开机启动python

最近有个项目利用树莓派来完成,主要是在树莓派上用python写了个脚本来处理一些信息与逻辑。这边就遇到一个问题,即设置该脚本在开机的时候自动运行,而不是需要人登陆到树莓派上在执行这个程序,这样太麻烦了,顶多在实验室玩玩,拿不出去。本文主要讲诉设置该python脚本在树莓派上自动运行。 Continue reading 树莓派用服务方式设置开机启动python

raspberry pi 时间 同步

第一步:安装命令:sudo apt-get install ntpdate
第二步:输入命令tzselect
第三步:进入到/usr/share/zoneinfo/Asia   然后输入命令sudo cp Shanghai /etc/localtime
第四步:输入命令sudo ntpdate cn.pool.ntp.org