Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion PocketNC.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ POSITION_FEEDBACK = COMMANDED
MAX_FEED_OVERRIDE = 3

# Prefix to be used
PROGRAM_PREFIX = ~/linuxcnc/nc_files/
#PROGRAM_PREFIX = ~/linuxcnc/nc_files/
PROGRAM_PREFIX = /mnt/usbdrive/

# Introductory graphic
#INTRO_GRAPHIC = linuxcnc.gif
Expand Down
24 changes: 1 addition & 23 deletions README
Original file line number Diff line number Diff line change
@@ -1,23 +1 @@

This configuration drives a standard 4-axis 3D printer using the PRU for
high speed step/dir pulse generation and a BeBoPr driver board. The
BeBoPr configuration is for the original version of the BeBoPr board and a BeagleBoneWhite and
requires you disable HDMI.

The BeBoPr-Bridge configuration is for use with the new bridge board
that shuffles pins around so you can leave HDMI enabled.

There are currently no limit switches configured, so adjust the MIN_LIMIT
and MAX_LIMIT axis settings in the ini file if your printer has less than
200 mm of X/Y travel.

Current X and Y settings are appropriate for a typical "MendelMax" style
printer, with the following settings:

max vel = 200 mm/s
max accel = 3000 mm/s/s
scale = 80 steps/mm

Adjust as required for your machine. Make scale negative to invert any
axis that is moving 'backwards'.

Testing 123
Empty file modified dtc.sh
100644 → 100755
Empty file.
89 changes: 87 additions & 2 deletions install
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/bash

echo "To start LinuxCNC preconfigured for PocketNC, simply type:"
echo " PocketNC"
if (( $EUID != 0 )); then
echo "Try sudo ./install"
exit
fi

clear

echo '#!/bin/bash' > /usr/bin/PocketNC
echo "linuxcnc $PWD/PocketNC.ini" >> /usr/bin/PocketNC
chown 750 /usr/bin/PocketNC
Expand All @@ -11,3 +15,84 @@ chmod +x /usr/bin/PocketNC
chmod +x dtc.sh
./dtc.sh

declare mountdir=/mnt/usbdrive

read -p "Would you like to enable windows drag&drop file uploading? (y/n)" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
#Test for inet access to repository.
wget -q --spider http://repos.rcn-ee.net
if [ $? -gt 0 ]; then
#Not online. Try to connect.
echo "Your BBB may need to gather some additional files from the internet."
read -p "Would you like to use the ethernet jack to download them?(y/n)" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Getting IP address..."
dhclient eth0
else
echo "Skipping internet connection."
fi
fi
#check if mount directory exists.
if [ -d $mountdir ]; then
#Check for for existing mount point.
echo "Found existing mount point."
else
echo "Creating mount point to access USB storage."
mkdir -p /mnt/usbdrive
fi

#Now that the mount point is setup, add it to /etc/fstab for auto-mount at boot.
if ! grep -Fq "$mountdir" /etc/fstab
if ! mount | grep -q /mnt/usbdrive;then
mount /dev/sda1 /mnt/usbdrive > /dev/null
fi
then
#Found an existing entry.
echo "Existing mount point entry found in /etc/fstab"
echo " If you are just re-installing PocketNC settings dont worry about it."
echo " Otherwise you will need edit the file by hand to mount"
echo " your storage device to /mnt/usbdrive"
else
echo "Adding auto-mount entry to /etc/fstab"
echo "/dev/sda1 /mnt/usbdrive autofs rw,users,exec,nofail" >> /etc/fstab
fi

#Check for samba, and if needed, install it.
if ! which smbstatus > /dev/null; then
wget -q --spider http://repos.rcn-ee.net
if [ $? -gt 0 ]; then
echo "Samba server not found, unable to continue without downloading it."
exit 1;
else
echo "Updating package lists."
apt-get update
echo "Installing Samba server."
apt-get install samba
#wait for samba server to init.
echo "waiting 10sec for samba to setup..."
sleep 10
fi
if grep -Fxq "[PocketNC]" /etc/samba/smb.conf
then
echo "PocketNC networking share previously setup, skipped."
else
echo "Creating PocketNC network share."
echo "[PocketNC]" >> /etc/samba/smb.conf
echo "comment = PocketNC G-Code Files" >> /etc/samba/smb.conf
echo "path = /mnt/usbdrive" >> /etc/samba/smb.conf
echo "browseable = yes" >> /etc/samba/smb.conf
echo "writeable = yes" >> /etc/samba/smb.conf
echo "guest ok = yes" >> /etc/samba/smb.conf
echo "read only = no" >> /etc/samba/smb.conf
fi
fi
echo "Network file sharing (aka Drive-mapping) should now be available to any"
echo " computers the BBB is networked with."
else
echo "Sharing skipped."
fi

echo "To start LinuxCNC preconfigured for PocketNC, simply type:"
echo " PocketNC"