![]() update the bar and label values (temperature)Ĭpu_values=data.cpu_temp/( float)data.cpu_temp_max update the CPU graph buffer (temperature)Ĭpu_buffers.put(data.cpu_temp/( float)data.cpu_temp_max) update the bar and label values (usage) This must be done in exactly and only one cpp file in the project.Ĭpu_buffers.put(data.cpu_usage/100. What this does is tell lcd_init.h to import its code into this cpp file. The only odd thing here is #define LCD_IMPLEMENTATION. This first bit is boilerplate and just includes the necessary files. Main handles setting up the device, listening on serial, and updating the UI as necessary. Let's dive right in, shall we? First, we'll cover the firmware. The fonts are scaled to one tenth of the screen hieght. For the bottom half, all the positions are duplicated and offset by half the screen height. For the top half (CPU), first the label is created, then the components that surround it are. The UI itself is scaled around the CPU and GPU labels. This applies to both the graph and the bar. It uses the HSV color model to transition between green, yellow and red as the temperatures get hotter. The temperature readout deserves some extra explanation since it is a gradient. For the graph to work, the leftmost/oldest data is removed before new data is added if the circular buffer is full. At that point, anything that has changed in the UI (namely the bars, graphs, and temperature readouts) is updated by UIX as it is invalidated. Once received over serial, the data is stored in memory in a circular buffer used for the usage and temp history graph. Once it has that data, it stores it as well as sends it to each selected serial port if Started is checked. It queries OHWM ten times a second for usage, temperatures, and tjmax values (Intel only). The C# app uses OpenHardwareMonitor (a version patched for Raptor Lake processors is included with this download package. The display(s) on your monitor(s) should change from a disconnected icon to a monitor screen and the monitoring will commence. Next launch the PC application - you'll be asked to approve the application running under elevated privileges.Ĭhoose the COM ports you want monitor on from the list box and then check " Started". If the device has more than one USB port, plug it into the one that is connected to the serial UART USB bridge, not the native USB (ESP32-S3 only). More devices can be added with some additions to lcd_config.h, lcd_init.h, and platformio.ini. It currently works with the Lilygo T5 4.7". It does not have the PC companion app with it, so you will need this code as well. There is a separate project demonstrating the concept on e-paper here. This device is more for fun than anything. It may be possible to improve the display for small screens like this, but I didn't think it worth complicating the code. ** This screen is very small and monochrome, straining the ability of the UI to scale, and compromising readability. If anyone knows of a workaround I'd love to hear it. Anyway, the problem is lower level than my code. Espressif has not worked all the kinks out yet. * I've had some hangs in the PC app while communicating with these, and some message boards are not turning up encouraging things about the internal native USB serial bridge on these devices. Makerfabs ESP Display S3 4.3 inch w/ Touch.Makerfabs ESP Display S3 4 inch w/ Touch.Makerfabs ESP Display S3 Parallel w/ Touch.You will need one or more of the following ESP32 devices: In order to work on a variety of different displays, the project has a scalable UI. I thought it might be worth revisiting since I've improved it quite a bit as well as changed it to work on my UIX and GFX libraries instead of LVGL. ![]() ![]() No submissions about memes, jokes, meta, or hypothetical / dream builds.I made a previous version of this project using LVGL and a T-Display.No titles that are all-caps, clickbait, PSAs, pro-tips or contain emoji.No submissions about retailer or customer service experiences. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |