Coder Social home page Coder Social logo

adafruit_circuitpython_bundle's Introduction

Adafruit CircuitPython Library Bundle

Documentation Status

Discord

Build Status

Code Style: Black

This repo bundles a bunch of useful CircuitPython libraries into an easy to download zip file. CircuitPython boards can ship with the contents of the zip to make it easy to provide a lot of libraries by default.

Use

To use the bundle download the zip (not source zip) from the latest release, unzip it and copy over the subfolders, such as lib, into the root of your CircuitPython device. Make sure to indicate that it should be merged with the existing folder when it exists.

CPython

DO NOT use this to install libraries on a Linux computer, such as the Raspberry Pi, with regular Python (aka CPython). Instead, use the python3 version of pip to install the libraries you want to use. It will automatically install dependencies for you. For example:

pip3 install adafruit-circuitpython-lis3dh

Development

After you clone this repository you must run git submodule init and then git submodule update.

For developing individual libraries, please see LIBRARY_DEVELOPMENT.rst.

Updating libraries

To update the libraries run update-submodules.sh. The script will fetch the latest code and update to the newest tag (not main).

To find libraries with commits that haven't been included in a release do:

git submodule foreach "git log --oneline HEAD...origin/main"

Adding a library

Determine the best location within libraries (libraries/drivers/ or libraries/helpers/)for the new library and then run:

git submodule add <git url> libraries/<target directory>

The target directory should omit any CircuitPython specific prefixes such as adafruit-circuitpython to simplify the listing.

Removing a library

Only do this if you are replacing the module with an equivalent:

git submodule deinit libraries/<target directory>
git rm libraries/<target directory>

Building the bundle

To build this bundle locally you'll need to install the circuitpython-build-tools package.

python3 -m venv .venv
source .venv/bin/activate
pip install circuitpython-build-tools

Once installed, make sure you are in the virtual environment:

source .venv/bin/activate

Then run the build:

circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bundle --library_location libraries --library_depth 2

adafruit_circuitpython_bundle's People

Contributors

3mp3ri0r avatar adafruit-adabot avatar blitzcitydiy avatar brennen avatar brentru avatar caternuson avatar dastels avatar davclark avatar deanm1278 avatar dhalbert avatar evaherrada avatar foamyguy avatar george-hawkins avatar jepler avatar jerryneedell avatar jposada202020 avatar justmobilize avatar kattni avatar ladyada avatar lesamouraipourpre avatar makermelissa avatar mrmcwethy avatar prcutler avatar process1183 avatar siddacious avatar sommersoft avatar tannewt avatar tdicola avatar tekktrik avatar woolseyj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit_circuitpython_bundle's Issues

Cannot build bundle, missing make process.

Need help concerning building the CircuitPython_Bundle. I have been able to get the source code from GitHub. When I run build-bundle.py, the process fails to find/execute ["make"]. Where should that program be and where should I install make from? See below at the run log.

This was run at a windows command prompt. command "make" is not a known command. I also have a Vagrant ubuntu VM and "make" does exist there. Unfortunately, Python is 2.7.6. Should I be using the VM instead of Window command prompt.

C:\Users\Mike\Documents\CircuitPlayground\source\Adafruit\Adafruit_CircuitPython_Bundle>python -V
Python 3.5.1

C:\Users\Mike\Documents\CircuitPlayground\source\Adafruit\Adafruit_CircuitPython_Bundle>python build-bundle.py run
Traceback (most recent call last):
File "build-bundle.py", line 33, in
make = subprocess.run(["make"])
File "C:\Users\Mike\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 696, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\Mike\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 950, in init
restore_signals, start_new_session)
File "C:\Users\Mike\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 1220, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

C:\Users\Mike\Documents\CircuitPlayground\source\Adafruit\Adafruit_CircuitPython_Bundle>

SD card module error with Circuit Python 4.0.2

Hello, I am trying to use a micro sd card with a breakout and the Feather M0 Express.

I have verified I am running Circuit Python 4.0.2, and I have the bundle-4.x

I get this error when I try to import the module:

>>> import adafruit_sdcard
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_sdcard.py", line 60, in <module>
MpyError: Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info.
>>> 

error executing update-submodules

