uutzinger / 2023_BME210

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BME210 2023

Competion Files

Mechanical Files

Software

Camera

  • PiCamera2 framework: piCamera.py this is camera only for the raspberry pi
  • MAC/PC framework: CV2Camera.py this is camera only for your notebook computer
  • Vision Pipeline: BallLocator.py and grip.py this is my hand tuned ball locator, it still needs more work

Robotic Arm

  • meArm, kinematics
  • JoyStick
  • Throw: throw.py
  • ZeroMQ Receiver/Sender: zmqServer.py zmqClient.py
  • Defense - Attack: not yet

Running python program automatically after booting

This assumes you have your python program in /homne/pi. This likely is not the case so you need to adjust the folder. Check with ls /home/pi/folderitmightbein...

The program myforeverpython.py is a blink LED program you can use to test the service. Pin 16 should be blinking.

cd /lib/systemd/system/
sudo nano my.service

The file should have the following content:

[Unit]
Description=Hello Ballers
After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/python /home/pi/2023/myforeverpython.py
Restart=on-abort

[Install]
WantedBy=multi-user.target

Update the file priviledges and make it executable and run it

sudo chmod 644 /lib/systemd/system/my.service
chmod +x /home/pi/myprogram.py
sudo systemctl daemon-reload
sudo systemctl enable my.service
sudo systemctl start my.service

And check it its running

sudo systemctl status my.service

You need to stop the service if you want to modify myprogram.py

sudo systemctl stop my.service

And you can restart it again

sudo systemctl start my.service

About


Languages

Language:Python 100.0%