-
Notifications
You must be signed in to change notification settings - Fork 39
some discussion about the "traditional Arduino" vs "doing things the MbedOS way" of coding #342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I wonder if getting an MbedOS person interested in this project would help a lot on clarifying these questions. |
@jerabaul29
So to sum it up: if you are doing DIY projects for your own and development speed is key then choose Arduino. Simply because there are HW libraries for almost every HW. Even the community is huge if you get stuck, you get answer really fast. However if one wants to actually learn embedded programming (not just playing around) or you want to do something more advanced beyond just DIY, then choose Mbed. But with Mbed be prepared to one of the worst documentation ever made and for an ever changing core which breaks things too often. Also there are less HW libraries...and be also prepared for outdated examples which all make your way hard at the beginning. Because all of this i am actually considering trying Zephyr (i just do not have compatible boards) or going to learn AmbiqSDK which seems to be really alien at first glance and is also extremely HW specific... |
closing in favor of this discussion #352 |
That is tightly related to #332 and some discussions in #324 . This is not really an issue, rather a discussion / thinking loud to try to get ideas clear (andmaybe get some help in the process).
I think that we are several users being a bit confused about where the line goes between the Arduino core and MbedOS. I was at the beginning skeptical to the whole MbedOS thing (mostly because I was lazy and did not want to learn about RTOSes which is something new to me), and then I read a bit more of MbedOS documentation and changed opinion: having a good RTOS with all the facilities it provides is really nice ^^ :) . I have a feeling now that embracing a "truly MbedOS style" would help a lot in writing better, higher level code, that is "good enough" the vast majority of the time, while being much more flexible and less error-prone.
For example, compare the power management main ideas of MbedOS:
https://os.mbed.com/docs/mbed-os/v6.6/apis/power-management-sleep.html
Which means, if I understand it right, that MbedOS does all the work for us, and chooses the lowest sleep mode possible depending on what peripherals etc are used,
with:
https://github.com/adamgarbo/Arduino_Apollo3/blob/58124ed237f910d56ec183a601d6bdab048dc0bf/libraries/WDT/examples/Example3_WDT_LowPower/Example3_WDT_LowPower.ino#L91-L116
where everything is done explicitly by hand (with all the possibilities for mistakes that brings in, but also full control as a gain, and probably a bit better power savings).
Now, I do not think that one approach is uniformly better that the other, and I think that for truly very low power applications, it probably will be worth / necessary to go all the way to the second approach. But still, for me, I would prefer to stick to the high level approach.
I think this is illustrative of the "traditional Arduino" vs "doing things the MbedOS way" of coding. Any thoughts about that? Where does the line go? How much should a programmer rely on MbedOS facilities / how much of it is actually available, vs how much should be done by hand?
Another point is with the choice of APIs. MbedOS seems to have very good documentation, so I would really love to be able to use "full MbedOS APIs" rather than need to dig to find the "Arduino Artemis API" way of doing things :) . Thinking about that after the work around #324 .
@adamgarbo I think this is very related to some of the discussions we were having.
The text was updated successfully, but these errors were encountered: