Skip to content

Commit 22d8216

Browse files
committed
Document upstart startup script
1 parent 2c79a92 commit 22d8216

File tree

3 files changed

+36
-54
lines changed

3 files changed

+36
-54
lines changed

Setup.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
Getting Started
2-
===============
1+
# Getting Started
32

43
This is a quick introduction on how to set up LEDscape on a Debian-based image
54

6-
Setting up the BBB environment
7-
==============================
5+
# Setting up the BBB environment
86

97
To develop for LEDscape on a Debian environment, Start by copying the latest BBB image to an SD card. These instructions were made using version bone-debian-7.5-2014-05-14-2gb.img. The latest version can be found at:
108

@@ -30,8 +28,7 @@ Note: These packages used to be required, but now are included in the default im
3028

3129
sudo apt-get install git build-essential
3230

33-
Next, set up LEDscape:
34-
======================
31+
# Next, set up LEDscape:
3532

3633
Use git to download the repository:
3734

@@ -49,13 +46,11 @@ Then run the identification program to test if all is well:
4946

5047
sudo bin/identify
5148

52-
Make a configuration file for your screen
53-
=========================================
49+
# Make a configuration file for your screen
5450

5551
The configuration file is what tells LEDscape how to draw it's virtual screen onto your matrix tiles or LED strips. There are two basic formats:
5652

57-
Matrix screen
58-
-------------
53+
## Matrix screen
5954

6055
Let's look at a sample matrix configuration. Here's one for a small display consisting of 4 LED matricies, arranged in a square:
6156

@@ -82,8 +77,7 @@ The rotation is any one of the following values: N, U, L, R. 'N' and 'U' are use
8277
The Virtual screen offset is the top-left position in the LEDscape virtual screen that will be drawn to this matrix panel. Normally you will want to map sections of the screen into contigouos regions, so the top-left panel in your display should have a virtual screen offset of 0,0, then the panel to the right of that one should be offset by the width of the first panel, either 16,0 or 32,0, and so on.
8378

8479

85-
WS2812 strips
86-
-------------
80+
## WS2812 strips
8781

8882
Let's look at a sample WS2812 strip configuration. Here's one that can control a single strip output:
8983

@@ -98,16 +92,14 @@ The first line of the configuration file describes the type of matrix. Here are
9892

9993
TODO: What do the next numbers here mean?
10094

101-
Testing your configuration
102-
--------------------------
95+
## Testing your configuration
10396

10497
For matricies, there is a handy identification program to draw some text that identifies each panel. Run it to test your new configuration:
10598

10699
sudo bin/identify myconfig.config
107100

108101

109-
Set up the UDP listener to display incoming packets
110-
===================================================
102+
# Set up the UDP listener to display incoming packets
111103

112104
To run the matrix listener:
113105

@@ -130,23 +122,38 @@ There are a bunch of command line arguments, and the whole thing seems to be in
130122
| -m | Message to display at startup | |
131123

132124

133-
Run the UDP listener automatically at system boot
134-
=================================================
125+
# Run the UDP listener automatically at system boot
126+
127+
There's a handy script for starting LEDscape at boot. It should listen on the ethernet interface on port 9999 automatically.
128+
129+
## Ubuntu
130+
131+
Ubuntu appears to use upstart. Do this:
132+
133+
sudo cp ubuntu/ledscape.conf /etc/init
134+
sudo start ledscape
135+
136+
## Debian / Angstrom
137+
138+
Debian and Angstrom appear to be able to use systemd. Do this:
135139

136140
sudo cp bin/ledscape.service /etc/systemd/system
137141
sudo systemctl enable ledscape.service
138142

143+
Extra: for video playback
144+
139145
sudo cp bin/videoplayer.service /etc/systemd/system
140146
sudo systemctl enable videoplayer.service
141147

148+
142149
Video playback
143150
==============
144151

145152
Playing a video is as simple as running the video player (after running the UDP listener):
146153

147-
bin/video_player.py -s 256x32 -l ../Daft\ Punk\ -\ Around\ The\ World.avi
154+
bin/video_player -s 256x32 -l ../Daft\ Punk\ -\ Around\ The\ World.avi
148155

149-
Note: These packages used to be required, but now are included in the default image. You might need to install them if you're using a different Debian system.
156+
Note: These packages used to be required, but now are included in the default Debian image. You might need to install them if you're using a different system.
150157

151158
sudo apt-get install libavformat-dev x264 v4l-utils ffmpeg
152159
sudo apt-get install libcv2.3 libcvaux2.3 libhighgui2.3 python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-dev

debian/LEDscape

Lines changed: 0 additions & 34 deletions
This file was deleted.

ubuntu/ledscape.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# This task runs at boot to start the LEDscape service
3+
4+
description "start LEDscape udp-rx receiver"
5+
6+
start on startup
7+
8+
task
9+
exec /opt/LEDscape/bin/run-ledscape

0 commit comments

Comments
 (0)