Go Down

Topic: mini steampunk RC/WIFI 3D printed car [Update: now FPV w ESP32 CAM] (Read 1 time) previous topic - next topic

checkmatearts

That photo I posted a few posts back with the RC transmitter has my ESP32 CAM prototype circuit in the foreground. That circuit has esp32 cam connected to the lights, sound and motors that my car uses.

This picture shows the interface running on my phone with the prototype test circuit (rubber frog held above the camera)...



This is a link to that other guys video I mentioned ...


https://www.youtube.com/user/v12345vtm


if you look there I think you will find he posted his code. There are a bunch of links in the YouTube description. I am not ready to post my code or describe how it all works yet.

____

PS - I don't know a single person in the real world who I could explain how this works to even if I tried. I learned it on my own with nobody to talk to about it. I have no baseline to work from to understand what other people know or don't know about anything. I will need to write a tutorial to establish a baseline reference so I can answer questions.

Robin2

Thanks. I will take the time to study all that carefully.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Robin2

I have tried that guy's code but it still won't show the video on my Android phone. The controls all show up but I suspect they don't do anything.

Using the unzipped HTML does make life easier. I have just put it in a separate .h file using the same format as in the demo.

I can control my train with my version of the code but I have to use my PC as the controller which is a PITA.

Perhaps I will find some inspiration (or advice) tomorrow :)

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

checkmatearts

hmmm...

have you tried setting up your phone as a WIFI access point ("mobile hotspot")?

that way the phone is supplying the address for the server in the esp32.

- Jim

Robin2

have you tried setting up your phone as a WIFI access point ("mobile hotspot")?
That's the normal way I use the phone - it is my link to the internet.

But things are the same if I set the ESP32-cam as an access point.

By the way I have another project in which I use a browser as a GUI based on a Python server on my PC and it works fine on the phone. Which is why I was expecting the ESP-cam project to work on the phone.
...R
Two or three hours spent thinking and reading documentation solves most programming problems.

checkmatearts

phone browser settings? like javascript enabled? ... or try another browser

mine is currently setup with the esp32 as a server and connecting to the phone as a hotspot but i also had it connected to my home wifi and ran it from a bunch of devices and they all worked.

Robin2

phone browser settings? like javascript enabled? ... or try another browser
Everything is enabled AFAIK and I have tried two browsers Chrome and Internet - same non-effect on both.

Thanks for your interest.

UPDATE:   Problem seems to have gone away when I updated Chrome. I normally don't use Chrome on the phone because I can't figure out its user interface. The browser called "Intenet" has an interface much more like a PC.


...R
Two or three hours spent thinking and reading documentation solves most programming problems.

checkmatearts

if it works on pc and not other device then it is probably client side code issue.

the client code is html/css/javascript and using fetch() command.

according to wikipedia AJAX capability was added to fetch() in 2017

the sample code is fetching the required data and modifying the page without refreshing the whole page.

That is pretty much all I know at a high level.

Robin2

As I mentioned in my "update" in Reply #21 it is now working fine on my phone on the updated version of Chrome and on a newly installed version of Opera.

I have also figured out how to keep the CSS, HTML and JavaScript in separate files. I have a principal file called display.h (any  file name will do) with this content
Code: [Select]
static const char PROGMEM displayStart[] = R"(
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Train Cam</title>)"
       
#include "display.css"
#include "display.html"
#include "display.js"

R"( </body>
</html>
)";


and the content of those files is made into valid C++ by wrapping it inside R"( ..... )" like this extract from the CSS file
Code: [Select]
R"(
        <style>
            #wrapper{
                background-color:DarkGreen;

[.......]

                transform:rotate(90deg);
            }

        </style>
)"


...R
Two or three hours spent thinking and reading documentation solves most programming problems.

checkmatearts

Glad you got it all working. :)

I haven't been working on the code for this car for a long time.

I finalized the circuit board. Probably will order custom PCB from China so I don't have to work so hard to make more of them.

xgarb

I've just finished a project similar to yours. You might find some helpful information: https://robotzero.one/esp32-cam-rc-car/

One thing that will definitely make things easier is getting a camera with a longer cable: https://es.aliexpress.com/item/32981773363.html

By the way the CyberChef site should be really easy to use. Just paste the following URL...

https://gchq.github.io/CyberChef/#recipe=Gzip('Dynamic%20Huffman%20Coding','index.html.gz','',false)To_Hex('0x')Split('0x',',0x')Find_/_Replace(%7B'option':'Regex','string':''%7D,'',true,false,true,false)

Paste in your combined HTML, JS and CSS file and then copy and paste the code generated.


Robin2

By the way the CyberChef site should be really easy to use.
It is.

I just prefer desktop computing to online computing.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up