When I run ./update-submodules.sh I get an error in tls2561
the build then also produces errors for tls2561 - but that is not surprising if this fails
Any suggestions?

jerryneedell@Ubuntu-Macmini:~/projects/adafruit_github/Adafruit_CircuitPython_Bundle$ ./update-submodules.sh 
Entering 'circuitpython'
Entering 'libraries/drivers/bme280'
Entering 'libraries/drivers/bme680'
Entering 'libraries/drivers/bmp280'
Entering 'libraries/drivers/bno055'
Entering 'libraries/drivers/ccs811'
Entering 'libraries/drivers/circuitplayground'
Entering 'libraries/drivers/dht'
Entering 'libraries/drivers/dotstar'
Entering 'libraries/drivers/ds3231'
Entering 'libraries/drivers/ht16k33'
Entering 'libraries/drivers/is31fl3731'
Entering 'libraries/drivers/lis3dh'
Entering 'libraries/drivers/max31855'
Entering 'libraries/drivers/max7219'
Entering 'libraries/drivers/mcp9808'
Entering 'libraries/drivers/mpr121'
Entering 'libraries/drivers/neopixel'
Entering 'libraries/drivers/pca9685'
Entering 'libraries/drivers/pcf8523'
Entering 'libraries/drivers/rgb-display'
Entering 'libraries/drivers/sdcard'
Entering 'libraries/drivers/si7021'
Entering 'libraries/drivers/ssd1306'
Entering 'libraries/drivers/thermistor'
Entering 'libraries/drivers/tsl2561'
Entering 'libraries/helpers/bus_device'
Entering 'libraries/helpers/hid'
Entering 'libraries/helpers/register'
Entering 'libraries/helpers/rtttl'
Entering 'libraries/helpers/simpleio'
Entering 'libraries/helpers/waveform'
Entering 'circuitpython'
Entering 'libraries/drivers/bme280'
Entering 'libraries/drivers/bme680'
Entering 'libraries/drivers/bmp280'
Entering 'libraries/drivers/bno055'
Entering 'libraries/drivers/ccs811'
Entering 'libraries/drivers/circuitplayground'
Entering 'libraries/drivers/dht'
Entering 'libraries/drivers/dotstar'
Entering 'libraries/drivers/ds3231'
Entering 'libraries/drivers/ht16k33'
Entering 'libraries/drivers/is31fl3731'
Entering 'libraries/drivers/lis3dh'
Entering 'libraries/drivers/max31855'
Entering 'libraries/drivers/max7219'
Entering 'libraries/drivers/mcp9808'
Entering 'libraries/drivers/mpr121'
Entering 'libraries/drivers/neopixel'
Entering 'libraries/drivers/pca9685'
Entering 'libraries/drivers/pcf8523'
Entering 'libraries/drivers/rgb-display'
Entering 'libraries/drivers/sdcard'
Entering 'libraries/drivers/si7021'
Entering 'libraries/drivers/ssd1306'
Entering 'libraries/drivers/thermistor'
Entering 'libraries/drivers/tsl2561'
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
  limiting output:
    --max-count=<n>
    --max-age=<epoch>
    --min-age=<epoch>
    --sparse
    --no-merges
    --min-parents=<n>
    --no-min-parents
    --max-parents=<n>
    --no-max-parents
    --remove-empty
    --all
    --branches
    --tags
    --remotes
    --stdin
    --quiet
  ordering output:
    --topo-order
    --date-order
    --reverse
  formatting output:
    --parents
    --children
    --objects | --objects-edge
    --unpacked
    --header | --pretty
    --abbrev=<n> | --no-abbrev
    --abbrev-commit
    --left-right
    --count
  special purpose:
    --bisect
    --bisect-vars
    --bisect-all
Entering 'libraries/helpers/bus_device'
Entering 'libraries/helpers/hid'
Entering 'libraries/helpers/register'
Entering 'libraries/helpers/rtttl'
Entering 'libraries/helpers/simpleio'
Entering 'libraries/helpers/waveform'

pip3 install adafruit-circuitpython-lis3dh

i am raspberry user , i want to take picture using vc0706
in the readme, it said that raspberry user use pip3 install adafruit-circuitpython-lis3dh command
so i tried to use commandpip install adafruit-circuitpython-vc0706 and then i faced problem

