Skip to content

Commit f8231f8

Browse files
committed
Merge branch 'master' of https://github.com/Blinkinlabs/LEDscape
2 parents 181a30d + 3c713af commit f8231f8

File tree

4 files changed

+60
-11
lines changed

4 files changed

+60
-11
lines changed

Setup.md

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,47 @@ This is a quick introduction on how to set up LEDscape on a Debian-based image
44

55
# Setting up the BBB environment
66

7-
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:
7+
To develop for LEDscape on a Debian environment, Start by copying the latest BBB image to an SD card. These instructions were made using:
8+
9+
BBB-eMMC-flasher-ubuntu-14.04.2-console-armhf-2015-05-08-2gb.img
10+
11+
The latest version can be found at:
812

913
http://elinux.org/BeagleBoardDebian#Demo_Image
1014

1115
First, we need to expand the image to use the whole SD card. By default, it is only 2GB.
1216

17+
Note: If using a RevC or lower BBB, the EMMC is only 2GB so this isn't necessicary.
18+
1319
cd /opt/scripts/tools/
1420
sudo ./grow_partition.sh
1521
sudo reboot
1622

1723
Next, update the the Debian environment:
1824

1925
sudo apt-get update
26+
sudo apt-get upgrade
2027
sudo apt-get install usbmount
21-
sudo apt-get install git build-essential
28+
sudo apt-get install git build-essential vim
2229

2330
Disable the HDMI output:
2431

2532
If you are using a Debian image from 2014.8.13 or newer, do this:
2633

27-
sudo sed -i 's/#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN/cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN'/g /boot/uEnv.txt
34+
sudo cp /boot/uEnv.txt /boot/uEnv.txt.backup
35+
sudo sed -i 's/#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN/cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN/g' /boot/uEnv.txt
2836
sudo reboot
2937

30-
If you are using an older Debian image, do this:
31-
32-
sudo sed -i 's/#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN/cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN'/g /boot/uboot/uEnv.txt
33-
sudo reboot
38+
Note: This is messed up on recent versions of Debian, need to hand edit.
3439

3540
Otherwise, modify the uEnv boot file to disable HDMI and HDMIN overlays, then reboot.
3641

42+
Enable a larger shared memory space (8MB) with the PRU:
43+
44+
echo 'options uio_pruss extram_pool_sz=0x800000' | sudo tee -a /etc/modprobe.d/ledscape.conf
45+
46+
and reboot again.
47+
3748
# Next, set up LEDscape:
3849

3950
Use git to download the repository:
@@ -152,8 +163,34 @@ Extra: for video playback
152163
sudo systemctl enable videoplayer.service
153164

154165

155-
Video playback
156-
==============
166+
# Extra credit
167+
168+
## Make the filesystem read-only
169+
170+
To help prevent the configuration from breaking, it's helpful to configure the system as read only. Here are some instrucitons:
171+
172+
http://armsdr.blogspot.com/2014/11/beaglebone-debian-read-only-filesystem.html'
173+
174+
Later, write capability can be restored using the following command:
175+
176+
sudo mount -o remount,rw /
177+
178+
And disabled again using:
179+
180+
sudo mount -o remount,ro /
181+
182+
## Speed up boot when Ethernet is connected
183+
184+
dhclient somehow sits for a long time before letting the system finish booting. Try this:
185+
186+
sudo sudo sed -i 's/#timeout 10/timeout 0/g' /etc/dhcp/dhclient.conf
187+
188+
## Set the time automatically (when network is available)
189+
190+
sudo apt-get install ntpdate
191+
192+
193+
# Video playback
157194

158195
Playing a video is as simple as running the video player (after running the UDP listener):
159196

@@ -163,4 +200,13 @@ Note: These packages used to be required, but now are included in the default De
163200

164201
sudo apt-get install libavformat-dev x264 v4l-utils ffmpeg
165202
sudo apt-get install libcv2.3 libcvaux2.3 libhighgui2.3 python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-dev
203+
204+
205+
#Helpful things for development
166206

207+
## Make VIM prettier
208+
209+
Enable color highlighting
210+
211+
echo 'syntax on' >>~/.vimrc
212+

ledscape.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ws2812
2+
120,32

src/script/run-ledscape

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ then
1818
CONFIGFILE="$USBMOUNT/ledscape.config"
1919
fi
2020

21-
exec ./bin/matrix-test "$CONFIGFILE" >/dev/null
21+
#exec ./bin/matrix-test "$CONFIGFILE" >/dev/null
2222
#exec ./bin/matrix-udp-rx -m "Starting LEDscape" -c "$CONFIGFILE" >/dev/null
23+
exec ./bin/matrix-udp-rx -W 120 -H 32 -c "$CONFIGFILE" >/dev/null

src/script/run-videoplayer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ shopt -s extglob
2323
# Play the first video we find, on a loop.
2424
for video in "$USBMOUNT/"*+(.mp4|.MP4|.avi|.AVI)
2525
do
26-
exec ./video_player.py -l -w 112 "$video"
26+
exec ./videoplayer --screenGeometry 120x32 -w 120 -l "$video"
2727
break
2828
done

0 commit comments

Comments
 (0)