0

Seeking Definitive Instructions for CircuitPython on RPi
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Seeking Definitive Instructions for CircuitPython on RPi

by sfarber5300 on Wed Dec 12, 2018 4:08 pm

I have been trying to get this going so that I can complete a project involving the Adafruit SI7021 and/or MCP9808 sensors. So far, I have had no success. I started over from scratch, but had no better success. So I can only conclude that I have incomplete information.

Here is my question: Starting from a fresh install of Raspbian Stretch Complete that has been updated and upgraded, what comes next, in order, to load a Raspberry Pi (in my case a ZeroWH), to interact with Adafruit's circuit boards?

This is a real world thing that I need to finish successfully for monitoring and reporting failures of refrigeration equipment.

Many thanks in advance.

- Steve

sfarber5300
 
Posts: 43
Joined: Sun Mar 26, 2017 2:01 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by millercommamatt on Wed Dec 12, 2018 4:33 pm


millercommamatt
 
Posts: 364
Joined: Tue Jul 31, 2018 4:57 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by sfarber5300 on Wed Dec 12, 2018 5:40 pm

Thank you. I'll give it a whirl and let you know how it turns out.

Cheers!

sfarber5300
 
Posts: 43
Joined: Sun Mar 26, 2017 2:01 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by sfarber5300 on Thu Dec 13, 2018 12:56 pm

I have followed the instructions provided, but when I try to run the test program(s) it fails due to the absence of the imported modules board, digitalio and busio. I have tried to install them via pip3, but they are apparently unavailable. "board" seems to install what it calls V.0.0.0, but then is missing in action when trying the script in Python.

Neither program, blinkatest.py nor si7021_simpletest.py will run due to the missing modules. Also, when running the main pip3 setup, there were a lot of errors, some of them embedded within other errors. I could not save the console output working via SSH using Putty

I expected to have this running by now. The Adafruit website seems to think that this should take 15 minutes, but the pip3 process takes at least 2 hours and is still incomplete.

More assistance is needed to get this working. Any takers?

sfarber5300
 
Posts: 43
Joined: Sun Mar 26, 2017 2:01 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by jerryn on Thu Dec 13, 2018 1:09 pm

Just a suggestion.
Did you run the step
Code: Select all | TOGGLE FULL SIZE
pip3 install adafruit-blinka

This is what would provide modules like "board and digitalio and buiso"
They are not installed individually via pip3

You can run the command:
Code: Select all | TOGGLE FULL SIZE
pip3 list

to see what you have installed -- it may help to do that and post the results here.

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

Re: Seeking Definitive Instructions for CircuitPython on RPi

by sfarber5300 on Thu Dec 13, 2018 1:28 pm

'pip3 list > filename' created a file for me with the complete list, but I don't know how to transfer it back to the machine I'm using to SSH into the Pi with.

When I examine the list, none of the modules that are needed are listed except 'board' which is apparently an empty place-keeper.

Anyway, I'm still stuck and need more detailed assistance if available.

sfarber5300
 
Posts: 43
Joined: Sun Mar 26, 2017 2:01 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by adafruit_support_carter on Thu Dec 13, 2018 2:15 pm

To use CircuitPython libraries on a Raspberry Pi you need to install blinka. That guide linked above should walk you through the process.

Also, when running the main pip3 setup, there were a lot of errors

It sounds like something didn't work during the installation of blinka. Do you remember which step of the setup process you got all the error messages on?

adafruit_support_carter
 
Posts: 11681
Joined: Tue Nov 29, 2016 2:45 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by millercommamatt on Thu Dec 13, 2018 2:18 pm

When you tried to install adafruit-blinka, did you receive a "successfully installed" message?

millercommamatt
 
Posts: 364
Joined: Tue Jul 31, 2018 4:57 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by sfarber5300 on Thu Dec 13, 2018 3:21 pm

pip3list.txt
This is the complete list of installed modules (?) from pip3.
(1.69 KiB) Downloaded 16 times
adafruit_support_carter wrote:To use CircuitPython libraries on a Raspberry Pi you need to install blinka. That guide linked above should walk you through the process.

Also, when running the main pip3 setup, there were a lot of errors

It sounds like something didn't work during the installation of blinka. Do you remember which step of the setup process you got all the error messages on?



The place where all of the errors occurred was the main script that goes: pip3 freeze - local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U

sfarber5300
 
Posts: 43
Joined: Sun Mar 26, 2017 2:01 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by danhalbert on Thu Dec 13, 2018 3:24 pm

sfarber5300 wrote:'pip3 list > filename' created a file for me with the complete list, but I don't know how to transfer it back to the machine I'm using to SSH into the Pi with.


The `scp` command transfers files over ssh, in either direction. So you should be able to use `scp` from the host while also being logged in via ssh.

danhalbert
 
Posts: 1692
Joined: Tue Aug 08, 2017 12:37 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by sfarber5300 on Thu Dec 13, 2018 3:28 pm

jerryn wrote:Just a suggestion.
Did you run the step
Code: Select all | TOGGLE FULL SIZE
pip3 install adafruit-blinka

This is what would provide modules like "board and digitalio and buiso"
They are not installed individually via pip3

You can run the command:
Code: Select all | TOGGLE FULL SIZE
pip3 list

to see what you have installed -- it may help to do that and post the results here.


Yes, I ran this. It seems to complete without error, however the needed modules are not in the pip3 list.
Attachments
pip3list.txt
(1.69 KiB) Downloaded 20 times

sfarber5300
 
Posts: 43
Joined: Sun Mar 26, 2017 2:01 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by jerryn on Thu Dec 13, 2018 3:33 pm

board, digitalio and busio will not show up in the pip3 list -- they are part of adafruit-blinka which is installed.

What error do you get then you run blinkatest.py?

the module "board" that you installed via pip3 has nothing to do with CircuitPython. perhaps it is causing some conflict -- I suggest removing it.

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

Re: Seeking Definitive Instructions for CircuitPython on RPi

by sfarber5300 on Thu Dec 13, 2018 3:41 pm

jerryn wrote:board, digitalio and busio will not show up in the pip3 list -- they are part of adafruit-blinka which is installed.

What error do you get then you run blinkatest.py?

the module "board" that you installed via pip3 has nothing to do with CircuitPython. perhaps it is causing some conflict -- I suggest removing it.



is the "import board" statement a placekeeper for a specific python module, eg, si7021*.mpy?

sfarber5300
 
Posts: 43
Joined: Sun Mar 26, 2017 2:01 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by adafruit_support_carter on Thu Dec 13, 2018 3:44 pm

board is part of blinka.

What error do you get when you run blinkatest.py?


Seeing what you get here will help explain what's broken.

adafruit_support_carter
 
Posts: 11681
Joined: Tue Nov 29, 2016 2:45 pm

Re: Seeking Definitive Instructions for CircuitPython on RPi

by jerryn on Thu Dec 13, 2018 3:47 pm

just a warning -- when you get past blinkatest -- you will want to install:
pip3 install adafruit-circuitpython-si7021
that will install the necessary module for the sensor
you don't use the .mpy files on a raspberry pi

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

Please be positive and constructive with your questions and comments.