GithubHelp home page GithubHelp logo

Pocket NC

This respository contains all the settings and software required to setup MachineKit on a BeagleBone Black for controlling the Pocket NC v2.

This document is in progress, it may not be complete or correct

Setup a BeagleBone Black for use in a Pocket NC v2

Flash BBB with latest MachineKit image

# with wget
wget https://rcn-ee.com/rootfs/bb.org/testing/2017-02-12/machinekit/bone-debian-8.7-machinekit-armhf-2017-02-12-4gb.img.xz

# with curl
curl -O https://rcn-ee.com/rootfs/bb.org/testing/2017-02-12/machinekit/bone-debian-8.7-machinekit-armhf-2017-02-12-4gb.img.xz

xzcat bone-debian-8.7-machinekit-armhf-2017-02-12-4gb.img.xz > bone-debian-8.7-machinekit-armhf-2017-02-12-4gb.img

# on linux /dev/sdX on Mac /dev/rdiskX (on Mac you can use diskutil list to find what X is, make sure you use diskutil unmountDisk /dev/diskX)
sudo dd bs=1m if=bone-debian-8.7-machinekit-armhf-2017-02-12-4gb.img of=/dev/<sdcard>

Insert the SD card into the BBB and power it on over USB. Connect to the BBB and enable the flasher script on boot. Then reboot to flash the image.

ssh [email protected]
sudo sed -i 's/^#cmdline=init=\/opt\/scripts\/tools\/eMMC\/init-eMMC-flasher-v3.sh$/cmdline=init=\/opt\/scripts\/tools\/eMMC\/init-eMMC-flasher-v3.sh/' /boot/uEnv.txt
sudo reboot

Set up pocketnc user

We're going to change the machinekit user name to pocketnc by creating a temporary user, giving it sudo privileges, changing the machinekit user to pocketnc using the temporary user, then deleting the temporary user.

# use username/password machinekit/machinekit
ssh [email protected] 
sudo adduser temporary
sudo adduser temporary sudo
exit

ssh [email protected]

# The next command will error if there are any processes running owned by the machinekit user. 
# It will list the process id. Run `sudo kill <process id>` for every process until the following command goes through.
sudo usermod -l pocketnc machinekit
sudo usermod -d /home/pocketnc -m pocketnc
exit

# password should still be machinekit
ssh [email protected]

# change password to pocketnc (or whatever you like)
passwd

# Setup no password for sudo
# on the last line change machinekit to pocketnc
# it should look like (no #):
# pocketnc ALL=NOPASSWD: ALL
sudo visudo

sudo deluser temporary
sudo rm -r /home/temporary
sudo ln -s /home/pocketnc /home/machinekit

Change boot message

sudo sh -c "cat <<EOF > /etc/issue.net
Debian GNU/Linux 8

Pocket NC Image (based on Machinekit Debian Image 2017-02-12)

Support/FAQ: http://www.pocketnc.com/faq

default username:password is [pocketnc:pocketnc]
EOF"

sudo cp /etc/issue.net /etc/issue

Update hostname

# Change hostname from beaglebone to pocketnc
sudo sed -i 's/beaglebone/pocketnc/g' /etc/hosts
sudo sed -i 's/beaglebone/pocketnc/g' /etc/hostname

Reboot (make sure ethernet is plugged in)

sudo reboot

Update apt-get

sudo apt-get update
sudo apt-get upgrade

Disable graphical boot

# disable lightdm (the windowing system)
sudo systemctl disable lightdm

Disable Apache

sudo systemctl disable apache2
sudo systemctl stop apache2

Install dependencies for Rockhopper

sudo pip install tornado==4.5.2
sudo apt-get install graphviz graphviz-dev # 2.38.0-7
sudo pip install pygraphviz --install-option="--include-path=/usr/include/graphviz/" --install-option="--library-path=/usr/lib/graphviz"
sudo pip install netifaces

Clone this repository including submodules and run init scripts

git clone --recursive https://github.com/PocketNC/pocketnc.git
cd pocketnc
sudo ./enableServices.sh
./postUpdate.sh

mkdir ~/ncfiles

sudo reboot

Penta Machine Co.'s Projects

Penta Machine Co. doesnโ€™t have any public repositories yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.