When you do not have a Robot Car, you would think there are plenty of things to do with it, like see what’s going on around the house without moving from your couch, scare your cat, annoy your significant other, etc. Well, when I finally got one, I did all that the first day, and then put it on a shelf.

The purpose of this article is to show how I replaced the C language server that controls the Robot Car hardware using Javascript (Node.js)

This article does not intend to be a product review but I have to give it to the guys at UCTRONICS. Their  Robot Car Kit for Raspberry PI is great for anyone interested in getting started with robotics. From the packaging, through the instructions, to the general quality of the materials, UCTRONICS does a great job. You would have as much fun putting it together as you will have using it, and it works the first time.

Back from the shelf…

I picked up my robot car, powered it up, ssh’d to the Raspberry PI, and start looking around. I found what they use to stream video, MJPEG streamer, and a WebSocket server.

With a little research, I found the C language code repository on Github and started reading it.

I have written code in C and C++ language for many years and what I found would have not survived a peer review. Lack of good structure, poor documentation, inconsistent coding style, commented out code,… it just looked like a first prototype, but it works.

It was then that I decided if I want to enhance, modify, or add features to the robot car, I was not going to do it using that codebase. So, I started from scratch.

#vuejs #raspberry-pi #nginx #nodejs

Raspberry PI Robot Car Controlled by Node.js
10.20 GEEK