Blinka digitalio wont work

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Insert_Name_Here
 
Posts: 64
Joined: Tue Dec 07, 2021 2:35 pm

Blinka digitalio wont work

Post by Insert_Name_Here »

I am using a Raspberry Pi 3 B. I ran the install script at this url https://learn.adafruit.com/circuitpytho ... spberry-pi. It finished fine, I said not to reboot. Then I unplugged/plugged in the pi. It rebooted, I sshed in, then ran the Blinka Test script. I got

Code: Select all

Traceback (most recent call last):
  File "/home/james/blinkatest.py", line 8, in <module>
    pin = digitalio.DigitalInOut(board.D4)
AttributeError: module 'digitalio' has no attribute 'DigitalInOut'
Running "print(dir(digitalio))" gives

Code: Select all

['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']
I have no clue why, any help would be appreciated, Thanks.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Blinka digitalio wont work

Post by mikeysklar »

The instructions use sudo python3 and sudo pip3.

When you went to run the blinkatest.py script how did you execute it?

Did you use:

Code: Select all

sudo python3 ./blinkatest.py
I believe that will be necessary based on the install being done with sudo / python3.

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

Return to “Adafruit CircuitPython”