the message is Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-8vbumd7p/Adafruit-GPIO/

Collecting Adafruit-GPIO (from Adafruit-Blinka->adafruit-circuitpython-vc0706)
  Using cached https://files.pythonhosted.org/packages/db/1c/2dc8a674514219f287fa344e44cadfd77b3e2878d6ff602a8c2149b50dd8/Adafruit_GPIO-1.0.3.tar.gz
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
    Traceback (most recent call last):
      File "/usr/local/lib/python3.4/dist-packages/ez_setup.py", line 143, in use_setuptools
        raise ImportError
    ImportError

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-gi0womhp/Adafruit-GPIO/setup.py", line 4, in <module>
        use_setuptools()
      File "/usr/local/lib/python3.4/dist-packages/ez_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "/usr/local/lib/python3.4/dist-packages/ez_setup.py", line 124, in _do_download
        to_dir, download_delay)
      File "/usr/local/lib/python3.4/dist-packages/ez_setup.py", line 193, in download_setuptools
        src = urlopen(url)
      File "/usr/lib/python3.4/urllib/request.py", line 153, in urlopen
        return opener.open(url, data, timeout)
      File "/usr/lib/python3.4/urllib/request.py", line 461, in open
        response = meth(req, response)
      File "/usr/lib/python3.4/urllib/request.py", line 571, in http_response
        'http', request, response, code, msg, hdrs)
      File "/usr/lib/python3.4/urllib/request.py", line 499, in error
        return self._call_chain(*args)
      File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
        result = func(*args)
      File "/usr/lib/python3.4/urllib/request.py", line 579, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 403: SSL is required

i searched that message and found the a few solution
so i upgraded setuptool,pip...
but the problem keep occurred
how can i solve the problem?

Exact location to copy files of circuitPython Bundle

To use the bundle download the zip (not source zip) from the latest release, unzip it and copy over the subfolders, such as lib, into the root of your CircuitPython device. Make sure to indicate that it should be merged with the existing folder when it exists.

@ladyada
Hi! i am working on nvidia jetson TX2 and i want to use circuit python. The information provided to install the circuit python files do not confirms exact location . There are 2 to 3 lib folders, in which lib folder you i copy all these files . please mention it.
Q2: As i want to use adafruit pca9685 for servo control. please also explain this line
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bundle --library_location libraries --library_depth 2

As i am using Nvidia jetson TX2 with connecting Adafruit pca9685, will this library help me in controlling my servos on PWM in python?.. kindly answer !!
regards rose

Empty file

There is an led_animation_simpletest.py with 0 Bytes in the newest 4.0 release. Where does it come from?

adafruit_ssd1306 throws ImportError on framebuf import

CircuitPython 2.0, Feather M0 Adalogger, OLED FeatherWing.

code.py output:
Traceback (most recent call last):
File "code.py", line 26, in
File "/lib/adafruit_ssd1306/init.py", line 1, in
File "libraries/drivers/ssd1306/adafruit_ssd1306/ssd1306.py", line 3, in
ImportError: no module named 'framebuf'

Default 12c addresses for pca9685.py and motor.py are different.

