Coder Social home page Coder Social logo

Comments (11)

makermelissa avatar makermelissa commented on August 16, 2024

Since it's been that way for 2 years without issue, it might be wise to just check for either value to avoid breaking it for others.

from adafruit_python_platformdetect.

ed-auvinet avatar ed-auvinet commented on August 16, 2024

from adafruit_python_platformdetect.

Foxelix avatar Foxelix commented on August 16, 2024

Prosím řeším následují problém na mém zařízení Orangepi 3 lts viz. chybové hlášení: Už jsem zkoušel několikrát přeinstalovat a upravit ...bohužel pořád se objevuje stejná chyba :

orangepi@orangepi3-lts:~$ /bin/python3 "/home/orangepi/Desktop/kontrola knihovny Adafruit_CircuitPython_PCF8574.py"
Traceback (most recent call last):
  File "/home/orangepi/Desktop/kontrola knihovny Adafruit_CircuitPython_PCF8574.py", line 2, in <module>
    import board
  File "/home/orangepi/.local/lib/python3.9/site-packages/board.py", line 351, in <module>
    raise NotImplementedError(
NotImplementedError: 
        Adafruit-PlatformDetect version 3.45.1 was unable to identify the board and/or
        microcontroller running the Linux platform. Please be sure you
        have the latest packages running:
        'pip3 install --upgrade adafruit-blinka adafruit-platformdetect'

Předem děkuji za pomoc a radu jak odstranit.
Zdá se že vaše poslední verze stále neobsahuje řešení pro orangepi 3 lts. našel jsem úpravy ale nevím jak přesně instalovat. Šlo by provést aktualizaci stávající verze? Děkuji moc

from adafruit_python_platformdetect.

makermelissa avatar makermelissa commented on August 16, 2024

Could either of you provide some more details such as the OS that you are running. If armbian, I'm surprised https://github.com/adafruit/Adafruit_Python_PlatformDetect/blob/main/adafruit_platformdetect/board.py#L359-L360 isn't detecting the Orange Pi Zero 2 and https://github.com/adafruit/Adafruit_Python_PlatformDetect/blob/main/adafruit_platformdetect/board.py#L341-L342 isn't detecting the Orange Pi 3 LTS.

If it's a different OS, place respond with the results of cat /proc/device-tree/model.

from adafruit_python_platformdetect.

Foxelix avatar Foxelix commented on August 16, 2024

Sorry I didn't list my OS.
My orange pi 3 lts runs Debian. I tried reinstalling and upgrading several times but it didn't help.
I will try the link to the code you provided to see if I can reinstall board.py

from adafruit_python_platformdetect.

kaangoksal avatar kaangoksal commented on August 16, 2024

@makermelissa

this is also not detected, I think this is a new batch of raspberry pis

(venv) pi@raspberrypi:~ $ uname -a
Linux raspberrypi 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l GNU/Linux

(venv) pi@raspberrypi:~ $ cat /proc/device-tree/model
Raspberry Pi 3 Model B Plus Rev 1.4(venv)
Traceback (most recent call last):
  File "/home/pi/project/src/main.py", line 7, in <module>
    from peripherals.LedController import LedController
  File "/home/pi/project/src/peripherals/LedController.py", line 2, in <module>
    import neopixel
  File "/home/pi/project/src/venv/lib/python3.9/site-packages/neopixel.py", line 16, in <module>
    import board
  File "/home/pi/project/src/venv/lib/python3.9/site-packages/board.py", line 351, in <module>
    raise NotImplementedError(
NotImplementedError: 
        Adafruit-PlatformDetect version 3.45.1 was unable to identify the board and/or
        microcontroller running the Linux platform. Please be sure you
        have the latest packages running:
        'pip3 install --upgrade adafruit-blinka adafruit-platformdetect'

>>> detector.board._pi_rev_code()
'a020d4'

from adafruit_python_platformdetect.

Foxelix avatar Foxelix commented on August 16, 2024

Even after installing patch 288, see your link, the problem with determining the SCK and SDA pins persists. Is it possible that changing the operating system would solve the problem? I'm using a whole bunch of libraries installed on my device, but most of the code is giving me an adafruit-blinka problem.
Please help.
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/orangepi/.vscode/extensions/ms-python.python-2023.6.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 39, in
cli.main()
File "/home/orangepi/.vscode/extensions/ms-python.python-2023.6.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/home/orangepi/.vscode/extensions/ms-python.python-2023.6.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="main")
File "/home/orangepi/.vscode/extensions/ms-python.python-2023.6.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
File "/home/orangepi/.vscode/extensions/ms-python.python-2023.6.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/orangepi/.vscode/extensions/ms-python.python-2023.6.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/home/orangepi/Desktop/test zarizeni imu senzor a gps.py", line 8, in
i2C = busio.I2C(5, board.SDA)
AttributeError: module 'board' has no attribute 'SDA'

from adafruit_python_platformdetect.

kaangoksal avatar kaangoksal commented on August 16, 2024

@Foxelix you can use the pin number instead of board.SDA

Which orange pi is this?

from adafruit_python_platformdetect.

Foxelix avatar Foxelix commented on August 16, 2024

So I reinstalled a new Debian system. Installed all necessary libraries. Including adafruit blinka. Unfortunately, I still have the problem that "DigitalIout" is not defined. I also installed pull 288, just everything and I don't know what the problem could be :(

orangepi@orangepi3-lts:~$ /bin/python3 "/home/orangepi/Desktop/test zařízení imu senzor a gps.py"
Traceback (most recent call last):
File "/home/orangepi/Desktop/test zařízení imu senzor a gps.py", line 5, in
import adafruit_bmp280
File "/usr/local/lib/python3.9/dist-packages/adafruit_bmp280.py", line 475, in
class Adafruit_BMP280_SPI(Adafruit_BMP280):
File "/usr/local/lib/python3.9/dist-packages/adafruit_bmp280.py", line 520, in Adafruit_BMP280_SPI
def init(self, spi: SPI, cs: DigitalInOut, baudrate=100000) -> None:
NameError: name 'DigitalInOut' is not defined

from adafruit_python_platformdetect.

makermelissa avatar makermelissa commented on August 16, 2024

To reiterate:

The original issue was about boards with the following chipsets not being detected in the self._allwinner_variants_id() function:

  • H5
  • H616

This was noticed on the Orange Pi Zero 2 with the H616 specifically, though I'm not sure which OS this was on.

The issue has sort of expanded about possibly adding better detection for boards not running Armbian which are using the self._armbian_id() function. This includes boards with the following detected chipsets:

  • SUN4I
  • SUN7I
  • A10
  • A20
  • H6
  • D1_RISCV

The board mentioned was the Orange Pi 3 LTS with the H6 running Debian.

Is it possible that changing the operating system would solve the problem?

I think for the Orange Pi 3 LTS, it was specifically added for running Armbian.

The Raspberry Pi 3 was an unrelated issue and was already addressed in #291.

A lot of the issues mentioned here stem from certain boards working only with a certain OS and no easy way to determine which OS it was tested with for the average user. Perhaps a markdown page that lists the OS that the board was tested with may be helpful. I'll try and bring this up in the CircuitPython meeting today.

For now though, improving on the allwinner_variants seems like a good solution and perhaps it could supplant the armbian_id function altogether so that it works on more systems.

from adafruit_python_platformdetect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.