Skip to content

Software

Andrew Lee edited this page Jan 8, 2018 · 15 revisions

Note, Prometheus has been thoroughly tested on Raspberry Pi 3B. Although there is no reason why it shouldn't work on other devices as well, I cannot guarantee it will work on your device if it is not Raspberry Pi 3B.

Pre-Requisites

You should start this step with a Raspberry Pi 3B with a fresh Raspbian installation that has internet access. I will not cover this step as there are numerous articles online that detail how this can be done. This is a good place to start.

Although not tested, I don't see any reason Raspbian Lite, DietPi, or any other distribution wouldn't work. However, if you are unsure, just stick to installing regular Raspbian on top of Raspberry Pi 3B as it will be much easier to troubleshoot using online resources as Raspbian is the most commonly installed OS on Raspberry Pi. The only scenario I can think in which these so called "lighter" OS's would come in handy is if you were using RPi Zero/RPi Zero W.

Install Prometheus Dependencies on the Raspberry Pi

First, you need VLC which Prometheus uses to play sound files.

sudo apt install vlc-nox

However, since you are using the command cvlc from rc.local, you will also need to enable root to be able to execute it (since by default, VLC does not allow the root use to start the app)

sudo apt install bless
sudo bless $(which cvlc)
sed -i 's/geteuid/getppid/' $(which cvlc)

Prometheus comes with an example sound file which it can play using VLC. You can change the sound by uploading a new sound file from the front-end UI.

NCS314 Nixie Clock

You might want to do this on your PC or Mac (as Arduino IDE requires Java which is an extra system dependency you might not want to install on the Pi

You first need to download Arduino IDE. Next, download and open the modified NCS314 Sketch located here.

Then you need to connect the Arduino board to the machine you downloaded the IDE and sketch to via USB connector. Then, change the board type to Uno in Tools > Board. Next, change the port and select the correct USB port in Tools > Port (if Arduino is correctly connected to your computer, it should show up here). Finally, click Upload (the right arrow located towards the top left side of the application) to compile and upload the sketch to the Arduino board.

After uploading the compiled sketch, you will need to connect the Arduino to the Raspberry Pi via USB so the Prometheus program can send the time and LED information to the clock.

*Note, my particular clock was hardware version 1.1. If you have a different model, or different make entirely, you will need to modify the source code to read in the time (and LED if you want) as bytes passed through the Serial USB interface by the Raspberry Pi. If you need pointers on what I modified, compare my custom sketch to the original NCS314 sketch for hardware version 1.1.

Sound

If you are using the default TRS output on the Raspberry Pi to play sound (which I highly discourage), you can skip this portion completely.

To get good to excellent sound, you will need to output the sound through a external sound card (instead of built int TRS, or a USB sound card).

You need to set up ~/.asoundrc to read your card.

For USB, it might look like the following.

vi ~/.asoundrc

pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw
    card 1
}

For a custom sound card, it might look like the following:

pcm.!default {
	type hw card 0
}
ctl.!default {
	type hw card 0
}

Please consult the documentation provided by the manufacturer of your sound card in order to get a better idea on what you need to do.

The Prometheus program allows for either option of no sound card, or custom sound card. If you are using a custom sound card (other than HifiBerry Digi+ Pro), you will not be able to do the Easy Installation method outlined next (as you will probably need to go into the source code and modify the cvlc call commands to play via a different sound interface. However, since Prometheus will by default stick to using the standard cvlc call (unless changed in the web UI), if you are using the default TRS output, you can just use the Easy Installation method.

Install Prometheus

There are two ways of installing Prometheus: The Easy Way and The Hard Way.

Pick your poison.