Laser-Writer
./start_ol_services
This will start all of the openlase and jack utilities (output control, jack, simulator, lasershark_jack) Note: You might need to click the patchbay button in JACK and activate all the connections (see the jack tutorial for setting up the connections)source venv/bin/activate
If you wish to deactivate venv when you are done, type deactivate
python main.py
This program will demo two features. Firstly it will randomly select tweets from CNN and display them for 10 seconds. Once you hit ctrl-c
it will allow the user to type a message directly into the terminal. Hit ctrl-c
again to exit... image:: Laser_output_configuration.png
This has been tested on Ubuntu 16.04, python 2.7.10 There are numerous dependencies, each topic covers its own dependencies
Venv
++++
| 1. You will need to install venv pip install virtualenv --user
or sudo apt-get install python-virtualenv
| 2. Then activate venv before working on the project source venv/bin/activate
| Note: Venv makes managing the python dependancies much easier. Flask offers a good explanation of venv here: http://flask.pocoo.org/docs/0.11/installation/
Twitter +++++++ If you need to setup your own Twitter API tokens, follow the instructions here: http://socialmedia-class.org/twittertutorial.html If the twtter librars is not recognized you can reinstall it with the following:
cd twitter_functions/twitter-1.17.1/
python setup.py build
python setup.py install
pip freeze | grep twitter
Openlase ++++++++ | Follow the instructions here: https://github.com/marcan/openlase/wiki/Installation | Note: This for reference only because I should be including all the compiled files in the project.
qjackctl ++++++++
sudo apt-get -y install qjackctl
Dual_Lasershark_0.xml
More instructions here: https://github.com/marcan/openlase/wiki/JACK_and_Openlase_Configuration
| The documentation managed through sphinx.
| The documentation is hosted with github pages.
| The documentations is available here <https://rekon.xyz/Laser-Writer/>
_
To update/push documentation changes: +++++++++++++++++++++++++++++++++++++
make html
(make sure you have activated venv
)git add .
git commit -m "this is an example commit"
git subtree push --prefix docs/_build/html origin gh-pages
Note: an alias can be made in your gitconfig file if you are lazy| Note: This is largely obselete because the lasershark libraries have been replaced with the openlase libraries.
| r=1000 # THIS MUST BE THE FIRST LINE IN THE FILE!
The "r=number" command sets the speed in points per second (pps) at which samples are displayed by the Lasershark.
The pps speed can be set to any integer between 1 and the maximum value as reported by the Lasershark (64000)
You should not set this value to be greater than what your galvos are capable of operating at.
Failure to adhere to this guidance can result in galvo damage or decreased lifespan.
| e=1
The "e=" command sets the output enable state of the Lasershark. The output enable status must be set for any
laser or galvo control to occur. Note: e=1 #enable
and e=0 #disable
| p=""
Prints a text string to the console
| s=1,1,1,1,1,1
The "s=" command adds a sample to the sample buffer to be written out to the Lasershark.
A sample defines galvo positioning and laser intensity for a particular point to be displayed.
The format is "s=X,Y,A,B,C,INTL_A"
The ranges for these fields are X=[0-4095],Y=[0-4095],A=[0-4095],B=[0-4095],C=[0,1],INTL_A=[0,1]
For A and B (analog laser control outputs), 0 means the output is off and 4096 means the output is at full power
1024 would indicate 25% output power, 2048 would indicate 50% output power, etc.
For C (TTL laser control output) 0 means the output is off and 1 means the output is on
For INTL_A (Interlock A) 0 means the output is off and 1 means the output is on (for ttl)
Samples are queued until they fill a full lasershark packet and are then written out to the lasershark.
This means that to ensure ALL samples are written out, a flush should be performed once all desired samples are
written out.
| f=1
Flushes all samples. It is reccomended to stick this at the end of your output file to ensure all samples are displayed.