Best Of
Re: E-Book inaccuracies
Nothing to be sorry about! All is good.
We are all newbie's at one thing or another, and let's grow together.
Your error corrections are much appreciated and I am revising the instructions / description for the Example Projects. Soon there will be hopefully a better version out.
Re: Is there a Real Time Clock in PicoBricks?
There is no difference between having a library and using custom blocks (My Blocks). All libraries start out as custom blocks and then get exported.
If you want to or plan to use ESP01 a lot, you are going to need much more than just the library. In cases like ESP01 comms, there is also the need for what I call "glue" logic that makes coordination of events work. These are never in the library. You are not in an environment where you make sequential library calls and string them together as in Python or Arduino IDEs.
Best approach is to first study the example and understand the comm flow, msg handling, msg parsing, etc. Then you can modify the behavior to your needs.
Please keep in mind that you are working in a very memory constrained micro processor environment in a real time fashion. There is no compiling and optimizing code by a compiler. There are limits to size of code and libraries. Therefore, when working in MicroBlocks with advanced projects one needs to get good in understanding of the environment and restrictions. We simply cannot put everything into a Library; it would be huge and will not fit. So work needed has to be split between some custom block code and some application coordination logic.
However, that does not mean one cannot do serious stuff in MB. The perfect example is the OLED library that I have written, which performs at C++ levels or better, is 26K+ in size and is TOTALLY written in MicroBlocks, manipulating the hardware. You can open read each and every block of it. There is no hidden magic behind the scenes.
The PicoBricks kit and the block programming paradigms provided are primarily a learning environment where experimentation and exploration is the key learning approach. If you are only comfortable with running examples and don't feel like experimenting, then you might not be happy with the exploratory approach, and might be better served by the Python or Arduino environments, with their compiled, linked, and downloaded approach to programming. and relatively less memory restrictions.
I understand the overwhelming amount of "NEW" that needs to be absorbed, understood, and applied. I will try to coordinate a few WEB presentation sessions to cover the complicated projects, as it is rather lengthy and hard to write about each and every detail. I believe an interactive session with interested users like yourself will be more productive.
Many ways to skin a cat...
Re: Splitting The Picobricks System
We'll let @Gadgeteer explain what he meant !
However, the Grove cable sockets both on the sensor modules and the Pico processor modules are there for the express purpose of reconnecting broken off modules as needed to achieve the original functionality. The traces used for the board level connectivity of the modules are using the same pins on the processor as the specific Grove cable pins. There is no need to try to solder any traces in case of modules that were broken off and need to be integrated back with the modules still attached to the board.
If a component is broken off and then reconnected via the Grove cables to the correct processor Grove socket, there will be no difference in the operational capability. And it will be possible to integrate these broken off modules with the ones that are not broken off.
That was a mouthful, but I hope it will make someone's life easier.
Re: E-Book inaccuracies
I am reviewing all the projects this week and next. Robotistan team is new to the MicroBlocks and there have been some errors. But we'll get them all corrected. Appreciate the edits provided.
Re: Is there a Real Time Clock in PicoBricks?
"Why was that particular example included if the hardware requirements are different than what ships with our PB kits?"
Using MicroBlocks you can program a lot of different boards. https://wiki.microblocks.fun/boards/supported, not just Raspberry Pi Picos.
The example @Turgut showed was made with another board/screen in mind. You could change it so it works with the OLED screen of your PicoBricks.
Re: Individual trays
There are two reasons I wanted these. After you separate the boards, the connecting wires now make the boards not sit flat in the trays. If you want to build the robot car it suggests that you glue the boards down to the robot. I would print the trays I needed for the boards for that model and glue the trays down to the robot. Then I could pop the boards in and out of the trays when I wanted to use the robot.
Little tip: Control your servo with your potentiometer
You can find the rescale block in the advanced section of your operators category.
Your potentiometer has a range from 0 to 1023. Your servo has a range from -90 to 90 degrees (180 in total).
The rescale block rescales the range of your potentiometer to the range of the servo. So instead of 0 to 1023 your potentiometer acts like it has a range from -90 to 90.
This way it gives you the ability to change the rotation of your servo 1 degree at a time.
I was thinking about a project to make with this, but couldn't think of one at the moment.
Maybe some of you know what you can do with this......... 😁
The rescale block is really powerful. 💪
Re: Is there a Real Time Clock in PicoBricks?
There's an rtc in the pico 2040, but there are to issues with it:
- it is not sub-second capable
- there is no built-in battery, so it cannot persist.
- also. from MicroBlocks, there is no block to accees the rtc component of the processor.
However, as usual, there are always workarounds:
Under FIle/Open/Examples/Network there is a project called "Online Clock Example".
Starting with that, and adopting it to work with the ESP01 WIFI module, you can implement a clock logic that can initialize itself upon startup, with the network time. Since MB is capable of the ticking at millisec level, it might end up being better than the Pico rtc option.
There is also a timer project in the PicoBricks activities that implements a countdown timer, which can be modified to serve as the basis of a clock logic.
Of course, you are also free to experiment with many other methods that can be implemented using the Python or Arduino interfaces.
I think, this is the beauty of these microprocessors and simple programming methods that allows one to try out many different things.
Re: E-Book inaccuracies
Oh, maybe the ".app" in the file name implies Mac - I'll try it...
Update: just downloaded MicroBlocks.app.zip and extracted the Mac app file - now my version shows as 1.1.85 and Rescale code block lists under Operators->Advanced :) Thanks!!
Re: E-Book inaccuracies
I like the name Pilot better. 😁Beta implies in my view the focus on risks for unstable behavior. Never lost any project or code when using MicroBlocks. Off course with any software it can have and has bugs but they are fixed very fast. Thats why I always use the pilot.