From 593075afe483a4ef3818c1f8f6150b3300afddc5 Mon Sep 17 00:00:00 2001 From: Zhengyu Peng Date: Wed, 16 Feb 2022 21:41:39 -0500 Subject: [PATCH] update --- software/raspberry pi/hexapod.py | 2 +- software/raspberry pi/service/hexapod.service | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 software/raspberry pi/service/hexapod.service diff --git a/software/raspberry pi/hexapod.py b/software/raspberry pi/hexapod.py index e172d6a..81df08c 100644 --- a/software/raspberry pi/hexapod.py +++ b/software/raspberry pi/hexapod.py @@ -66,7 +66,7 @@ class Hexapod(Thread): # length units are in mm # time units are in ms - with open('./config.json', 'r') as read_file: + with open('/home/pi/hexapod/software/raspberry pi/config.json', 'r') as read_file: self.config = json.load(read_file) self.mount_x = np.array(self.config['legMountX']) diff --git a/software/raspberry pi/service/hexapod.service b/software/raspberry pi/service/hexapod.service new file mode 100644 index 0000000..01012d0 --- /dev/null +++ b/software/raspberry pi/service/hexapod.service @@ -0,0 +1,14 @@ +[Unit] +Description=Hexapod Service +After=multi-user.target +Conflicts=getty@tty1.service + +[Service] +Type=simple +User=pi +Group=pi +ExecStart=/usr/bin/python3 /home/pi/edenbridge/camera.py -c /home/pi/edenbridge/front_door.json +StandardInput=tty-force + +[Install] +WantedBy=multi-user.target \ No newline at end of file