New DEBUG Crop Feature (Requires v49.1)
I was speaking with Chip yesterday about debugging windows and shared that I really like the crop widget in the Nextion touch displays. We spoke for about 15 minutes and this morning sent me an email that the feature now exists (in PNut).
I think this provides a real opportunity for students and experimenters to make virtual equipment/displays using P2 DEBUG. Of course, this needs to be made cross-platform so that everybody wins.
I'd also like to see the feature use PNG files instead of BMP. I used Inkscape for graphics but it won't export a BMP (which is bigger, anyway).
As I'm a simple guy, so I made a simple demo: An 8-bit LED counter that looks like 5mm LEDs on an aluminum panel. I'm sure the creative types will come up with a lot of neat ways to take advantage of this new debug feature.
Get version 49.1 of PNut here:
-- https://obex.parallax.com/obex/pnut-spin2-latest-version/
Comments
As an exercise I added a digital display to the demo.
I just tried the demos and PNut49.1 and everything worked great, thanks @cgracey @JonnyMac
Thanks, Jon! I didn't know that you had posted it. Looks good.
I stayed up very late last night working on this -- will talk about it and the object I wrote for my friend Josh during the March Zoom call.
I created the graphics using Inkscape (inkscape.org -- freeware). It's one of my favorite tools for creating screens for Nextion displays, tech diagrams for work, and even the outlines and graphics for PCBs.
This is the kind of idea I had in mind when I originally spoke with Chip about adding the crop feature to debug. This is a simple (not practical) demo, but I hope it inspires others to make neat test/lab interfaces. I like developing UIs for the Nextion touch screen, so I'm happy that with a bit of code I can do similar things in the plot debug window.
You can flip the switches by left-clicking on each. To change the display radix, press the first letter of the base: the program supports decimal, hex, binary, and octal. If you right-click (anywhere) the radix will change to the next in order. Press the spacebar to reset all the switches.
There's probably some efficiency things that could be done -- please post your ideas and suggestions.
FYI, Spin Tools IDE, work in progress...
That's very good - I foresee a library of widgets which would get reused for many projects? How about a graphical GUI designer to generate debug statements ;-)
Bob
Excellent, @macca! BTW, I just got an email from Chip. He's changing the crop commands from
to
I think using width and height of a crop zone will make programming the feature a little easier.