Electronics - Lasershark - Usage (Friggin sharks with lasers)

Usage:

Compiling, Configuring, and Running OpenLase/JACK:
OpenLase is a library and suite of helper applications intended to aid in the development of real-time laser-based lightshows, interactive displays, games, etc. Communications between user applications, OpenLase utilities and Lasershark units (or soundcard) are performed via use of the JACK audio sound server.

I decided the best place to document this was on Hector Martin's OpenLase github wiki since the instructions are not unique to the Lasershark board. You can find these here



 

Adding UDEV Rules for the Lasershark USB DAC:
In order to use a Lasershark, you need to give users permission to access the USB device. This is accomplished by adding a new udev rule.

1.Open the following file...

sudo gedit /etc/udev/rules.d/45-lasershark.rules

Paste the following into it, then save it...
ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="04d8", MODE="0660", GROUP="plugdev"

Afterwards unplug the Lasershark USB DAC (if it happened to be plugged in already) and plug it back in.



 

Compiling and Using the lasershark_stdin and lasershark_stdin_circlemaker Host Applications:
The lasershark_stdin host application allows for a very simple means to control LaserShark hardware units via piped-in text commands. The commands and their format can be reviewed here: lasershark_stdin_input_example.txt

lasershark_stdin_circlemaker is a program which demonstrates how this command language can be used to display a circle.

These applications can be compiled and run as follows:

1. Install Lasershark Host application dependencies:

sudo apt-get install git gcc build-essential

2. Download the Lasershark Host applications and submodules:
cd ~/Desktop
git clone https://github.com/macpod/lasershark_hostapp.git cd lasershark_hostapp
git submodule init
git submodule update

3. Compile lasershark_stdin and lasershark_stdin_circlemaker:
cd lasershark_hostapp
make lasershark_stdin
make lasershark_stdin_circlemaker

4. Add the udev rule for the Lasershark USB DAC (See above)

5. Run the lasershark_stdin Host application:

To pipe output from one executable into the lasershark_stdin app (i.e. the lasershark_stdin_circlemaker executable), run the following:
./lasershark_stdin_circlemaker | ./lasershark_stdin

To pipe output from a text file out to the lasershark_stdin app, run the following:
cat [your command file] | ./lasershark_stdin



 

Compiling and Using the Lasershark Jack Host Application (for use with OpenLase):
The Lasershark Jack application receives data from OpenLase-based applications (sent through the JACK audio server system) and transmits this data to the Lasershark over USB for display. Compiling and running the application can be accomplished as follows:

1. Install Lasershark Host application dependencies:

sudo apt-get install git libusb-1.0-0-dev jackd2 libjack-jackd2-dev gcc build-essential

2. Download the Lasershark Host application:
cd ~/Desktop
git clone https://github.com/macpod/lasershark_hostapp.git

3. Compile it:
cd lasershark_hostapp
make

4. Add the udev rule for the Lasershark USB DAC (See above)

5. Run the Lasershark Host application:
./lasershark_jack



 

If you found this project interesting or helpful and have the means feel free to donate!

No comments have been provided.

echo "";

Name:

Comments:

securityy image