0

matrixportal code wifi & BLE
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

matrixportal code wifi & BLE

by Rebtop on Fri Apr 29, 2022 2:47 pm

I am using sample code from ScoreBoard Matrixportal.
I want to change the input from WIFI to BLE
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I am getting:
Traceback (most recent call last):
File "code.py", line 60, in <module>
File "adafruit_matrixportal/matrixportal.py", line 110, in __init__
File "adafruit_matrixportal/network.py", line 66, in __init__
File "adafruit_portalbase/wifi_coprocessor.py", line 57, in __init__
ValueError: ESP_BUSY in use
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This is the code causing the conflict.
from adafruit_matrixportal.matrixportal import MatrixPortal
# --- Display setup ---
matrixportal = MatrixPortal(status_neopixel=board.NEOPIXEL, debug=False) >>>>> line 60

# ble
from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.nordic import UARTService

from adafruit_airlift.esp32 import ESP32

esp32 = ESP32() # DEFAULT

adapter = esp32.start_bluetooth()

ble = BLERadio(adapter)
uart = UARTService()
advertisement = ProvideServicesAdvertisement(uart)

Wonderful support when i needed it.
I cannot get by this issue now.

Bob

Rebtop
 
Posts: 106
Joined: Fri Jan 31, 2020 9:25 pm

Re: matrixportal code wifi & BLE

by mikeysklar on Sat Apr 30, 2022 6:48 pm

Bob,

The MatrixPortal Scoreboard is tailored to use the WiFi and and adafruit IO. That is not a guide that will be helpful in using the BLE interface with the MatrixPortal.

You will have to build up from the BLE example code.

https://learn.adafruit.com/adafruit-mat ... -3085843-9

mikeysklar
 
Posts: 7777
Joined: Mon Aug 01, 2016 8:10 pm

Re: matrixportal code wifi & BLE

by Rebtop on Sun May 08, 2022 9:17 am

Hello Mike

I did base my code on the example you suggested.
The problem is the MatrixPortal code (import) for the matrix display is in conflict with the example code.
I can get the display to work fine, without the MatrixPortal code but that code gives me much more control ( scroll speed for example)

The MatrixPortal not initializing correctly seems to be the problem. The error is posted, is the result of integrating BLE code with MatrixPortal code.

The issue may have to do with the version i have loaded. In another post i described an issue with updating the firmware, as recommended in the link you provided. It did not work for me. I will try again and document the process.

Thanks

Rebtop
 
Posts: 106
Joined: Fri Jan 31, 2020 9:25 pm

Re: matrixportal code wifi & BLE

by Rebtop on Sun May 08, 2022 10:09 am

Mike
Is something missing with the update firmware instructions?
I copied the Passthru UF2 file to the bootloader as directed. It ends there.
It does disappear as suggested but NO comm or serial port is displayed after for me to copy and move to the next step.
I have an older version of the firmware and i am not able to update it per instructions given.
Can someone verify these instructions and update them, if necessary? And give additional instructions if everything fails?

Bob

Rebtop
 
Posts: 106
Joined: Fri Jan 31, 2020 9:25 pm

Re: matrixportal code wifi & BLE

by Rebtop on Sun May 08, 2022 11:43 am

MIke
This is where the instructions break down.
_____________________________________

wireless_Screenshot_9_26_19__2_51_PM.png
The lights should flash again, BOOT will disappear. It should re-enumerate USB and appear as a COM or Serial port on your computer. Make a note of the serial port by checking the Device Manager (windows) or typing ls /dev/cu* or /dev/tty* (Mac or Linux) in a terminal.

________________________________________

>>>> I never get to this point
If you see your board listed in the terminal: Proceed to the Uploading nina-fw with esptool section of this page.

wireless_fish___Users_brent__fish_.png

Rebtop
 
Posts: 106
Joined: Fri Jan 31, 2020 9:25 pm

Re: matrixportal code wifi & BLE

by mikeysklar on Sun May 08, 2022 6:20 pm

Bob,

Let's make sure we are talking about the same passthru code.

Are you running this MatirxPortal_ESP32_Passtru.UF2 image?

https://cdn-learn.adafruit.com/assets/a ... 1603232904

After you drop the UF2 image on the BOOT drive what does happen? Are you on a Windows machine or other platform?

mikeysklar
 
Posts: 7777
Joined: Mon Aug 01, 2016 8:10 pm

Re: matrixportal code wifi & BLE

by Rebtop on Mon May 09, 2022 12:02 pm

Mike
Same file. I copied it again from your link and it is ...(1).UF2
I drop the correct file into the boot, same as the normal UF2. The comm port is not displayed per instructions. I downloaded the Bin for the next step.
But there is no next step. and i cannot find the directory as per the instructions.

The M4 does not do anything. I have to reset it and reload CircuitPy.
The computer is my Raspberry Pi 4

There has to be something missing....

Bob

Rebtop
 
Posts: 106
Joined: Fri Jan 31, 2020 9:25 pm

Re: matrixportal code wifi & BLE

by mikeysklar on Mon May 09, 2022 4:03 pm

Bob,

Is your Pi4 running the graphical desktop? I know there is some magical automounting that happens with the graphical desktop that might not be there to remount the drive correctly on a Pi OS Lite console installation.

You are scanning the /dev directory with `ls` to confirm the device names before and after the PASSTHRU image has been dropped on the matrixportal?

Have you tried using the passthru image on another machine (MacOS, Linux Desktop, Windows, etc)?

mikeysklar
 
Posts: 7777
Joined: Mon Aug 01, 2016 8:10 pm

Re: matrixportal code wifi & BLE

by Rebtop on Wed May 18, 2022 4:33 pm

Mike

I was a big hardware guy. I am new to this environment and it is intimidating.

Do you have contractors available to assist on a fee basis?

Bob

Rebtop
 
Posts: 106
Joined: Fri Jan 31, 2020 9:25 pm

Re: matrixportal code wifi & BLE

by mikeysklar on Wed May 18, 2022 8:11 pm

Bob,

This might help. You can post the job you are looking to hire someone for.

https://jobs.adafruit.com/

mikeysklar
 
Posts: 7777
Joined: Mon Aug 01, 2016 8:10 pm

Re: matrixportal code wifi & BLE

by Rebtop on Wed May 18, 2022 10:20 pm

Thanks. Let me try it.

Bob

Rebtop
 
Posts: 106
Joined: Fri Jan 31, 2020 9:25 pm

Please be positive and constructive with your questions and comments.