Hi, just getting started with the Clue and I'm having trouble with the simple button A example:
from adafruit_clue import clue
while True:
if clue.button_a:
print("Button A pressed")
I have tried adding a couple of files to the Lib but I'm getting the following error:
code.py output:
Traceback (most recent call last):
File "code.py", line 1, in <module>
File "adafruit_clue.py", line 968, in <module>
File "adafruit_clue.py", line 241, in __init__
AttributeError: 'module' object has no attribute 'LSM6DS33'
I"m stuck. I don't know how to find 'lsm6ds33'
I'm attaching a screenshot of my Clue Lib folder
This is just a simple sample program. How are we supposed to know what to put in the Lib folder?
Thanks
Can't get Clue to run example button code
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- diggee17
- Posts: 45
- Joined: Mon Feb 12, 2018 7:18 pm
Can't get Clue to run example button code
- Attachments
-
- 2020-08-23.png (133.05 KiB) Viewed 236 times
- dastels
- Posts: 15827
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Can't get Clue to run example button code
Yes, the LSM6DS library was restructured recently and other libraries that use it are catching up. Keep trying the bundle releases... it should be fixed soon.
Dave
Dave
- kevinjwalters
- Posts: 1026
- Joined: Sun Oct 01, 2017 3:15 pm
Re: Can't get Clue to run example button code
@dastels Is there a previous version that's known to work and recommended as the work around?
@diggee17 In general, you install the libraries (by placing them in /lib directory ) you are using in CircuitPython, i.e. what's in the import statements. Some libraries have additional dependencies which should be documented. In the case of the clue object from adafruit_clue it has a lot and they are mentioned on Introducing Adafruit CLUE: CLUE CircuitPython Libraries. They also get mentioned on https://circuitpython.readthedocs.io/pr ... t/api.html but that's referring to their repositories.
@diggee17 In general, you install the libraries (by placing them in /lib directory ) you are using in CircuitPython, i.e. what's in the import statements. Some libraries have additional dependencies which should be documented. In the case of the clue object from adafruit_clue it has a lot and they are mentioned on Introducing Adafruit CLUE: CLUE CircuitPython Libraries. They also get mentioned on https://circuitpython.readthedocs.io/pr ... t/api.html but that's referring to their repositories.
- kevinjwalters
- Posts: 1026
- Joined: Sun Oct 01, 2017 3:15 pm
Re: Can't get Clue to run example button code
I have to do some testing with a recent library set. This isn't an official answer, but I just gave the https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20200820 library bundle a go and the clue object works well from my quick REPL test.
- kevinjwalters
- Posts: 1026
- Joined: Sun Oct 01, 2017 3:15 pm
Re: Can't get Clue to run example button code
BTW, I've just noted that 20200820 bundle suffers from https://github.com/adafruit/Adafruit_Ci ... /issues/87 so graphical applications using text may break using that one.
- kevinjwalters
- Posts: 1026
- Joined: Sun Oct 01, 2017 3:15 pm
Re: Can't get Clue to run example button code
FYI, I've just installed libraries from the 20200825 bundle and that's good for clue object and good for Label use so far!
Code: Select all
Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit CLUE nRF52840 Express with nRF52840
>>>
>>>
>>> from adafruit_clue import clue
>>> clue.magnetic, clue.acceleration, clue.gyro, clue.temperature
((1.81234, -36.9775, 57.717), (0.412762, 1.47517, -9.55334), (0.0287107, -0.179289, -0.0801761), 32.4986)
>>>
- diggee17
- Posts: 45
- Joined: Mon Feb 12, 2018 7:18 pm
Re: Can't get Clue to run example button code
I have been trying for 3 days to run a simple example program to push a button on the Clue. As a paying customer, I don't think I should have to try everyday to see if the examples work! Why put adafruit-circuitpython-bundle-5.x-mpy-20200823, adafruit-circuitpython-bundle-5.x-mpy-20200824, and adafruit-circuitpython-bundle-5.x-mpy-20200825 out if they aren't stable builds? Don't you do regression testing before you put the libraries out to ensure that you haven't broken the examples at least?
I'm a former C language programmer in a corporate setting and now I'm playing around with the Adafruit boards for fun. This is not FUN! Kindly point me to a link of stable code that will work with the Clue board or let me know when a new link can be ready. I can't keep copying 12 files daily only to find that the library isn't ready.
Thanks.
I'm a former C language programmer in a corporate setting and now I'm playing around with the Adafruit boards for fun. This is not FUN! Kindly point me to a link of stable code that will work with the Clue board or let me know when a new link can be ready. I can't keep copying 12 files daily only to find that the library isn't ready.
Thanks.
Please be positive and constructive with your questions and comments.