The software is configured with Ansible on the command line.
This project uses a Raspberry Pi as the 'target host'. In this project the target host controls the Neje Engraver. Raspbian Wheezey and Jessie were tested but had missing dependencies (ansible and qmake) and are not supported by this guide. Use Raspbian Stretch or better.
This projects uses Ansible to configure software. The 'control host' is the Linux machine were ansible commands are issued to configure the target Raspberry Pi host.
Use pip3 to install the same Ansible version found on the target machine. In this case the target host (the Raspberry Pi) had ansible version 126.96.36.199.
pip3 install --user 'ansible==188.8.131.52'
This project requires a JEE application server. Payara is a good fit and is setup by Ansible.
In this project, ansible uses SSH to communicate between the control and target hosts. If you don't have sshpass installed, then issue this command on the control machine:
sudo apt install sshpass
The configuration software for this project is hosted on github.com.
Issue the following
commands to download and change directory the project:
git clone https://github.com/onebeartoe/electronics.git
Before continuing, update IP address in the file 'hosts/raspberry-pis' to match the actual IP address of the target Raspberry Pi.
The commands in this section install application dependencies as well as the application itself. The commands in this section also require the password of pi user on the Raspberry Pi and the sudo password.
Unless these were explicitly changed, the password for pi user is 'raspberry'. If the default password was changed, then use that password when prompted for the commands in this section.
The following command takes a good while to finish the first time it is run, since it is downloading and installing a bunch of software to the target host's operating system.
$ ansible-playbook install.yml -i hosts/raspberry-pis -vvvv --ask-pass --ask-sudo-pass
While it does take several minutes to finish, no errors should occur when the above command executes.
Use ssh-copy-id to avoid entering credentials (and the "--ask-pass --ask-sudo-pass" parameters) every time.
Once ssh-copy-id is used on the target host, the command looks like this:
$ ansible-playbook install.yml -i hosts/raspberry-pis
Once this command completes, the core application software is installed.
This project also has optional camera features for the laser engraver. This has been tested with Play Station style Webcams, but the official Raspberry Pi Camera should also work.
To install the camera software, issue the following command.
$ ansible-playbook camera.yml -i hosts/raspberry-pis
This command installs motion and adds a cron reboot job to start motion each time the Raspberry Pi boots.
To start the NejeEngrave application issue this command:
$ ansible-playbook start-neje-engrave.yml -i hosts/raspberry-pis
After a bit of time, the application is available at this URL:
Change 'raspberrypi-host' in the above URL to the IP or hostname of the target Raspberry Pi.
Here is a screenshot of the NejePrint application:
Execute this command to stop the Web application:
$ ansible-playbook stop-neje-engrave.yml -i hosts/raspberry-pis
Basic usage of the laser engraver involves the following steps:
Other features include reset and pause buttons.