top of page

#7: Robot Controls

4 dec 2019
2 minuten om te lezen

In this post I will tell you a bit more about programming the robot controls. First of all what do I want on the website of the controls, I want that the robot can go forward, backwards, left, right, ... But I want also visually see where I am walking, this means that I have to work with a Raspberry Camera; https://www.gotron.be/raspberry-pi-camera-v2-video-module.html I bought myself this one. Before I started with coding the website I tested the camera a bit. First I followed the starter tutorial from Raspberry self; https://projects.raspberrypi.org/en/projects/getting-started-with-picamera. Where I learned the commands for taking a picture, recording, ...



After this I wanted to integrate the video live feed in a HTML5 document, so that I knew how to work around this. I had found a solution online; https://randomnerdtutorials.com/video-streaming-with-raspberry-pi-camera/ , this shows us how to work the camera into the HTML code but in Python. Not quit what I want.



Then I finally found this one; https://www.youtube.com/watch?v=5QAHlZoPlgI, this guy tells us how to use the camera and how to simply integrate it in our HTML code. However what here is different then in my situation is that he does not connect the Raspberry Pi to the monitor, a keyboard and a mouse. He connects with his Rasp. trough his own computer by creating a SSH file in the SD cart of the Rasp. which is just an empty file. In my case I could skip al the SSH things and just go to my terminal on my Rasp. and then start the commands that he explains. He uses uv4l; https://www.linux-projects.org/uv4l/. This is a tool to make things like webRTC, ... work.



In this video you can see that the settings of the camera are not yet tuned, but after this video I did tune them, unfortunately I do not have a video of that.

Then making of the website could begin, so I thought. First I wanted to code directly on my Rasp. but quickly I came across some difficulties, like coding HTML on a Rasp. was not natural. I tried downloading Visual Studio Code on my Rasp. that did not work, I tried finding Leaf-pad I did not found it, then finally I found BlueFish, which is a text editor specially for HTML. But soon I found out that even thought I had found a text editor for HTML, it still was not easy to code HTML on Rasp. So I decided for now to just code on my Mac and later transport it to my Rasp.

Recente blogposts

Alles weergeven

Opmerkingen


bottom of page