0

I want to be able to run a raspberry pi program without being connected to a desktop screen so the whole idea is to make an object tracking robot using raspberry pi and a camera.

This should be able to move freely without being connected desktop screen and the raspberry pi should be connected to a power bank please how do I go about it I have seen so many video about this project and I am inspired to make mine from scratch .

Please do watch this video to get a clear understanding of what I mean. I will really appreciate if anyone could give me an explanation on who to go about this thank you for your help in advance.

  • Hi @user3880651, Well, the website referred by your video show "some details" of the project. The point is that when you test the robot, you say something like "sudo python my_robot.py" and the robot is on its own. You can unplug the HDMI cable because at this point keyboard, mouse and HDMI mon is "logically" disconnected from the robot. What you can do now are: (1) Ask some expert to write an "Instructable" to DIY the whole project, (2) Ask 10 more more SEPARATE short question in this Q&A site, (3) Ask long question is "sensor/automation projects" section in other Rpi discussion forums. – tlfong01 Sep 30 at 1:36
  • No, I do not use additional sources to understand questions, tl;dr; What is your problem with starting a program automatically, maybe by script or by systemd? Have you tried it? – Ingo Sep 30 at 8:54
1

There are many solutions for this, but the normal way is to define a service for systemd.

Create a file /etc/systemd/system/my-service.service with this content:

[Unit]
Description=My Service

[Service]
ExecStart=/path/to/my-service

[Install]
WantedBy=multi-user.target

Then execute

systemctl enable my-service

You program should be executed the next time the PI boots.

Before you disconnect the screen you should start the program manually and verify that it does what it is supposed to do.

systemctl start my-service
1

Install and Configure a VNC and use a mobile or a laptop to control your Raspberry Pi.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.