<commit_before>1- DOWNLOAD THIS IMAGE: 

	https://debian.beagleboard.org/images/bone-debian-8.6-lxqt-4gb-armhf-2016-11-06-4gb.img.xz

2- FLASH on an SD CARD ( balenaetcher work well)

3- BOOT ON SD CARD BY PRESSING BBB S2 button

4- MODIFY uEnv.txt via ssh (you can use putty on ip beaglebone.local port 22)

	From beaglebone site for flashing
	Flashing eMMC
	Set up the standalone microSD image to automatically flash the eMMC on powerup:
	Login as debian (password = <PASSWORD>) and edit: /boot/uEnv.txt with nano (sudo nano /boot/uEnv.txt) or your preferred editor.

	In /boot/uEnv.txt:
	##enable BBB: eMMC Flasher:
	#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

	Change to: (basically uncomment this line)
	##enable BBB: eMMC Flasher:
	cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

	Optional, update Flasher Scripts:
	cd /opt/scripts/
	git pull
	
	Reboot the system, from the command line type:
	sudo reboot
	
	It will flash the eMMC on the next bootup. 
	(make sure to remove the microSD after flashing is complete, otherwise it'll just keep on re-flashing the eMMC)	

5- Reboot and reconnect via ssh

6- git clone http://github.com/doobie42/OpenPegasus

7- Execute install script 1:
	
	cd /home/debian/OpenPegasus/InstallScripts/
	bash install_script_1.sh
		Confirm prompts if needed

8- After reboot, execute install script 2

	cd /home/debian/OpenPegasus/InstallScripts/
	bash install_script_2.sh

9- Enjoy your NEW PegasusTouch with these commands:

	Run OpenPegasus (Right now there is no GUI, even though it is called GUI, I disabled it for the time being):
	
		bin/gui <calib file> - would bring up GUI when available
		bin/gui <calib file> z - debug tool for z axis
		bin/gui <calib file> zup  - moves the Z axis up about 2 cm
		bin/gui <calib file> galvo - galvo calibration (works OK, not perfect)
		bin/gui <calib file> zcal - z axis calibration (not implemented)
		bin/gui <calib file> <gcode file> - print gcode file

	Note: there are 3 profiles I setup for the laser, they control the delay beween enabling/disable the laser and moving the galvo.
	The slower will be more accurate, to change:
	
		cd mainapp/hardware
		rm profilegalvo.hp
		ln -s profiles/<profile>.hp profilegalvo.hp
		./compileLaser
		   default.hp - slowest
		   faster.hp  - medium
		   fastest.hp - fastest (might move laser too quickly, but will print faster)
		   
--------------------------------------------------------------------------------------------------
TROUBLE SHOOTING:

	prussdrv_open open failed
	gui: prussdrv_open failed<commit_msg>Added examples to the script install instructions<commit_after>1- DOWNLOAD THIS IMAGE: 

	https://debian.beagleboard.org/images/bone-debian-8.6-lxqt-4gb-armhf-2016-11-06-4gb.img.xz

2- FLASH on an SD CARD ( balenaetcher work well)

3- BOOT ON SD CARD BY PRESSING BBB S2 button

4- MODIFY uEnv.txt via ssh (you can use putty on ip beaglebone.local port 22)

	From beaglebone site for flashing
	Flashing eMMC
	Set up the standalone microSD image to automatically flash the eMMC on powerup:
	Login as debian (password = <PASSWORD>) and edit: /boot/uEnv.txt with nano (sudo nano /boot/uEnv.txt) or your preferred editor.

	In /boot/uEnv.txt:
	##enable BBB: eMMC Flasher:
	#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

	Change to: (basically uncomment this line)
	##enable BBB: eMMC Flasher:
	cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

	Optional, update Flasher Scripts:
	cd /opt/scripts/
	git pull
	
	Reboot the system, from the command line type:
	sudo reboot
	
	It will flash the eMMC on the next bootup. 
	(make sure to remove the microSD after flashing is complete, otherwise it'll just keep on re-flashing the eMMC)	

5- Reboot and reconnect via ssh

6- git clone http://github.com/doobie42/OpenPegasus

7- Execute install script 1:
	
	cd /home/debian/OpenPegasus/InstallScripts/
	bash install_script_1.sh
		Confirm prompts if needed

8- After reboot, execute install script 2

	cd /home/debian/OpenPegasus/InstallScripts/
	bash install_script_2.sh

9- Enjoy your NEW PegasusTouch with these commands:

	Run OpenPegasus commands from mainapp folder
	
		bin/gui <calib file> - would bring up GUI when available 
		bin/gui <calib file> z - debug tool for z axis
		bin/gui <calib file> zup  - moves the Z axis up about 2 cm
		bin/gui <calib file> galvo - galvo calibration (works OK, not perfect)
		bin/gui <calib file> zcal - z axis calibration (not implemented)
		bin/gui <calib file> <gcode file> - print gcode file
	
	NOTE: Right now there is no GUI.
	Even though it is called GUI, it is disabled for the time being

Examples:

	Change to mainapp directory:
		cd home/debian/OpenPegasus/mainapp
	
	Run Galvos Calibration:	
		bin/gui calib.txt galvo
			Q - quit
			N - next point
			P - previous point
			L - move laser left
			R - move laser right
			U - move laser up (back?)
			D - move laser down (front?)
			F - increase moving speed
			S - decrease moving speed
			' '- (space) see laser
			A - show all dots
			W - write calibration file (note this will override your file and format for the calib.txt file)
			
	Lift Z-axis ~2cm:
        	bin/gui calib.txt zup
	
	Z axis validation (this is mainly for development, not calibration:
     		bin/gui calib.txt z
		
	Print a file:
        	bin/gui calib.txt <gcode file>

	Note: there are 3 profiles setup for the laser, they control the delay beween enabling/disable the laser and moving the galvo.
	The slower will be more accurate, to change:
	
		cd mainapp/hardware
		rm profilegalvo.hp
		ln -s profiles/<profile>.hp profilegalvo.hp
		./compileLaser
		   default.hp - slowest
		   faster.hp  - medium
		   fastest.hp - fastest (might move laser too quickly, but will print faster)
		   
--------------------------------------------------------------------------------------------------
TROUBLE SHOOTING:

	prussdrv_open open failed
	gui: prussdrv_open failed
{'fraction_non_alphanumeric': 0.10462369220384746, 'fraction_numerical': 0.011643604454944313, 'mean_word_length': 2.9225678358702845, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2639344', 'n_tokens_mistral': 2114, 'n_tokens_neox': 1889, 'n_words': 745}