Pin configuration and library error
Re: Pin configuration and library error
Re: Pin configuration and library error
mikeysklar wrote:@dkanday,
The CLUE schematics are available in multiple formats through the download page (Fritzing, Eagle, JPG, etc.)
https://learn.adafruit.com/adafruit-clue/downloads
Make sure you have the neopixel and adafruit_clue libraries placed in the folder of your CIRCUITPY/lib folder. You can use the MPY version to save a bit of space. You do not need to use .py or .mpy extension in the code 'import' process just calling import adafruit_clue is sufficient.
https://circuitpython.org/libraries
Re: Pin configuration and library error
Re: Pin configuration and library error
Re: Pin configuration and library error
Re: Pin configuration and library error
Re: Pin configuration and library error
Re: Pin configuration and library error
Re: Pin configuration and library error
Re: Pin configuration and library error
# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
"""CLUE Spirit Level Demo"""
import board
import displayio
from adafruit_display_shapes.circle import Circle
from adafruit_clue import clue
display = board.DISPLAY
clue_group = displayio.Group(max_size=4)
outer_circle = Circle(120, 120, 119, outline=clue.WHITE)
middle_circle = Circle(120, 120, 75, outline=clue.YELLOW)
inner_circle = Circle(120, 120, 35, outline=clue.GREEN)
clue_group.append(outer_circle)
clue_group.append(middle_circle)
clue_group.append(inner_circle)
x, y, _ = clue.acceleration
bubble_group = displayio.Group(max_size=1)
level_bubble = Circle(int(x + 120), int(y + 120), 20, fill=clue.RED, outline=clue.RED)
bubble_group.append(level_bubble)
clue_group.append(bubble_group)
display.show(clue_group)
while True:
x, y, _ = clue.acceleration
bubble_group.x = int(x * -10)
bubble_group.y = int(y * -10)
Re: Pin configuration and library error
Re: Pin configuration and library error
mikeysklar wrote:Do you have multiple adafruit_clue libraries in your /lib folder? It looks like the error you are seeing is based on adafruit_clue.py, but your screenshot abvoe shows that you have adafruit_clue.mpy in place. Can you make sure that adafruit_clue.py is deleted from /lib and the mpy is the current one. It really doesn't matter which you use mpy or py, but if one is an old version we want that out of the way.
{Dkanday} I deleted all the existing libraries from lib folder and reloaded one at a time, just to be sure that I am not adding some incorrect file
The boot_out.txt should be able to verify your CircuitPython release version. Let's confirm that it is 6.3.0.
{Dkanday} I verified that it was initially v6.3.0
What scripts are you running?
{Dkanday} I used this code to begin with : https://learn.adafruit.com/circuitpytho ... -analog-in
and later on used the temp and humidity example and started editing the code from there.
We provide a few examples here:
https://learn.adafruit.com/adafruit-clu ... thon-demos
I'd like you to start with one of these. Maybe Spirit Level for simplicity.
- Code: Select all | TOGGLE FULL SIZE
# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
"""CLUE Spirit Level Demo"""
import board
import displayio
from adafruit_display_shapes.circle import Circle
from adafruit_clue import clue
display = board.DISPLAY
clue_group = displayio.Group(max_size=4)
outer_circle = Circle(120, 120, 119, outline=clue.WHITE)
middle_circle = Circle(120, 120, 75, outline=clue.YELLOW)
inner_circle = Circle(120, 120, 35, outline=clue.GREEN)
clue_group.append(outer_circle)
clue_group.append(middle_circle)
clue_group.append(inner_circle)
x, y, _ = clue.acceleration
bubble_group = displayio.Group(max_size=1)
level_bubble = Circle(int(x + 120), int(y + 120), 20, fill=clue.RED, outline=clue.RED)
bubble_group.append(level_bubble)
clue_group.append(bubble_group)
display.show(clue_group)
while True:
x, y, _ = clue.acceleration
bubble_group.x = int(x * -10)
bubble_group.y = int(y * -10)
Re: Pin configuration and library error
Re: Pin configuration and library error
mikeysklar wrote:Probably a library mismatch between 6.3.0 and 7.x. Not an issue on your side necessarily as the libraries are always being updated while the stable releases slowly get out of date from the next alpha/beta drops. Glad you are running.