Not sure if this is an issue, or just an oddity. the default address of the pca9685 breakout is 0x40. This is reflected in pca9685.py. The learning system documents also show that is the default for the featherwing (https://learn.adafruit.com/adafruit-8-channel-pwm-or-servo-featherwing/pinouts).

In motor.py the code is trying to set up the motors up on 0x60. This was throwing an error for me until JerryN showed me how to override that to 0x40. I'm not sure if this is a bug or just something I'm looking at wrong, but thought I would mention it just in case.

Rename folder in zip

Right now its build_adafruit_circuitpython_bundle_4.x_mpy_20181026. Lets rename to adafruit-circuitpython-bundle-4.x-mpy-20181026 to match the zip file name.

Random Thanks for the FastLED port to python

I know Issues aren't the correct place for such feedback, but lacking an alternative at all, thought I'd throw out a big "thanks" to whomever did the FastLED port to python. I needed just the palette code and that's part of what was done, so it was perfect for my needs!

Finding latest release assumes latest tag is on master

I believe the current way of finding the latest tag in update-submodules.sh will find the latest tag on any branch, not just on master. For libraries, we never tag other than on master, but some day, we might. (We tag on branches in https://github.com/adafruit/circuitpython, for instance.)

For many suggestions about finding the latest tag on a branch, see https://stackoverflow.com/questions/1404796/how-to-get-the-latest-tag-name-in-current-branch-in-git

Update tags for libraries that contain i2c_device.readinto

Also remove bus_device.I2CDevice.read_into()

Not sure the process. In the Adafruit Bundle project

  1. git submodule foreach "git checkout master"
  2. git submodule foreach "git pull"
  3. python3 build-bundle.py
  4. using the resultant lib/.zip file with .mpy file, for each library of interest, create a small .zip containing the .mpy file or subdirectory
  5. create a new release (i.e., new tag) for each library of interest using the above .zip

Remove Use of __init__.py Where Possible

From discussion on Discord, it was decided we need to move away from having __init__.py files in every repo. This was previously required (I'm told), and is a CPython 2.x remnant.

There are non-empty __init__.py files in a few repos. Will need to investigate if they have code that needs/can be to moved, before deleting. They are:

  • Thermal Printer

  • RGB Display

  • Character LCD

The other non-empty files only contain comments (license info, descriptions).

Incorrect Link/Submodule

Rolling through the doc updates, I discovered that the drivers/ds18x20 module link points to Adafruit_CirctuitPython_OneWire. While a DS18x20 is a OneWire device, it does have it's own library...

MS Paint screenshot...
ds18x20_onewire_mixup

The hash listed on drivers/ds18x20 matches the last commit to OneWire.

3 days ago (from current writing), adabot updated OneWire twice using the same 3 PRs...not sure if that's the culprit, just the only thing I found out of the ordinary looking through the history.

Update read me with new name build-bundles

The read me still refers to ./build-bundle.py
Shouldn’t it be ./build-bundles.py now?
BTW - I ran it and it work fine when I answered "y" to the tag question. I assume that is the way to go if I don't want to create a new tag.

pip3* install circuitpython-build-tools

The Readme.md specifies

"pip install circuitpython-build-tools" but this returns: No matching distribution fund for circuitpython-build-tools. It should be, I believe:

"pip3 install circuitpython-build-tools"

Add adafruit_ds3231 to the bundle

Is the DS3221 driver ready for prime time? The Circuit API document has reference to DS3221 but it is not in the current bundle. Is there something I can do to get adafruit_ds3231 into the current bundle?

Sort libraries by github topic on list

It's awesome that this list is auto-updated: https://github.com/adafruit/Adafruit_CircuitPython_Bundle/blob/master/circuitpython_library_list.md

However, it's not as useful the manually updated driver page because it gives more detail. https://circuitpython.readthedocs.io/projects/bundle/en/latest/drivers.html

Could we use the repo description and topics of each to make the auto-generated list more useful? That would give us reason to have good repo metadata too.

Verify new submodules are released

Travis doesn't verify that new submodules are added at commits that match release tags. When they aren't, Adabot will update them to the latest release which may have been a broken state.

Put cpx, crickit, and other always-frozen libs in another directory to save RAM

We recently ran a hacking session with CPX's. People had lib/ directories on their CPX's, because they were using adafruit_irremote. As a result, they were getting the non-frozen version of adafruit_circuitplayground, and were running out of memory. We had to tell them to remove that lib from the lib/ directory, so they could use the frozen versions instead

This is a common support issue. The workaround may already be documented, but it's one of a long list of things to know in the Guides. Suppose we made getting the frozen versions more automatic. There are several ways to do this, but the main thing is to move those libs off sys.path or put them in a directory after .frozen on the path.

  1. There could be a libextra or a libfrozen or libopt directory, which would contain only adafruit_circuitplayground and adafruit_crickit libraries, since they are always frozen in on the boards those specific boards.
  2. We could have multiple .zip files, with some targeted towards particular boards, just like we have multiple .uf2 files. That would allow moving other frozen libs (like NeoPixel) into the secondary `lib directory.
  3. There could be a single master zip with multiple folders (e.g., lib-cpx, lib-cpx-crickit), some of which had the frozen libs removed, and the user would select the right one to copy.

In the list above, I kind of like 2 best, but let's discuss.

Another related idea, which solves a different problem (not this issue) is to include the mpy version in the name, like lib2, lib3, etc. and customize sys.path accordingly in the build. That helps solves the major-version update problem.

tagging:
@kattni (who was at this session)
@tannewt
@ladyada

Bundle points to non-existent commit

I don't know if this arises from a bot autoupdating, but currently my bundle reports the following...

cefn-bionic-thinkpad:Adafruit_CircuitPython_Bundle$ git submodule update
error: Server does not allow request for unadvertised object 4413dadc54ab08c6085dc3aa536d19f129aa3571
Fetched in submodule path 'libraries/drivers/ds18x20', but it did not contain 4413dadc54ab08c6085dc3aa536d19f129aa3571. Direct fetching of that commit failed.

I suppose ds18x20 may have had that commit but it was removed, but the bundle is still referencing it.

Consistent naming of archive files?

Hi,

I realize this is a nit, but is there a reason why the source archives are named as camelcase and underscores, while the mpy archives are named as lowercase and hyphens? Also, the date appears in different locations between those archive types.

On a case-sensitive OS like Linux, I wind up renaming the camelcase so the files appear together in a list.

A minor thing, I know :-)
cheers
-- mew

PulseIO problem on Raspberry Pi when running irremote_simpletest.py examplr

I installed the entire CircuitPython on my Raspberry Pi running Raspian Stretch in the /lib/ directory. When trying to run the irremote_simpletest.py example, I encounter the following:

Traceback (most recent call last):
  File "irremote_simpletest.py", line 3, in <module>
    import pulseio
  File "/home/pi/.local/lib/python3.5/site-packages/pulseio.py", line 4, in <module>
    from adafruit_blinka.microcontroller.bcm283x.pulseio.PulseIn import PulseIn
ImportError: No module named 'adafruit_blinka.microcontroller.bcm283x.pulseio'

This was a brand new installation of Raspian, and I precisely followed the steps in https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi

is31fl3731 is included but appears to be MicroPython version?

Hi,

I installed the bundle on a M0 board but I am seeing that is31fl3731 library tries to import utime which is part of the old API.

Is this a simple fix or a longer term issue?

I can do a pull request if you point me in the right direction to get started.

Best,
Boris

No way for users to make a log file

I have been making a very layered program that navigates around an deactivates submuodules and launches user side programs (it's a gui with user writable programs) that are dependent on active user input. i have been looking for a way to log the program to a file as it navigates around itself so i can better know what it is doing.

There is no such way to do this while just being able to just unplugging and replugging the drive.

my though it that there could be a file (txt or not, it's all good) on the drive that is marked read only the computer but the drive can wrote to. while i have some ideas of how this could be implemented but they are mostly just conceptual and probably unproductive.

my though is it that code could look like this:

import logio

my_log = logio.internal_log('log_file_name')# or maybe init() or mount()

for i in range(1000):
    if not i % 21:
        my_log.write('a new line of log data (this string) was added when i was:' + str(21))
        #added 'a new line of log data (this string) was added when i was:21' to a new line in the log

then the next time the drive is powered down and up a 'log_file_name.txt' will appear on the drive.
and next time that file is removed and replaced by the new log

while i do not think i can do this alone i will gladly work on the project doing whatever percent of the work i can (while being helpful)

any thoughts on implementing this kinda lib?

Dependencies/requirements mechanism?

As the bundle grows past 2MB should we provide an essentials bundle that is just core deps like Bus Device? Maybe each library zip should include dependencies instead?

Add Driver for the Adafruit TSL2591 High Dynamic Range Digital Light Sensor

Hi

It would be cool if the Bundle would support the Adafruit TSL2591 High Dynamic Range Digital Light Sensor right out of the box. Seems legit to me since this is the most capable light sensor in the Adafruit portfolio, and the only one with is able to handle the range needed for modern photography (as support).
Actually I will work on my own driver, witch i'am willing to share when it is done, but first I need to learn more about i2c communication and python in genrell.

Thanks and keep up the good work (finaly I don't have to deal with C anymore ;-) )
Regards
Pascal

Incompatible mpy files

I'm trying to install the Adafruit library for ServoKit on my ESP8266 nodeMCU. I have tried to install on both CircuitPython and MicroPython per this tutorial
https://learn.adafruit.com/micropython-hardware-pca9685-pwm-and-servo-driver?view=all
However, I kept running to the Incompatible .mpy files for both of them. On CircuitPython, I'm using Adafruit CircuitPython 3.1.2 and the CircuitPython_Bundle-3.x on the Release of the GitHub page
Here's the returned error when I import the file
image
And for MicroPython, I use esp8266-20180511-v1.9.4 version. I tried And I ran into the same issue as well.
Any help would be great :D

PulseIO pwm output problem on Raspberry pi 3

I tried to run pwm example circuit python on raspberry pi but I am getting some error. How can I solve the problem ? Is Raspberry pi supported PulseIO library?

Example :
https://circuitpython.readthedocs.io/en/3.x/shared-bindings/pulseio/PWMOut.html

import pulseio
import board

pwm = pulseio.PWMOut(board.D16, frequency=50)
pwm.duty_cycle = 2 ** 15

Output:
Traceback (most recent call last):
File "/home/pi/Desktop/circuitpython_test_pwm.py", line 5, in
pwm = pulseio.PWMOut(board.D16) # output on D16
AttributeError: module 'pulseio' has no attribute 'PWMOut'

Should MAX7219 be supported in CircuitPython

I have been working on an implementation of max7219 spi that is compatible with CircuitPython and is based the oled driver. I see the micropython version of max7219 and documentation in the CircuitPython API document for it, but no code. Did you decide not to implement it? Does my driver make more sense in the Community Bundle? I need some direction.

Installation issues on Raspberry Pi/Raspbian

Hey guys,

I'm trying to install the bundle on a Raspberry Pi 3 B to use the max7219 driver in a CircuitPy project. After installing Raspbian, and following the Adafruit tutorial to install CircuitPython, I tried installing the bundle using the recommended pip command:

pip3 install adafruit-circuitpython-lis3dh

It appeared to download the necessary dependencies, and install correctly, but on inspection of /usr/local/lib/python3.5/dist-packages - I only see Blinka, CoreIO, and Adafruit GPIO. When I try to import the max7219 module in Mu, I get the following error:

ImportError Traceback (most recent call last)
in ()
----> 1 import max7219

ImportError: No module named 'max7219'

uname -a on my RPi:
Linux raspi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux

Python version info from Mu:
Jupyter QtConsole 4.2.1
Python 3.5.3 (default, Sep 27 2018, 17:25:39)

Thanks for any help you can provide.

fetch: Label is not defined

Using adafruit-circuitpython-pyportal-en_US-4.0.0-beta.6.uf2 with library bundle adafruit-circuitpython-bundle-4.x-mpy-20190329.zip.

Error when running Adabox sample code:

`
import time
import board
from adafruit_pyportal import PyPortal

# Set up where we'll be fetching data from
DATA_SOURCE = "https://www.adafruit.com/api/quotes.php"
QUOTE_LOCATION = [0, 'text']
AUTHOR_LOCATION = [0, 'author']

cwd = ("/"+__file__).rsplit('/', 1)[0]
pyportal = PyPortal(url=DATA_SOURCE,
json_path=(QUOTE_LOCATION, AUTHOR_LOCATION),
status_neopixel=board.NEOPIXEL,
default_bg=cwd+"/quote_background.bmp",
text_font=cwd+"/fonts/Arial-ItalicMT-17.bdf",
text_position=((20, 40), # quote location
(100, 190)), # author location
text_color=(0xFFFFFF, # quote text color
0x8080FF), # author text color
text_wrap=(35, # characters to wrap for quote
0), # no wrap for author
text_maxlen=(170, 30), # max text size for quote & author
debug=True)

# speed up projects with lots of text by preloading the font!
pyportal.preload_font()

while True:
try:
value = pyportal.fetch()
print("Response is", value)
except RuntimeError as e:
print("Some error occured, retrying! -", e)
time.sleep(0)
`

Error:
Traceback (most rececnt call last): File "code.py", line 33, in <module> File "code.py, line 30, in <module> File "adafruit_pyportal.py", line 765, in fetch File "adafruit_pyportal.py", line 480, in set_text NameError: name 'Label' is not defined

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.