Notifications
Clear all

ESP32cam Robot Car

18 Posts
3 Users
0 Likes
1,091 Views
 PKDJ
(@pkdj)
Member
Joined: 1 year ago
Posts: 8
Topic starter  

Hi

I am new to the forum and wondered if someone might be able to help with my understanding of html.

I have compiled and uploaded the code for the robot car and it works a treat. Β 

I am now modifying the code for an underwater ROV that I an putting together.

Β 

I have successfully added some additional buttons in the table that will be used to control the ballast tank motor.

I’d like to modify the code so that the video stream defaults to on rather than off but just can’t work out how to do this. I know its related to the button but need a bit of help to work out how that button works as it if different to how the other buttons work.

I have also coded a safety timeout so that if no commands are received by the web server for two minutes (i.e. due to wifi signal loss or out of range) it will automatically surface.

Love the Dronebot website , full of useful and interesting stuff

Many thanks

Paul


   
Quote
Topic Tags
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@pkdj

Maybe I'm misinterpreting your question, but I don't think this is an html problem.

Just work this button the opposite way from the other buttons. Start with the camera wired on and label the button "Camera off". When the button is pressed, turn the camera off and change the button label to "Camera on" and when it's pressed turn the camera on and change the button label as above. Rinse and repeat πŸ™‚

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
 PKDJ
(@pkdj)
Member
Joined: 1 year ago
Posts: 8
Topic starter  

Hi Will

Β 

Thanks for your response. You are spot on with your understanding of my request and that’s exactly how I would like it to work but unfortunately I can’t fathom out how that particular button works and how to β€˜reverse’ its operation.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@pkdjΒ 

OK, let's try it from a different direction, have you created any other buttons that work to turn something to "on" which started in the off position ?

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
 PKDJ
(@pkdj)
Member
Joined: 1 year ago
Posts: 8
Topic starter  

Hi Will,

Yes, I have created an additional 6 buttons which activate various actions when pressed. Β All of these buttons return a variable when pressed and it just a matter of checking the variable and coding according with β€˜if’ statements. I created the additional buttons by copying/pasting/ modifying the html and associated code once J worked out how those buttons worked.

The HTML for the video stream button is more complicated and I can’t work out where the stream is turned on/off and how the button does it.Β 


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@pkdjΒ 

I'm confused, you already have a working button to start and stop the camera ?

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@pkdj How far does WiFi penetrate water?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
 PKDJ
(@pkdj)
Member
Joined: 1 year ago
Posts: 8
Topic starter  

Hi Ron

Β 

WiFi does not penetrate water ( as far as I am aware) because frequency is too high, but with the ESP32CAM board you can attach an external antenna. Β So I have tested adding an antenna with a 5 metre extension cable and range is not affected by the extension cable. So my plan is that the ROV will be underwater but the antenna will be mounted on a float above the water connected to the ROV by the extension cable

Β 


   
Ron and THRandell reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@will I took a quick peek at the project, it looks to me like the buttons are a part of the HTML. I have zero training or experience with HTML so can't help too much.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
 PKDJ
(@pkdj)
Member
Joined: 1 year ago
Posts: 8
Topic starter  

Hi Will

Β 

Yes there is already a button but on power up the default status of the stream is off and I have to press the button to turn it on. Β I’d like to change it so that on power up the stream is on without having to press the button. Just can’t work out how to make that change. I can see that it is something to do with the line of HTML that starts with β€˜document.addEventListener’ and have tried a few changes without success.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@pkdj I take it you have no training in antenna theory and design.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
 PKDJ
(@pkdj)
Member
Joined: 1 year ago
Posts: 8
Topic starter  

Hi Ron

Β 

you are correct, no training in antenna design. Purely working on the β€˜suck it and see’ method and practical results.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@pkdj Since you have no profile info re training, experience and I don't see an entry in the introduction forum for you telling us that plus a BRIEF first project description, it's very difficult to use the appropriate language to your training/experience. From what little I have seen you will need to be relatively experienced in HTML otherwise it will be a MAJOR challenge. Good luck.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@pkdj VERY roughly, antennas must be the correct length for the frequency. You can't just add a random length cable, and these frequencies (2.5/5GHz) require very small antennas. I am planning on building a ROV too, I will use ethernet, not WiFi.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
 PKDJ
(@pkdj)
Member
Joined: 1 year ago
Posts: 8
Topic starter  
Thanks Ron, new to the forum, will update my profile.
Β 
Project is an underwater ROV that is based on the ESP32CAM robot car. Β I’m modifying the code/html to control thrusters and ballast tank motors instead of wheels.Β 

Will post some updates as I progress.
Β 
Thanks

   
ReplyQuote
Page 1 / 2