jnwatts / qtledtest Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Lesser General Public License v3.0
License: GNU Lesser General Public License v3.0
About ===== This is a little program I threw together to help evaluate different OLED displays and GUI layouts for them. Internally, it's comprised of 1 external widget and 3 of my own: QLedMatrix: I briefly contemplated writing my own widget to emulate the actual LED display, but thanks to a quick search I found one already written for me. Actually, I think the author, Pierre-Etienne Messier, did an amazing job! :-) SSD1306: A simulation of the OLED controller by the same name. This wraps Pierre-Etienne's QLedMatrix with the same interface as the real thing (see lines 46 thru 48). Unlike the real thing, you can resize the display dynamically at run-time. In the future I'd actually extend this model to include various timing and output features of the real controller, such as updating the pixels at the actual "clock-rate" and generating the "frame" signal for synchronizing writes to the device. (Hrm... I suppose I could even simulate the clock-rate of the SPI bus... hehe ;-) Graphics: Not wanting to draw just a single static bitmap to the display, I chose to implement a very basic (and very inefficient) graphics library. The library works directly on the same image format as the SSD1306's internal GDDRAM: each byte of a page corresponds to the 8 bit rows at that particular column. I implement the minimum set of operations I felt I would need to make a useful UI: Fill, Rect, Line, Arc and a convenience "Tab" function. Font_info: Shortly after completing the Tab function, I realized my UI would useless without some kind of font support ;-) I used Font Builder to convert some free fonts into rasterized images. This also generates an XML description file that lists all of the important metrics for each character of the font. I wrote a quick program to convert the png and XML of each font into a C source/header pair (encoded in the same format the graphics lib works on). Copyright ========= Copyright (C) 2013 Josh Watts <[email protected]> http://www.sroz.net/ License ======= QtLedTest is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.