unknown Platform with adafruit_python_dht

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
aemm2019
 
Posts: 2
Joined: Sat Jun 01, 2019 1:12 pm

unknown Platform with adafruit_python_dht

Post by aemm2019 »

Hello,

on my manjaro raspi3 b+ (Linux-5.1.5-1-MANJARO-ARM-aarch64-with-arch) after installation I always get

[..]Adafruit_DHT/common.py", line 63, in get_platform
raise RuntimeError('Unknown platform.')

is adafruit not made for manjaro ARM ?

If so .. Why ?

BR,
A.Emm

User avatar
aemm2019
 
Posts: 2
Joined: Sat Jun 01, 2019 1:12 pm

Re: unknown Platform with adafruit_python_dht

Post by aemm2019 »

in platform_detect.py I can see the following lines:

Code: Select all

with open('/proc/cpuinfo', 'r') as infile:
        cpuinfo = infile.read()
    # Match a line like 'Hardware   : BCM2709'
    match = re.search('^Hardware\s+:\s+(\w+)$', cpuinfo,
                      flags=re.MULTILINE | re.IGNORECASE)
    if not match:
        # Couldn't find the hardware, assume it isn't a pi.
        return None
    if match.group(1) == 'BCM2708':
        # Pi 1
        return 1
    elif match.group(1) == 'BCM2709':
        # Pi 2
        return 2
    elif match.group(1) == 'BCM2835':
        # Pi 3
        return 3
    elif match.group(1) == 'BCM2837':
        # Pi 3b+
        return 3
in my case cpuinfo is expected to contain a line with "BCM2837".. on my manjaro arm cpuinfo looks like that:

Code: Select all

[root@rasp3 examples]# cat /proc/cpuinfo 
processor	: 0
BogoMIPS	: 38.40
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4


this is strange. and I mean the detection mechanism. It works only on special distributions ?

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: unknown Platform with adafruit_python_dht

Post by Franklin97355 »

Try downloading Raspbian from the Pi foundation site and see if that works. Our code works with Raspbian, other distro may be reporting differently and you may need to modify the code to accommodate that.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”