|
91
on: June 22, 2025, 08:34:15 08:34
|
||
| Started by Wizpic - Last post by Wizpic | ||
|
Thanks that’s perfectly working, I’ll have to have a look into this Google Gemini thing technology today is surprising good
|
||
|
92
on: June 22, 2025, 08:12:51 08:12
|
||
| Started by pupin - Last post by pupin | ||
|
Thank you for invitation. Registration is done.
Note: This message sent by the system behalf of pupin. |
||
|
93
on: June 22, 2025, 01:41:12 01:41
|
||
| Started by Wizpic - Last post by mars01 | ||
|
Hi,
From Google Gemini: "I have refactored the code to be completely self-contained. All the styling that was previously handled by Tailwind CSS has been recreated using standard, inline CSS within a <style> block in the <head> of the document. This means the file has no external dependencies and will render correctly when served from your ESP32, even when it's completely offline. The layout and functionality remain the same, but it's now a single, portable file." The new code: Code: <!DOCTYPE html> And the result looks like this: ![]() |
||
|
94
on: June 21, 2025, 08:15:25 20:15
|
||
| Started by jnz - Last post by bobcat1 | ||
|
Hi
I have done a complex embedded works without an RTOS who include among other : using a graphic display controlling motors reading sensor running complex algorithms ..... here is my opinion : 1. Only use RTOS when you really need hard real time processing 2. Whether you working with Cortex micro (probably most of us) use CMSIS - RTOS rapping 3. RTOS consume memory & processing use the simplest RTOS with the lowest signature for simple task and vice versa. 4. whether you don't find one suitable to your need - write one - it dose's not need to be complex or Pre-emption and can be as simple as a linked list.... All the best Bobi |
||
|
95
on: June 21, 2025, 05:21:33 17:21
|
||
| Started by Wizpic - Last post by Wizpic | ||
|
I've done some playing around and the only trouble it that is will be a standalone server and has no internet connection as the ESP32 is the sever that the IP connects to
When I take out this bit as this needs an internet connection I gather Code: <!-- Using Tailwind CSS for modern, responsive styling --> I'll do some more playing and round with it |
||
|
96
on: June 21, 2025, 02:10:19 14:10
|
||
| Started by Ahmad_k - Last post by Ahmad_k | ||
|
Sorry for late answer, that was not the CIN, the 470uF was at the input, I changed a little bit the schematic, it was for reference only. The chip was fake and everything is working perfectly now with genuine ICs
|
||
|
97
on: June 21, 2025, 01:30:21 13:30
|
||
| Started by Wizpic - Last post by Wizpic | ||
|
Thank you, I never thought about that way, I like the layout of it better than my 2 versions , so I tested it and works perfectly, I can play around with the layout and stuff like that and I also like that it shows connecting/disconnected part
|
||
|
98
on: June 21, 2025, 10:25:37 10:25
|
||
| Started by Wizpic - Last post by mars01 | ||
|
Hi,
I've added your question to Google Gemini 2.5 PRO AI and here is what it came up with: Code: <!DOCTYPE html> The result looks like this: ![]() And the explanation of what it did to fix your code: Quote The issue in your "new layout" is that the JavaScript is trying to update elements by an id that doesn't exist or is on the wrong element. You're trying to update the text inside a table cell (<td>) when you should be updating the value of the text box (<input>). I've created a clean, modernized version of your CAN bus monitor page. This new code combines the layout you wanted with the working WebSocket logic from your original file. It's built to be responsive, easy to read, and simple to modify. I've made the following key changes to fix your layout and make it more robust: - Correct JavaScript Targeting: The main issue is fixed. The JavaScript now correctly targets each <input> field by its unique id (error-counter, rx-counter, frame-counter) and updates its value. - Modern HTML & CSS: The code uses Tailwind CSS for a clean, responsive design that looks great on both mobile phones and desktop browsers. The layout is managed with a CSS Grid, which is more flexible than tables for this purpose. - Readability: I've cleaned up the structure, removed redundant tags, and added comments to both the HTML and JavaScript to explain what each part does. - User Experience: The input fields are set to readonly since they are for display only. I've also added a "Connecting..." message so you know the page is waiting for data. The HTML and JavaScript code in the canvas is designed specifically to work with an ESP32. Here’s a simple breakdown of how it all fits together: 1. Your ESP32's Role (The Server): You will program your ESP32 using the Arduino IDE or a similar tool. Your C++/Arduino code needs to do three things: - Act as a Web Server: It will store this HTML file in its memory (usually in SPIFFS or LittleFS) and send it to any web browser that connects to the ESP32's IP address. - Create a WebSocket Server: This is the critical part. The ESP32 must run a WebSocket server on port 81, just as the JavaScript expects (ws://${hostname}:81/). - Send Data: The ESP32 will read your CAN bus data, format it into a JSON string like {"ER":5, "RX":1234, "EER":1}, and send this string over the WebSocket connection at regular intervals. 2. This Code's Role (The Client): The HTML file you see in the canvas is the "client-side" code. It runs entirely in the web browser on your phone or computer after being loaded from the ESP32. It listens for the JSON messages from the ESP32's WebSocket server and uses them to update the values in the text boxes. Your next step is to write the ESP32 code that serves this file and provides the data. |
||
|
99
on: June 20, 2025, 08:39:03 20:39
|
||
| Started by Wizpic - Last post by Wizpic | ||
|
I've been playing with an ESP32 as a canbus reader, this create a server where I can log on to sing phone through web page I can see the Error's and RX counter, It's all working but now I've found a better lay out but not really fully understand HTML and after some tips/advise.
This is the working layout (old) Code: <html> Code: <html> Below are the images of old and new laout. to start as learning curve. I've been trying to get it to display the RX counter the the white box in the new layout next to the RX counter box but can't seem to get it to work it just shows 0 not fully understanding HTML. So any advise tips would help. I use W3Schools to display the lay out to see what it looks like. |
||
|
100
on: June 13, 2025, 03:43:56 15:43
|
||
| Started by pupin - Last post by zokij | ||
|
This member is invited by me. Registration isn't completed yet.
Note: This message sent by the system behalf of zokij. |
||


