MrYsLab/s2m

issues with PWM

Closed this issue · 3 comments

@lyshie has reported some issues with analog write. There are documented in comments on an unrelated matter for a pull request:
#14

I am opening this issue to help expose it in case anyone else is seeing similar problems and want to add to the conversation.

I tried to use the beta version of MicroPython editor, it worked fine!
http://python.microbit.org/v/beta

Thanks for opening new issue

@lyshie Thanks for letting me know. It all comes down to which is the best version of runtime.hex to use. The mu editor uses the uflash version of the runtime. Supposedly they are one in the same, but when I compare them, they are different. Both are supposedly from last October. The version that is in the beta editor is yet a different version from a year ago.

I will try to contact the micro:bit folks to see if they can explain which is the latest version. There is an old issue (for some reason now closed) that has several links describing the issues with the various versions of the runtime in addition to their age. mu-editor/mu#261

To make it easier to use a given runtime version, the uflash utility allows you to specify the version you to use with its -r option.

Here is conversation I had on slack that explains the state of it all. Since this is not an s2m bug I am going to close this issue, but please feel free to add to this thread if you wish.

Alan Yorinks 9:49 AM
I have compared the python runtime.hex code for the mu editor, uflash and the micro:bit online beta python editor and they are all different. Does anyone know which is the latest version to use and which is the most bug free? There have been some issues with analog write reported in some of these versions.

Carlos Pereira Atencio 10:35 AM
Technically the uFlash and Mu versions should be the same, and I think they are if you compare the latest release of uFlash with the Mu releases that you can download from http://codewith.mu
10:36
The version of Mu in the master branch of the repository (and PyPi) are the latest beta version, and have bee manually updated in October to have the latest MicroPython beta
10:37
So if you try Mu from source, or with "pip install" you would have a beta version of MicroPython v1.0 from October 18th (the previous MicroPython was technically v0.9, and that's the version shipped in the older Mu and online editors for over a year now)
The online editor beta version (http://python.microbit.org/v/beta) should also have the latest beta version of MicroPython v1.0, it is technically compiled from a commit ahead than the version in Mu, but the only changes were in the documentation, so the runtime should behave the same. Differences in the hex could be due to compiler differences, but the latest beta Mu and online editor beta should contain a MicroPython version that is practically the same. (edited)

Carlos Pereira Atencio 10:45 AM
The MicroPython v1.0 beta contains a lot of bug fixes, so hopefully it should have fixed some of the problems you could experience with v0.9. But as the name implies, it is still in beta, and needs testing. If you find any bug there it would be very very helpful for the project if you could log it in the repository.
I know it's a bit confusing, but once v1.0 is out of beta we should be able to make formal releases in a way that is a lot simpler to understand and track. I hope that help @MisterYsLab!