Library: Loading Screen
I transformed these images with the help of the following instructions
https://wiki.microblocks.fun/snap/snap2mb_img_code
You can use them in MicroBlocks now. Load the ubp file and see how it looks on your PicoBricks OLED.
The zip file just contains the library I made using the images you see.
The blocks show the demo script to rotate the images.
Have fun.....
Comments
-
What a cool idea!
Here's a related tip: you can export the custom blocks with an appropriate name as a user Library; eg: Loading-Screen.ubl . Then users can just drop the UBL file onto the IDE and it will be incorporated into their program, just like the other libraries.
There is a difference: they will not show up with the other libraries in the standard distribution of MB. After all, these are user files and not built into the IDE. But still it is a great way to distribute custom libraries.
Another tip on making the code more compact is this:
Place the image gen script names into a list and use the MB call block from Control category to run them, followed by display. This would put the image handling more into the program's control and let it be done programmatically to suit many needs. I use the technique in OLED demo programs, etc.
To demonstrate, here's what your example would turn into:
Enjoy.
2 -
Thank you @Turgut for the great tips.👍️ I will certainly use them. 😀
0 -
Additional BEWARE comment:
Library block names need to be unique in the scope of the project one is working on. We take care when we dev Libraries for MB and do that.
But user libs, in a hurry and excitement, might break the rule. And the end result is that the latest loaded blocks overwrite previous ones with the same names.
Normally, this is a rare occurrence. However, when one gets into a steady production of useful and fun collateral, names start piling up and might conflict.
So, it pays to check things out carefully.
Also helpful is to use a project level prefix for blocks that are going to be in a library.
Keep creating...
1 -
Hi @Turgut, I understand the excitement part. 🤓
Even as an old guy I love to discover new things. That's why I asked a mod for the ability to edit my topics even after 1 hour to post newer and better versions. But in the end, I should think before I post 😂
Your idea of a prefix for library blocks makes a lot of sense in this case. 👍️
0 -
If variable and block names start with an underscore, they are treated as hidden / advanced, and will not show unless the show advanced blocks option is set in the Settings (wheel) menu.
LoadingScreeen100 : visible
_LoadingScreen100 : not visible unless option enabled.
One other suggestion: While your renaming blocks is good, it generates very long and mostly similar names. It may be possible to achieve the same result by using some thing like LS100 and _LS100. I will send you an email about this and detail it a bit. I do not want to muddy the issue here and confuse a lot of people.
1 -
Found it. 😀 I have to use an _ (underscore) to make blocks fit in the advanced categories. This looks much better than it did.
0 -
Updated the first post with everything I learned. Much better this way.
0
Howdy, Stranger!
Categories
- 117 All Categories
- 3 Community
- 3 Hello Maker!
- 102 PicoBricks - Make, Run, Split, Merge
- 1 PicoBricks IDE
- 1 Arduino IDE
- 31 Hardware Support
- 15 PicoBricks Backers Hub
- 49 MicroBlocks Support
- 3 Shipping Support
- 2 MicroPython
- REX - 8 in 1
- Mechanical Parts and Parkour
- REX Main
- Arduino-IDE
- REX - Shipping
- 12 Products & Technology
- 2 Raspberry Pi
- Arduino
- 10 Other