![Freenove Raspberry Pi 2 Model B Manual Download Page 96](http://html.mh-extra.com/html/freenove/raspberry-pi-2-model-b/raspberry-pi-2-model-b_manual_2330437096.webp)
Need support?
94
Chapter 4 Robot Dog
www.freenove.com
█
If you don’t like t
he interface, you can also enter the commands to open the server. It is more convenient.
1.
Use cd command to enter directory where main.py is located:
cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
2.
Run main.py:
sudo python main.py -t -n
or Run main,py with following command:
sudo python main.py -tn
“
-t
”
means open TCP communication. “
-
n“ means don’t show interface.
Sever Auto Start
1
Open the terminal and execute the following two commands respectively to create a
“
start.sh
” file.
cd ~
sudo touch start.sh
2
Open
“
start.sh
”
.
sudo nano start.sh
3
A
dd the following contents to “
start.sh
”
file.
#!/bin/sh
cd "/home/pi/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server"
pwd
sleep 10
sudo cp point.txt /home/pi
sudo python main.py
Press Ctrl + O and then press Enter to save it. Press Ctrl+X to exit.
4
Modify permissions.
sudo chmod 777 start.sh
Summary of Contents for Raspberry Pi 2 Model B
Page 35: ...Need support support freenove com 33 Chapter 0 Raspberry Pi Preparation www freenove com ...
Page 71: ...Need support support freenove com 69 Chapter 2 Assemble Robot www freenove com M3 Nut M3x12 ...
Page 98: ...Need support support freenove com 96 Chapter 4 Robot Dog www freenove com ...