Where is the current GitHub repo for this incredible project?
I see the pull request here:
https://github.com/micropython/micropython/pull/3137
Where should I download it from and is there a tutorial of sorts?
Thank you.
Porting to Nordic Semiconductor nRF52
Re: Porting to Nordic Semiconductor nRF52
The code for the PR is hosted at https://github.com/tralamazza/micropython/tree/master
There is a README.md tutorial in the nrf/ folder, which explains how to compile and flash the various targets. Also, to show some basics, some scripts have been added to the nrf/examples.
There is a README.md tutorial in the nrf/ folder, which explains how to compile and flash the various targets. Also, to show some basics, some scripts have been added to the nrf/examples.
Re: Porting to Nordic Semiconductor nRF52
Hi again guys,
I currently have an application for the nRF52 port that would greatly benefit from having division, and even more so with having decimals and rounding. I am of the understanding that currently all but the most primitive of math is not included in order to reduce build size. Would it be possible to selectively include some functionality (such as division), and how would one go about doing so?
If I'm mistaken and my divisions shouldn't be throwing "unsupported types for: 'int', 'int' " and my decimals shouldn't be throwing "decimal numbers not supported", then please let me know and I'll try and figure out how I borked my build so badly!
Cheers,
Oliver
I currently have an application for the nRF52 port that would greatly benefit from having division, and even more so with having decimals and rounding. I am of the understanding that currently all but the most primitive of math is not included in order to reduce build size. Would it be possible to selectively include some functionality (such as division), and how would one go about doing so?
If I'm mistaken and my divisions shouldn't be throwing "unsupported types for: 'int', 'int' " and my decimals shouldn't be throwing "decimal numbers not supported", then please let me know and I'll try and figure out how I borked my build so badly!
Cheers,
Oliver
Re: Porting to Nordic Semiconductor nRF52
Hi Oliver,
If i understand you correctly, you are looking for two things, division of integers and floating point numbers.
Division of integers are available already now, using the syntax "//". I believe it's called something like floor division or integer division in python3. Let me put up an example:
The second issue related to floating point number is a bit more tricky. You are right, it's left out to make build size smaller. My simple tests are showing that enabling floating points by default on nrf51 and nrf52 will increase the code about 32k (nrf51) and 23k (nrf52). For now, I have created a PR to add float support for nrf52 in order for you to help you proceed on your project. I'm a bit unsure if this PR is going into master in the end, as it consumes quite a lot of flash. However, it does not stop you from enabling floating points locally using this patch
https://github.com/tralamazza/micropyth ... 208204586f
Cheers,
Glenn
If i understand you correctly, you are looking for two things, division of integers and floating point numbers.
Division of integers are available already now, using the syntax "//". I believe it's called something like floor division or integer division in python3. Let me put up an example:
Code: Select all
>>> MicroPython v1.8.1-2763-g1ac8f67e on 2017-07-18; PCA10040 with NRF52832
Type "help()" for more information.
>>> a = 9
>>> b = 4
>>> a / b
Traceback (most recent call last):
File "<stdin>", in <module>
TypeError: unsupported types for : 'int', 'int'
>>> a // b
2
https://github.com/tralamazza/micropyth ... 208204586f
Cheers,
Glenn
Re: Porting to Nordic Semiconductor nRF52
Hi Glenn,
Thank you so much for that! I've just pulled down your patch and it's doing exactly what I wanted - much appreciated!
I really need to get more familiar with the insides of Micropython so I can sort this stuff out without calling in reinforcements...but in the meantime, thank your for your support!
Cheers,
Oliver
Thank you so much for that! I've just pulled down your patch and it's doing exactly what I wanted - much appreciated!
I really need to get more familiar with the insides of Micropython so I can sort this stuff out without calling in reinforcements...but in the meantime, thank your for your support!
Cheers,
Oliver
NFC Tag, was Re: Porting to Nordic Semiconductor nRF52
Does anyone know if there has been any work in exposing the NFC type 4 tag interface of the nRF528240 within micropython?
Thanks
Rich
Thanks
Rich