Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

Using CircuitPython with the SparkFun Pro Mini board
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Using CircuitPython with the SparkFun Pro Mini board

by marpie on Mon Mar 16, 2020 8:48 am

Hi,

(I hope that I've created this Topic in the Right Location)

I'm trying to work with the Pro Mini on a Bluetooth Project using CircuitPython. I started with the tutorial provided by sparkfun (https://learn.sparkfun.com/tutorials/nr ... python/all). Despite that the board has no Attribute named board.P0_07 or board.P0_13, I figured out that there are instead the Attributes board.LED0 and board.BUTTON0. In the end, i can now toggle the LED on and off using the button on the Pro Mini.

The next step I'm trying to take, is to make a small BluetoothLE application using CircuitPython. The Problem now is, that the librarys for that aren't already installed on the chip. So reading the first line of the Python REPL:
Adafruit CircuitPython 4.1.2 on 2019-12-18; SparkFun Pro nRF52840 Mini with nRF52840

states, that it uses the 4.X.X Release of CircuitPython. After downloading the 4.X.X Release from https://github.com/adafruit/Adafruit_Ci ... E/releases I transfered the following modules to the lib Folder:
  • adafruit_ble
  • adafruit_bluefruit_connect
With that I did a Restart of the board and tried to Import modules in the REPL but got the following Errors:

Code: Select all | TOGGLE FULL SIZE
>>> from adafruit_ble import BLERadio
  File "<stdin>", Line 1, in <module>
  File "adafruit_ble/__init__.py", Line 33, in <module>
ImportError: This release is not compatible with CircuitPython 4.x; use library release 1.x.x


Code: Select all | TOGGLE FULL SIZE
from adafruit_ble.services.nordic import UARTService
  File "<stdin>", Line 1, in <module>
  File "adafruit_ble/services/__init__.py", Line 28, in <module>
ImportError: No module with name '_bleio'


Can anyone help me with those Errors? I'm not sure whats exactly missing or wrong. For example the first error states, that i should use release 1.x.x, but first of all the CircuitPython REPL states there is Version 4.X.X installed.

Best regards and thanks in Advance for any help,
Marco Piechotta

(The selected Imports are used in this tutorial: https://learn.adafruit.com/circuitpytho ... tton-press)

marpie
 
Posts: 2
Joined: Mon Mar 16, 2020 8:38 am

Re: Using CircuitPython with the SparkFun Pro Mini board

by jerryn on Mon Mar 16, 2020 9:09 am

You should upgrade to CP 5.0.0 in order to use BLE
you can get it here https://circuitpython.org/board/sparkfun_nrf52840_mini/

jerryn
 
Posts: 1248
Joined: Sat Sep 14, 2013 9:05 am

Re: Using CircuitPython with the SparkFun Pro Mini board

by marpie on Mon Mar 16, 2020 9:30 am

Hi jerryn,

thanks alot. that just solved the problem.
I hate those kind of simple problems but also i love them for being fixed that quickly :/

so this Topic can already be closed.

Best regards,
Marco

marpie
 
Posts: 2
Joined: Mon Mar 16, 2020 8:38 am

Please be positive and constructive with your questions and comments.