-
Notifications
You must be signed in to change notification settings - Fork 7
Example code single integer ValueError #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That's new from the introduction of slices I added, the intention was to be more in line with Issue #26 and make use of slice notation. You're correct, now that it's implemented, ideally the example should be |
So I could add that functionality and/or update the example, happy to do whatever makes most sense! |
My understanding of #26 is that normal python behavior for:
would store the list But because
Should probably raise some error indicating that you are not allowed to store a list object in that index, only a int. I think we do need to update the example either way since we don't want it to raise an exception. I do think it's also good to go ahead update the library as well to raise the error about not being able to store list objects instead of ints like the example shown in #26 |
Sounds good! I'll submit a PR that:
|
closed by #32 |
In the simpletest example there is commented out code that writes multiple bytes to the FRAM device at once:
Adafruit_CircuitPython_FRAM/examples/fram_spi_simpletest.py
Lines 30 to 32 in 34c3f75
But if you uncomment and attempt to run this code it raises this error:
I think the line writing the data needs to include a slice of the proper length like this:
I tested that locally and it seems to work, though I have very little experience with FRAM so I can't be certain it's correct.
The text was updated successfully, but these errors were encountered: