rev |
line source |
pankso@535
|
1 <!DOCTYPE html>
|
pankso@535
|
2 <html lang="en">
|
pankso@535
|
3 <head>
|
pankso@535
|
4 <title>SliTaz PiBook</title>
|
pankso@535
|
5 <meta charset="utf-8" />
|
pankso@535
|
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
pankso@535
|
7 <link rel="stylesheet" type="text/css" href="../style.css" />
|
pankso@535
|
8 <link rel="stylesheet" type="text/css" href="../style-tiny.css" />
|
pankso@535
|
9 <link rel="shortcut icon" href="../favicon.ico" />
|
pankso@535
|
10 <!-- Raspberry color -->
|
pankso@535
|
11 <style type="text/css">
|
pankso@535
|
12 h2 { color: #bc1142; }
|
pankso@535
|
13 </style>
|
pankso@535
|
14 </head>
|
pankso@535
|
15 <body>
|
pankso@535
|
16
|
pankso@535
|
17 <!--
|
pankso@535
|
18 TODO: Overscan settings, GPU memory split, VideoCore Tools, Edu/Scratch
|
pankso@535
|
19 -->
|
pankso@535
|
20
|
pankso@535
|
21 <div id="header">
|
pankso@535
|
22 <div id="network"><a href="http://arm.slitaz.org/">SliTaz ARM</a></div>
|
pankso@535
|
23 <h1><a href=".">SliTaz ARM Codex</a></h1>
|
pankso@535
|
24 </div>
|
pankso@535
|
25
|
pankso@535
|
26 <nav id="nav" role="navigation" tabindex="0">
|
pankso@535
|
27 <ul>
|
pankso@535
|
28 <li><a class="nav1" href="faq.html">FAQ</a></li>
|
pankso@535
|
29 <li><a class="nav2" href="system.html">System</a></li>
|
pankso@535
|
30 <li><a class="nav1" href="apps.html">Apps</a></li>
|
pankso@535
|
31 <li><a class="nav2" href="setup.html">Setup</a></li>
|
pankso@535
|
32 </ul>
|
pankso@535
|
33 </nav>
|
pankso@535
|
34
|
pankso@535
|
35 <!-- Content -->
|
pankso@535
|
36 <div id="content">
|
pankso@535
|
37
|
pankso@535
|
38 <h2>SliTaz Raspberry Pi book</h2>
|
pankso@535
|
39
|
pankso@535
|
40 <p>
|
pankso@535
|
41 With the PiBook you will learn how to get started with SliTaz ARM and
|
paul@540
|
42 the Raspberry Pi, configure the system, install additional software
|
pankso@535
|
43 packages, setup a custom desktop and use pre-installed applications.
|
paul@543
|
44 The book also covers GPIO usage, add-on boards setup such as the official
|
paul@543
|
45 Raspberry Pi Camera or PiGlow and basic electronic usage.
|
pankso@535
|
46 </p>
|
pankso@535
|
47
|
pankso@535
|
48 <ul>
|
pankso@535
|
49 <li><a href="#install">Installation instructions</a></li>
|
pankso@535
|
50 <li><a href="#firstboot">First boot setup</a></li>
|
pankso@535
|
51 <li><a href="#config">System configuration</a></li>
|
pankso@535
|
52 <li><a href="#audio">Audio settings</a></li>
|
pankso@535
|
53 <li><a href="#update">System & kernel update</a></li>
|
pankso@535
|
54 <li><a href="#add-apps">Installing new packages</a></li>
|
pankso@535
|
55 <li><a href="#def-apps">Installed applications</a></li>
|
paul@540
|
56 <li><a href="#pi-pkgs">Raspberry Pi packages</a></li>
|
pankso@535
|
57 <li><a href="#remote">GUI & secure remote control</a></li>
|
pankso@535
|
58 <li><a href="#setup">Pi setup suggestions</a></li>
|
pankso@535
|
59 <li><a href="#desktop">Desktop customization</a></li>
|
pankso@535
|
60 <li><a href="#gpio">GPIO Pins & I2C Bus</a></li>
|
pankso@553
|
61 <li><a href="#pileds">Using leds with the RPi</a></li>
|
pankso@535
|
62 <li><a href="#picam">Pi Camera - Pi NoIR</a></li>
|
pankso@535
|
63 <li><a href="#piglow">PiGlow from Pimorini</a></li>
|
pankso@558
|
64 <li><a href="#piface">PiFace Digital setup and usage</a></li>
|
pankso@555
|
65 <li><a href="#raspicomm">RaspiComm init and usage</a></li>
|
pankso@535
|
66 </ul>
|
pankso@535
|
67
|
pankso@535
|
68 <p>
|
paul@540
|
69 The Pibook is complemented by the general documentation found in the
|
pankso@535
|
70 <a href="./.">SliTaz ARM Codex</a>.
|
pankso@535
|
71 </p>
|
pankso@535
|
72
|
pankso@535
|
73 <h2 id="install">Installation instructions</h2>
|
pankso@535
|
74
|
pankso@535
|
75 <pre class="box-up">
|
pankso@535
|
76 boot/ : Must be copied to a FAT32 partition
|
pankso@535
|
77 rootfs/ : Must be copied to an ext4 or btrfs partition
|
pankso@535
|
78 </pre>
|
pankso@535
|
79
|
pankso@535
|
80 <p>
|
pankso@535
|
81 Be sure the SD card has got 3 partitions (boot, swap, root). The
|
pankso@535
|
82 recommended partition sizes are 40Mb for /boot, 420Mb for swap and
|
pankso@535
|
83 using all available free space for root. Then you simply have to
|
pankso@535
|
84 run the install.sh script from the SliTaz Raspberry Pi release
|
pankso@535
|
85 directory:
|
pankso@535
|
86 </p>
|
pankso@535
|
87 <pre>
|
pankso@535
|
88 # ./install.sh
|
pankso@535
|
89 </pre>
|
pankso@535
|
90
|
pankso@535
|
91 <h2 id="firstboot">First boot setup</h2>
|
pankso@535
|
92
|
pankso@535
|
93 <p>
|
pankso@535
|
94 On the first SliTaz Raspberry Pi boot you will be prompted to configure
|
pankso@535
|
95 basic system settings such as the system keymap and the root password.
|
paul@540
|
96 Then you will be prompted to create the default user with its password.
|
pankso@535
|
97 </p>
|
pankso@535
|
98 <p>
|
paul@540
|
99 On any secure GNU/Linux system you will have to have at least the administrator
|
pankso@535
|
100 (root) and the default human user. In this way, users can fully use
|
pankso@535
|
101 the system but can't break it.
|
pankso@535
|
102 </p>
|
pankso@535
|
103 <p>
|
pankso@535
|
104 You can preconfigure the system before the first boot by editing the
|
pankso@535
|
105 configurations on the SD card and you can skip the post installation
|
pankso@535
|
106 steps. More info on the SliTaz ARM Codex:
|
pankso@535
|
107 <a href="system.html#firstboot">System configs</a>
|
pankso@535
|
108 </p>
|
pankso@535
|
109
|
pankso@535
|
110 <h2 id="config">System configuration</h2>
|
pankso@535
|
111
|
pankso@535
|
112 <p>
|
paul@540
|
113 All SliTaz Raspberry Pi basic configurations can be done via a nice
|
pankso@535
|
114 Ncurses driven GUI with mouse support under an X session and via
|
pankso@535
|
115 a CGI/web administration interface. Please check the detailed
|
paul@540
|
116 <a href="#remote">remote control section</a> in the book for more
|
pankso@535
|
117 information about the CGI/Web control panel.
|
pankso@535
|
118 </p>
|
pankso@535
|
119
|
pankso@535
|
120 <pre class="box-up">
|
pankso@535
|
121 tazberry : Dedicated tool for all Raspberry Pi specific configs
|
paul@540
|
122 slitaz-config : Slitaz system configs such as keymaps, lang, users
|
pankso@535
|
123 </pre>
|
pankso@535
|
124
|
pankso@535
|
125 <p>
|
pankso@535
|
126 Tazberry and slitaz-config tool are accessible from the 'System Tools'
|
pankso@535
|
127 menu or can be run from a cmdline:
|
pankso@535
|
128 </p>
|
pankso@535
|
129
|
pankso@535
|
130 <pre>
|
pankso@535
|
131 # tazberry
|
pankso@535
|
132 # slitaz-config
|
pankso@535
|
133 </pre>
|
pankso@535
|
134
|
pankso@535
|
135 <h2 id="audio">Audio settings</h2>
|
pankso@535
|
136
|
pankso@535
|
137 <p>
|
pankso@535
|
138 The Raspberry Pi has two audio output modes: HDMI and headphone jack.
|
paul@540
|
139 You can switch between these two modes at any time. SliTaz Raspberry Pi
|
paul@540
|
140 provides a custom web admin plugin to graphically configure and check
|
paul@540
|
141 audio settings locally or remotely. The web audio control lets you
|
paul@540
|
142 switch audio output and play a sound to test settings. You can directly
|
paul@540
|
143 access the audio control panel with a URL in the form of:
|
pankso@535
|
144 </p>
|
pankso@535
|
145 <pre>
|
pankso@535
|
146 http://192.168.x.xxx/adm/tools.cgi?audio
|
pankso@535
|
147 </pre>
|
pankso@535
|
148 <p>
|
paul@540
|
149 You can also configure the Raspberry Pi audio output from the command
|
paul@540
|
150 line where the last number is the output mode (0=auto 1=jack 2=hdmi):
|
pankso@535
|
151 </p>
|
pankso@535
|
152 <pre>
|
pankso@535
|
153 # amxier cset numid=3 1
|
pankso@535
|
154 </pre>
|
pankso@535
|
155 <p>
|
paul@540
|
156 The desktop flavor includes Alsa audio mixer and mpg123 cmdline
|
pankso@535
|
157 audio player. Please check the Codex apps page for a common list of
|
pankso@535
|
158 <a href="apps.html#multimedia">multimedia applications</a>.
|
pankso@535
|
159 </p>
|
pankso@535
|
160
|
pankso@535
|
161 <h2 id="update">System & kernel update</h2>
|
pankso@535
|
162 <p>
|
paul@540
|
163 It is always a good idea to check for updates! It will bring you fixes
|
pankso@535
|
164 and new features. With SliTaz Raspberry Pi you have to upgrade all
|
paul@540
|
165 the installed packages and the custom Linux Kernel. Updates can be done
|
pankso@535
|
166 via spk-dialog and tazberry found in the "System Tools menu" or directly
|
paul@540
|
167 from a command line:
|
pankso@535
|
168 </p>
|
pankso@535
|
169 <pre>
|
pankso@535
|
170 # spk-dialog
|
pankso@535
|
171 # tazberry
|
pankso@535
|
172 </pre>
|
pankso@535
|
173
|
pankso@535
|
174 <h2 id="add-apps">Installing new packages</h2>
|
pankso@535
|
175
|
pankso@535
|
176 <p>
|
pankso@535
|
177 After your system is configured and connected to the web, you may want
|
paul@540
|
178 to install new packages to add functionality to your SliTaz system.
|
pankso@535
|
179 You can install new applications via spk-dialog GUI or from the command
|
pankso@535
|
180 line with spk-add:
|
pankso@535
|
181 </p>
|
pankso@535
|
182 <pre>
|
pankso@535
|
183 # spk-add package package1 packageN
|
pankso@535
|
184 </pre>
|
pankso@535
|
185 <p>
|
pankso@535
|
186 You can find a list of packages on the SliTaz Raspberry Pi website
|
paul@540
|
187 or by using the spk-find utility. You can search by package name, keyword
|
pankso@535
|
188 or description:
|
pankso@535
|
189 </p>
|
pankso@535
|
190 <pre>
|
pankso@535
|
191 # spk-find i2c
|
pankso@535
|
192 </pre>
|
pankso@535
|
193
|
pankso@535
|
194 <h2 id="def-apps">Installed applications</h2>
|
pankso@535
|
195
|
pankso@535
|
196 <p>
|
paul@540
|
197 SliTaz Raspberry Pi can come in many flavors with a custom pre-installed
|
paul@540
|
198 packages set. This section will cover the base and desktop flavors, more
|
paul@540
|
199 information about a spécific flavor may be found on the SliTaz Raspberry
|
pankso@535
|
200 Pi website.
|
pankso@535
|
201 </p>
|
pankso@535
|
202
|
pankso@535
|
203 <h3>Base system</h3>
|
pankso@535
|
204 <p>
|
paul@540
|
205 The base flavor provides a text mode system with cmdline only tools, all
|
paul@540
|
206 Busybox applets are present. It supports wireless networks but no sound.
|
paul@540
|
207 The default and most useful applications are:
|
pankso@535
|
208 </p>
|
pankso@535
|
209
|
pankso@535
|
210 <ul>
|
paul@540
|
211 <li>Dropbear SSH client & server</li>
|
pankso@535
|
212 <li>Busybox HTTPd, NTPd, FTPd servers</li>
|
pankso@535
|
213 <li>The CGI/Web admin interface and TazBerry</li>
|
pankso@535
|
214 <li>Clex file manager and Lynx web browser</li>
|
pankso@535
|
215 <li>TazIRC IRC client and Spk packages manager</li>
|
pankso@535
|
216 <li>Joe text editor and wget :-)</li>
|
pankso@535
|
217 </ul>
|
pankso@535
|
218
|
pankso@535
|
219 <h3>Desktop environment</h3>
|
pankso@535
|
220 <p>
|
paul@540
|
221 The SliTaz Raspberry Pi desktop flavor focuses on providing a fast,
|
paul@540
|
222 elegant, and easy to use desktop environment. The desktop is powered
|
paul@540
|
223 by JWM window manger and you will find all the base applications plus GUI
|
pankso@535
|
224 programs:
|
pankso@535
|
225 </p>
|
pankso@535
|
226
|
pankso@535
|
227 <ul>
|
pankso@535
|
228 <li>Text editors: Adie + FLTK Editor</li>
|
pankso@535
|
229 <li>File manager: PathFinder</li>
|
paul@540
|
230 <li>Web browser: Dillo</li>
|
pankso@535
|
231 <li>X terminal: Xterm</li>
|
pankso@535
|
232 <li>Audio mixer: Alsamixer</li>
|
pankso@535
|
233 <li>Audio player: mpg123</li>
|
pankso@535
|
234 <li>2 nice games: Blocks Attack + Sudoku</li>
|
paul@540
|
235 <li>Fluid FLTK GUI designer</li>
|
pankso@535
|
236 <li>Lua programming language</li>
|
pankso@535
|
237 <li>SQLite database support</li>
|
pankso@535
|
238 <li>Htop processes monitor</li>
|
pankso@535
|
239 </ul>
|
pankso@535
|
240
|
paul@540
|
241 <h2 id="pi-pkgs">Raspberry Pi Packages</h2>
|
pankso@535
|
242
|
pankso@535
|
243 <p>
|
paul@540
|
244 Some custom tools and libraries have been packaged specially for the
|
pankso@535
|
245 SliTaz Raspberry Pi distribution. Here is a list of packages and
|
pankso@535
|
246 a short description:
|
pankso@535
|
247 </p>
|
pankso@535
|
248
|
pankso@535
|
249 <ul>
|
paul@540
|
250 <li>slitaz-arm-rpi - Provides the CGI/adm plugins, tazberry and custom
|
pankso@535
|
251 config files.</li>
|
pankso@535
|
252
|
paul@540
|
253 <li>raspberrypi-boot - Provides the R-Pi bootloader firmware.</li>
|
pankso@535
|
254
|
paul@540
|
255 <li>raspberrypi-boot-x - Provides the R-Pi bootloader firmware with
|
pankso@535
|
256 Pi Camera support.</li>
|
pankso@535
|
257
|
paul@540
|
258 <li>raspberrypi-vc -Raspberry Pi VideoCore Tools, including
|
pankso@535
|
259 raspistill and raspivid.</li>
|
pankso@535
|
260
|
pankso@535
|
261 <li>gst-omx - A gstreamer-1.0 plugin which can do hardware-accelerated
|
pankso@535
|
262 video decoding on the Raspberry Pi. </li>
|
pankso@535
|
263
|
pankso@535
|
264 <li>wiringpi - A GPIO access library written in C for the BCM2835
|
pankso@535
|
265 used in the Raspberry Pi.</li>
|
pankso@535
|
266
|
paul@540
|
267 <li>wiringpi-piglow - The WiringPi tool for PiGlow, useful to handle
|
pankso@535
|
268 leds from SHell scripts.</li>
|
pankso@535
|
269
|
pankso@535
|
270 <li>picamera - Provides a pure Python interface to the Raspberry
|
paul@540
|
271 Pi camera module.</li>
|
pankso@535
|
272
|
pankso@535
|
273 <li>libbcm2835 - Provides access to GPIO and other IO functions on
|
pankso@535
|
274 the Broadcom BCM 2835 chip.</li>
|
pankso@535
|
275
|
paul@540
|
276 <li>rcswitch-pi - RCSwitch implementation for the Raspberry Pi.</li>
|
pankso@535
|
277
|
paul@540
|
278 <li>python-rpi-gpio - Python class to control the GPIO on a Raspberry Pi.</li>
|
pankso@535
|
279
|
paul@540
|
280 <li>python-rpi-pyglow - Control Piglow from Python. Includes a custom
|
pankso@535
|
281 SliTaz utility to easily play with PiGlow.</li>
|
pankso@535
|
282
|
pankso@544
|
283 <li>pi-blaster - Enables PWM on the GPIO pins you request of a Raspberry Pi.</li>
|
pankso@544
|
284
|
pankso@553
|
285 <li>libmcp23s17 - A simple C library for accessing an MCP23S17 port expander
|
pankso@553
|
286 found on PiFace board.</li>
|
pankso@553
|
287
|
pankso@553
|
288 <li>libpifacedigital - A simple library for controlling PiFace Digital</li>
|
pankso@553
|
289
|
paul@540
|
290 <li>(xorg-xf86-video-fbturbo) - Buggy Xorg server module for the R-Pi.</li>
|
pankso@535
|
291 </ul>
|
pankso@535
|
292
|
pankso@535
|
293 <h2 id="remote">GUI & secure remote control</h2>
|
pankso@535
|
294
|
pankso@535
|
295 <p>
|
paul@540
|
296 This section will cover remote control using the SliTaz CGI/Web admin
|
paul@540
|
297 interface, SSH secure SHell connections and graphical desktop control
|
pankso@535
|
298 with VNC.
|
pankso@535
|
299 </p>
|
pankso@535
|
300
|
pankso@535
|
301 <h3>CGI/Web interface</h3>
|
pankso@535
|
302
|
pankso@535
|
303 <p>
|
pankso@535
|
304 The CGI/Web interface is a nice way to control your Raspberry Pi machine
|
paul@540
|
305 using Dillo from the desktop or any web browser from another computer,
|
pankso@535
|
306 mobile or tablet device. Remote control via the CGI interface is enabled
|
paul@540
|
307 by default. To stop/start the service or to use another port, please refer
|
pankso@535
|
308 to the SliTaz ARM Codex: <a href="system.html#cgi-adm">System page</a>
|
pankso@535
|
309 </p>
|
pankso@535
|
310
|
pankso@535
|
311 <p>
|
paul@540
|
312 SliTaz Raspberry Pi provides plugins to easily handle your Pi. In a nifty
|
pankso@535
|
313 and clean interface you can: poweroff/reboot the system, configure boot
|
pankso@535
|
314 settings including blacklisted modules, set audio output and test sound,
|
paul@540
|
315 play with GPIO pins and get I2C information, and turn on/off the green led :-)
|
paul@540
|
316 The tool lets you do quite a few more handy actions that you will discover
|
paul@540
|
317 browsing the interface.
|
pankso@535
|
318 </p>
|
pankso@535
|
319
|
pankso@535
|
320 <p>
|
paul@543
|
321 First you must found out the local IP address of your Raspberry Pi machine.
|
pankso@535
|
322 On your SliTaz Pi you can use 'ipinfo' to get the IP, then connect using
|
pankso@535
|
323 this IP. To connect you must use 'root' as user name with the correct
|
pankso@535
|
324 system administrator password.
|
pankso@535
|
325 </p>
|
pankso@535
|
326 <pre>
|
pankso@535
|
327 $ ipinfo
|
pankso@535
|
328 </pre>
|
pankso@535
|
329
|
pankso@535
|
330 <h3>Secure SSH connection</h3>
|
pankso@535
|
331 <p>
|
paul@540
|
332 By default all flavors provide Dropbear Secure SHell, a lightweight but
|
paul@540
|
333 powerful and standard compliant SSH client and server. The server is
|
paul@543
|
334 not started by default, you can start it manually from the cmdline or
|
paul@540
|
335 edit /etc/init.d/rcS.conf to start it automatically on each boot:
|
pankso@535
|
336 </p>
|
pankso@535
|
337 <pre>
|
pankso@535
|
338 # startd dropbear
|
pankso@535
|
339 # editor /etc/rcS.conf
|
pankso@535
|
340 </pre>
|
pankso@535
|
341
|
pankso@535
|
342 <h3>VNC Desktop control</h3>
|
pankso@535
|
343 <p>
|
paul@540
|
344 VNC is great tool for letting you remotely control a desktop. The steps are:
|
paul@543
|
345 install and start the VNC server on your Pi, then install a VNC client on
|
pankso@535
|
346 your desktop machine, mobile phone or tablet. To install the server
|
pankso@535
|
347 and start it on your Raspberry Pi (via an SSH connection or with an
|
pankso@535
|
348 attached keyboard and screen):
|
pankso@535
|
349 </p>
|
pankso@535
|
350 <pre>
|
pankso@535
|
351 # spk-add x11vnc
|
pankso@535
|
352 # startd x11vnc
|
pankso@535
|
353 </pre>
|
pankso@535
|
354
|
pankso@535
|
355 <h2 id="setup">Pi setup suggestions</h2>
|
pankso@535
|
356
|
pankso@535
|
357 <p>
|
paul@540
|
358 What can you do with your SliTaz Raspberry Pi distro? Use it as a tiny
|
pankso@535
|
359 desktop! Learn Linux, Lua, Python, SHell scripting. Play with some
|
paul@540
|
360 electronics circuits, sensors, leds and Raspberry Pi pluggable boards.
|
paul@540
|
361 Setup servers, use the cam for fun or security purposes, create a secure
|
pankso@535
|
362 wifi network, ...- So much can be done with a Pi!
|
pankso@535
|
363 </p>
|
pankso@535
|
364
|
pankso@535
|
365 <ul>
|
paul@540
|
366 <li>Kids learn about computers with Scratch and games</li>
|
pankso@535
|
367 <li>Web server with SHell and Python CGI support</li>
|
pankso@535
|
368 <li>Secure and anonymous wifi network with Tor</li>
|
pankso@535
|
369 <li>Development system including a wide range of tools</li>
|
paul@540
|
370 <li>Electronic circuits playground with breadboards</li>
|
pankso@535
|
371 <li>Security camera with infra red support</li>
|
pankso@535
|
372 <li>Audio player and streamer with MPD</li>
|
paul@540
|
373 <li>Video player with MPlayer or gst-omx (provides hardware
|
pankso@535
|
374 accelerated decoding on the Raspberry Pi)</li>
|
pankso@535
|
375 <li>Video streamer with gst-omx or ffserver</li>
|
pankso@535
|
376 <li><a href="setup.html">Codex setup guides</a></li>
|
pankso@535
|
377 </ul>
|
pankso@535
|
378
|
pankso@535
|
379 <h2 id="desktop">Desktop customization</h2>
|
pankso@535
|
380
|
pankso@535
|
381 <p>
|
pankso@535
|
382 Your SliTaz Raspberry Pi Desktop can be customized to infinity! With
|
paul@540
|
383 a little editing of configuration files and autostart scripts you can
|
pankso@535
|
384 configure the entire environment. The default window manager is
|
pankso@535
|
385 JWM, but it can be replaced by OpenBox, Enlightenment (e17) or the
|
pankso@535
|
386 DWM dynamic window manager.
|
pankso@535
|
387 </p>
|
pankso@535
|
388
|
pankso@535
|
389 <p>
|
paul@540
|
390 JWM autostarted applications and themes are set in a xml.jwmrc file.
|
paul@540
|
391 By default the system wide config is used, lets copy it to your home
|
paul@540
|
392 folder as a .jwmrc hidden file and then edit it:
|
pankso@535
|
393 </p>
|
pankso@535
|
394 <pre>
|
pankso@535
|
395 $ cp /etc/xdg/jwm/system.jwmrc ~/.jwmrc
|
pankso@535
|
396 $ editor .jwmrc
|
pankso@535
|
397 </pre>
|
pankso@535
|
398 <p>
|
pankso@535
|
399 The system wide menu path is: <b>/etc/xdg/jwm/menus.jwmrc</b> and
|
paul@540
|
400 is updated by SliTaz packages manager. You can also copy it to
|
pankso@535
|
401 your home folder if you want to customize it. See the official
|
pankso@535
|
402 <a href="http://joewing.net/projects/jwm/config.shtml">configuration documentation</a>
|
pankso@535
|
403 for comprehensive documentation on configuring JWM.
|
pankso@535
|
404 </p>
|
pankso@535
|
405
|
pankso@535
|
406 <h3>Icon bar & panel</h3>
|
pankso@535
|
407 <p>
|
pankso@535
|
408 To have a transparent icon bar with the applications of your choice,
|
pankso@535
|
409 you can use Wbar2. Install it and test it:
|
pankso@535
|
410 </p>
|
pankso@535
|
411 <pre>
|
pankso@535
|
412 $ sudo spk-add wbar2
|
pankso@535
|
413 $ wbar
|
pankso@535
|
414 </pre>
|
pankso@535
|
415 <p>
|
pankso@535
|
416 To have a desktop panel with Openbox you can use Tint2. Install it
|
pankso@535
|
417 and test it:
|
pankso@535
|
418 </p>
|
pankso@535
|
419 <pre>
|
pankso@535
|
420 $ sudo spk-add tint2
|
pankso@535
|
421 $ tint2
|
pankso@535
|
422 </pre>
|
pankso@535
|
423
|
pankso@535
|
424 <h2 id="gpio">GPIO Pins & I2C Bus</h2>
|
pankso@535
|
425
|
pankso@535
|
426 <p>
|
paul@540
|
427 SliTaz provides all the necessary tools to work with the Raspberry Pi
|
paul@540
|
428 GPIO pins and I2C bus. The CGI/Web admin interface lets you control
|
paul@540
|
429 the GPIO pins and get I2C information. Pi I2C kernel module is
|
paul@540
|
430 blacklisted by default and can be loaded manually, by on-demand scripts
|
pankso@535
|
431 or at boot by commenting the blacklist line in:
|
pankso@535
|
432 </p>
|
pankso@535
|
433 <pre class="box-up">
|
pankso@535
|
434 /etc/modprobe.d/rpi-blacklist.conf
|
pankso@535
|
435 </pre>
|
pankso@535
|
436
|
pankso@547
|
437 <p>
|
pankso@547
|
438 To have a full working I2C bus system we must also load the 'i2c-dev'
|
paul@552
|
439 kernel module which is not autoloaded by udev. In this case we must
|
paul@552
|
440 use a SliTaz boot time configuration file, lets edit the config file
|
paul@552
|
441 to modify the line LOAD_MODULES to look like below:
|
pankso@547
|
442 </p>
|
pankso@547
|
443
|
pankso@547
|
444 <pre>
|
pankso@547
|
445 $ editor /etc/rcS.conf
|
pankso@547
|
446 # Kernel modules to load earlier in boot.
|
pankso@547
|
447 LOAD_MODULES="snd-bcm2835 i2c-dev"
|
pankso@547
|
448 </pre>
|
pankso@547
|
449
|
pankso@553
|
450 <h2 id="pileds">Using leds with the RPi</h2>
|
pankso@553
|
451
|
pankso@553
|
452 <p>
|
pankso@553
|
453 Leds can be used for many purposes such as for a notification or as a light show.
|
pankso@553
|
454 SliTaz Raspberry Pi provides a built-in utility to help set up and
|
pankso@553
|
455 use leds. The RPi has an onboard green led (ACT) that you can
|
pankso@553
|
456 turn on or off:
|
pankso@553
|
457 </p>
|
pankso@553
|
458 <pre>
|
pankso@553
|
459 # pileds act
|
pankso@553
|
460 </pre>
|
pankso@553
|
461
|
pankso@553
|
462 <p>
|
pankso@553
|
463 Pileds also provides examples and usable commands for Adafruit 7segment
|
pankso@553
|
464 LED Backpack and the 8x8 LED Matrix. Creating visual elements with
|
pankso@553
|
465 Kids is fun and lets them learn mathematics at the same time, since
|
pankso@553
|
466 the leds must be mapped (ie: 0, 3) on a grid. Let's display a nice
|
pankso@553
|
467 little boat and pileds built in help:
|
pankso@553
|
468 </p>
|
pankso@553
|
469
|
pankso@553
|
470 <pre>
|
pankso@553
|
471 # pileds 8x8 --boat
|
pankso@553
|
472 # pileds help
|
pankso@553
|
473 </pre>
|
pankso@553
|
474
|
pankso@553
|
475 <p>
|
pankso@553
|
476 PiLeds uses some example code from Adafruit and PiClass Git Hub
|
pankso@553
|
477 repositories. We have packaged them for easy install/updates and
|
pankso@553
|
478 to provide some code right under the hood. Adafruit and PiClass
|
pankso@553
|
479 code examples are located in:
|
pankso@553
|
480 </p>
|
pankso@553
|
481
|
pankso@553
|
482 <pre class="box-up">
|
pankso@553
|
483 /usr/share/adafruit
|
pankso@553
|
484 /usr/share/piclass
|
pankso@553
|
485 </pre>
|
pankso@553
|
486
|
pankso@555
|
487 <!-- Camera -->
|
pankso@535
|
488 <h2 id="picam">Pi Camera - Pi NoIR</h2>
|
pankso@535
|
489
|
pankso@535
|
490 <p>
|
paul@540
|
491 Raspberry Pi onboard camera works flawlessly with SliTaz. You can
|
pankso@535
|
492 setup then shot, record and stream video with our easy to use and
|
paul@540
|
493 home made tools and the official VideoCore Tools from The Raspberry Pi
|
pankso@535
|
494 foundation. Official documentation can be found on elinux.org wiki:
|
pankso@535
|
495 <a href="http://elinux.org/Rpi_Camera_Module">Rpi Camera Module</a>
|
pankso@535
|
496 </p>
|
pankso@535
|
497
|
pankso@535
|
498 <p>
|
pankso@535
|
499 To setup your camera from your Pi device, you can run TazBerry from
|
paul@540
|
500 the desktop menu or directly start the cam setup from a cmdline:
|
pankso@535
|
501 </p>
|
pankso@535
|
502 <pre>
|
pankso@535
|
503 # tazberry cam-setup
|
pankso@535
|
504 </pre>
|
pankso@535
|
505
|
pankso@535
|
506 <p>
|
pankso@557
|
507 After reboot you can test the camera with <b>raspivid</b> and take a
|
pankso@557
|
508 picture via the CGI/Web Camera plugin. To test the camera:
|
pankso@535
|
509 </p>
|
pankso@535
|
510 <pre>
|
pankso@557
|
511 $ su -
|
pankso@535
|
512 # raspivid -d
|
pankso@535
|
513 </pre>
|
pankso@535
|
514
|
pankso@557
|
515 <h3>Pictures with Raspistill</h3>
|
pankso@557
|
516
|
pankso@557
|
517 <p>
|
pankso@557
|
518 The official tool to take pictures with the camera board is
|
pankso@557
|
519 <b>raspistill</b>. The following command will take a picture
|
pankso@557
|
520 and create the PNG image shot.png:
|
pankso@557
|
521 </p>
|
pankso@557
|
522 <pre>
|
pankso@557
|
523 # raspistill -o shot.png
|
pankso@557
|
524 </pre>
|
pankso@557
|
525
|
pankso@555
|
526 <!-- PiGlow -->
|
pankso@535
|
527 <h2 id="piglow">PiGlow from Pimorini</h2>
|
pankso@535
|
528
|
pankso@535
|
529 <p>
|
pankso@535
|
530 PiGlow is a fun and cheap little board to learn and play with leds. It
|
paul@543
|
531 can do very nice effects and also supports easy on/off switches and brightness
|
paul@540
|
532 settings. Plug in your PiGlow board, boot your Raspberry Pi, install the Python
|
paul@543
|
533 PyGlow examples and utilities testsuite:
|
pankso@535
|
534 </p>
|
pankso@535
|
535
|
pankso@535
|
536 <pre>
|
pankso@535
|
537 # spk-add python-rpi-pyglow
|
pankso@535
|
538 # pyglow test
|
pankso@535
|
539 # pyglow help
|
pankso@535
|
540 </pre>
|
pankso@535
|
541
|
pankso@547
|
542 <p>
|
paul@552
|
543 In the package database you will also find <b>wiringpi-piglow</b>
|
pankso@547
|
544 providing the 'piglow' utility. On the Python side, we provide some
|
pankso@547
|
545 examples that you can use to learn and code your own scripts. Have
|
paul@552
|
546 a look in the folder:
|
pankso@547
|
547 </p>
|
pankso@547
|
548
|
pankso@547
|
549 <pre class="box-up">
|
pankso@547
|
550 /usr/share/pyglow
|
pankso@547
|
551 </pre>
|
pankso@547
|
552
|
pankso@555
|
553 <!-- PiFace -->
|
pankso@553
|
554 <h2 id="piface">PiFace Digital</h2>
|
pankso@549
|
555
|
pankso@549
|
556 <p>
|
pankso@553
|
557 The PiFace Digital board allows you to connect things like switches,
|
paul@554
|
558 lights and motors so that your Raspberry Pi can become aware of, and
|
pankso@558
|
559 influence the world around it. Plug in your PiFace board then use
|
paul@559
|
560 SliTaz <b>piface</b> utility to install the official C library,
|
pankso@558
|
561 the 'pifacedigital' utility and set of tiny tools:
|
pankso@549
|
562 </p>
|
pankso@553
|
563
|
pankso@549
|
564 <pre>
|
pankso@558
|
565 # piface help
|
pankso@549
|
566 </pre>
|
pankso@549
|
567
|
pankso@549
|
568 <p>
|
pankso@553
|
569 To test your Piface Digital board on SliTaz Raspberry Pi you simply
|
pankso@553
|
570 have to run the testsuite from the cmdline. The tool will test GPIO
|
paul@554
|
571 pins, leds and input buttons:
|
pankso@549
|
572 </p>
|
pankso@549
|
573
|
pankso@549
|
574 <pre>
|
pankso@558
|
575 # piface testsuite
|
pankso@549
|
576 </pre>
|
pankso@549
|
577
|
pankso@558
|
578 <h3>PiFace Metronome</h3>
|
pankso@558
|
579
|
pankso@549
|
580 <p>
|
paul@559
|
581 The Piface Slitaz utility uses WiringPi to provide a simple metronome
|
paul@559
|
582 using PiFace relays. The default is 80 beats per minutes but you can
|
paul@559
|
583 specify any beats in a range of 40 to 200. To turn on and off the
|
pankso@558
|
584 metronome:
|
pankso@549
|
585 </p>
|
pankso@549
|
586
|
pankso@558
|
587 <pre>
|
pankso@558
|
588 # piface metronome 120
|
pankso@558
|
589 # piface metronome
|
pankso@558
|
590 </pre>
|
pankso@558
|
591
|
pankso@558
|
592 <h3>Piface Reaction game</h3>
|
pankso@558
|
593
|
pankso@558
|
594 <p>
|
paul@559
|
595 Let's play a reaction game with PiFace Digital. Run the command
|
paul@559
|
596 below then press a button and wait until 2 LEDs are on and press
|
paul@559
|
597 the corresponding button as fast as you can:
|
pankso@558
|
598 </p>
|
pankso@558
|
599
|
pankso@558
|
600 <pre>
|
pankso@558
|
601 # piface reaction
|
pankso@558
|
602 </pre>
|
pankso@558
|
603
|
pankso@558
|
604 <h3>Piface Digital info</h3>
|
pankso@558
|
605
|
pankso@558
|
606 <pre>
|
pankso@558
|
607 Kernel modules : i2c_bcm2708 i2c-dev
|
pankso@558
|
608 SliTaz packages : libpifacedigital wiringpi-piface
|
pankso@558
|
609 Official website : <a href="http://www.piface.org.uk/">www.piface.org.uk</a>
|
pankso@558
|
610 Official guides : <a href="http://www.piface.org.uk/guides/">www.piface.org.uk/guides</a>
|
pankso@558
|
611 </pre>
|
pankso@558
|
612
|
pankso@555
|
613 <!-- RaspiComm -->
|
pankso@555
|
614 <h2 id="raspicomm">RaspiComm</h2>
|
pankso@555
|
615
|
pankso@555
|
616 <p>
|
paul@556
|
617 RaspiComm is a pluggable board which uses advanced features like a 5-way
|
paul@556
|
618 joystick, two serial ports (RS-232 and RS-485), l2c output and a
|
paul@556
|
619 realtime clock. The board lets you directly control a display, a stepper
|
paul@556
|
620 motor controller, relays and more.
|
pankso@555
|
621 </p>
|
pankso@555
|
622
|
pankso@555
|
623 <p>
|
pankso@555
|
624 SliTaz Raspberry Pi provides a built-in tool to let you use and test
|
pankso@555
|
625 the RaspiComm board out-of-the-box. Shutdown down your Pi if needed,
|
paul@556
|
626 plug in the board on to the GPIO pins and boot the system, then run the
|
pankso@555
|
627 testsuite:
|
pankso@555
|
628 </p>
|
pankso@555
|
629
|
pankso@555
|
630 <pre>
|
pankso@555
|
631 # raspicomm init
|
pankso@555
|
632 # raspicomm testsuite
|
pankso@555
|
633 </pre>
|
pankso@555
|
634
|
pankso@555
|
635 <p>
|
pankso@555
|
636 The testsuite will prompt you to move the Joystick left and top
|
paul@556
|
637 after the LED tests. To initialize the board on each boot, setup
|
paul@556
|
638 the system clock and automatically load the i2c kernel modules, you
|
pankso@555
|
639 need to edit the <b>local.sh</b> boot script and add a line to start
|
paul@556
|
640 'raspicomm init'. This can be done in one command or by using a text
|
pankso@555
|
641 editor:
|
pankso@555
|
642 </p>
|
pankso@555
|
643
|
pankso@555
|
644 <pre>
|
pankso@555
|
645 # echo 'raspicomm init' >> /etc/init.d/local.sh
|
pankso@555
|
646 </pre>
|
pankso@555
|
647
|
pankso@555
|
648 <p>
|
paul@556
|
649 The Real Time Clock uses the i2c bus. When the clock is initialized you
|
pankso@555
|
650 can find information in: /sys/class/i2c-adapter/i2c-1/1-0068. On the
|
pankso@555
|
651 first setup you need to sync the system clock from the web and then
|
pankso@555
|
652 set the RTC from the system clock. On next reboot the system clock
|
paul@556
|
653 will be sync'd with the Real Time Clock:
|
pankso@555
|
654 </p>
|
pankso@555
|
655
|
pankso@555
|
656 <pre>
|
pankso@555
|
657 # rdate -s tick.greyware.com
|
pankso@555
|
658 # hwclock --systohc
|
pankso@555
|
659 </pre>
|
pankso@555
|
660
|
pankso@555
|
661 <p>
|
paul@556
|
662 Here is a small SHell example to turn on/off LED1. The led uses the
|
pankso@555
|
663 gpio pin number 18. The raspicomm utility already exported the
|
paul@556
|
664 LED pins so we just have to set the value: 1 to turn it on and 0
|
pankso@555
|
665 to switch it off:
|
pankso@555
|
666 </p>
|
pankso@555
|
667
|
pankso@555
|
668 <pre>
|
pankso@555
|
669 # echo 1 > /sys/class/gpio/gpio18/value
|
pankso@555
|
670 # echo 0 > /sys/class/gpio/gpio18/value
|
pankso@555
|
671 </pre>
|
pankso@555
|
672
|
pankso@555
|
673 <p>
|
pankso@555
|
674 Official RaspiComm:
|
pankso@555
|
675 <a href="http://amescon.com/media/5277/Raspicomm_User_Manual.pdf">PDF User Manual</a>
|
pankso@555
|
676 </p>
|
pankso@555
|
677
|
pankso@535
|
678 <!-- Close content -->
|
pankso@535
|
679 </div>
|
pankso@535
|
680
|
pankso@535
|
681 <div id="footer">
|
pankso@535
|
682 © 2014 - <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a>
|
pankso@535
|
683 </div>
|
pankso@535
|
684
|
pankso@535
|
685 </body>
|
pankso@535
|
686 </html>
|