Skip to content

This repository is an honnest api who permit to transform any raspberry into a cnc controller.

License

Notifications You must be signed in to change notification settings

Wanderer-Guy/Vulcain-Motors-Controller

Repository files navigation

Vulcain Motors Controller

Setup of the raspberry pi

This project is made for Raspberry (Raspbian os). It work with I2C communication and Adafruit motorHat shield.

Node and NPM installation

To install the latest version of nodeJS and npm, you should update and upgrade your apt package to prevent any compatibility issues :

sudo apt update -y
sudo apt upgrade -y

After that you should determine your version of Node. This is linked with architecture of the boards. For example, for this project we work on RaspberryPi 3, that mean we use ARMv7 architecture. To know yours you can type this command into your terminal :

uname -m

Or refer to this table :

Board Name Architecture Version
Raspberry Pi 4B ARMv8
Raspberry Pi 3 / 3B+ ARMv7
Raspberry Pi 2B v1.2 ARMv7
Raspberry Pi 2B ARMv6
Raspberry Pi Zero /Zero W ARMv6

Now, you should download the version that corresponding to your architecture. For that, find the good version on the nodejs website.

On this website, you have all latest versions for all different achitectures, choose the good one and download it on the raspberry. For that, type something like this :

wget link

For example, for the raspberry pi 3, we type this :

wget https://nodejs.org/dist/v16.14.0/node-v16.14.0-linux-armv7l.tar.xz

Great ! Node archive is downloaded. You should uncompress it. For that, use the commande tar -xf archive.tar.gz.

And the last command is to copy the archive content into Raspbian. That you should just type this :

cd archive
sudo cp -R * /usr/local/

Now, if you type node -v and npm -v, you have the latest version of node and npm.

NOTICE : This part of tutorial is based on this existing tutorial who are very understandable.

Enable I2C and increase baudrate

Know the objective is to enable the I2C to permit communication between the Raspberry and the motor shield. For that, on the terminal you should type :

sudo raspi-config

An interface appear, and you can choose "3 Interface Options" > "P5 I2C" and enable it.

Great, you can reboot your Raspberry to take this new configuration in account.

Now we should increase the baudrate. We do this to have more informations sendable to the adafruit card. For that, type :

sudo nano /boot/config.txt

Find the line where there is this written : dtparam=i2c_arm=on, and replace it by : dtparam=i2c_arm=on,i2c_arm_baudrate=400000.

Save the file and reboot your Raspberry. It is finish for I2C.

Wiring the shield

About

This repository is an honnest api who permit to transform any raspberry into a cnc controller.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published