sudo su
curl -sL https://deb.nodesource.com/setup_11.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install nodejs -y
sudo apt-get install build-essential -y
sudo apt-get install fswebcam -y
sudo apt-get upgrade -y
npm install -g config
npm install -g node-gyp
sudo su
npm i -g npm-check-updates
npm-check-updates -u
npm install --unsafe-perm
npm install serialport --unsafe-perm
npm install config --unsafe-perm
npm install express --unsafe-perm
npm install node-webcam --unsafe-perm
npm install request-ip --unsafe-perm
npm install wifi-location --unsafe-perm
cd Vikings_API
node Vikings_API.js
sudo killall -9 node
Edit this file: ' /etc/apache2/apache2.conf ' and restart Apache2
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
Header set Access-Control-Allow-Origin *
</Directory>
sudo /etc/init.d/apache2 restart
sudo a2enmod headers
Coming Soon |
---|
Coming Soon |
---|
Parameter | Description |
---|---|
Port |
/dev/video0,video1,video2... |
Command | Description |
---|---|
Port |
/dev/tty0,tty1,ttyUSB0... |
Baudrate |
250000(MKS GEN) |
GcodeUrl |
G1 X25 F3000....(Gcode) |
# System :
1.ASP(window server)
2.PHP(ubuntu)
# Example:
http://your.webUrl:3000/?API_type=Camera&System=PHP&Port=/dev/video1
http://your.webUrl:3000/?API_type=Serialport&System=PHP&Port=&GcodeUrl=M17&baudrate=250000
# if you want to open control panel:
http://your.webUrl:3000/?API_type=Serialport&System=PHP