Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

i2cperipheral module
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

i2cperipheral module

by alfons_vandaele on Sat Oct 17, 2020 9:11 am

I want to use the i2cperipheral module on a Seeeduino XIAO but I can not find the file i2cperipheral.py in the library bundle?

alfons_vandaele
 
Posts: 6
Joined: Sat Oct 17, 2020 9:03 am

Re: i2cperipheral module

by dastels on Sat Oct 17, 2020 2:18 pm

It's part of the CircuitPython runtime, just like time and board, etc.

Dave

dastels
 
Posts: 3767
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2cperipheral module

by alfons_vandaele on Sat Oct 17, 2020 2:48 pm

Should I find it like this:

Adafruit CircuitPython 5.3.1 on 2020-07-13; Seeeduino XIAO with samd21g18
>>> import i2cperipheral
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'i2cperipheral'

alfons_vandaele
 
Posts: 6
Joined: Sat Oct 17, 2020 9:03 am

Re: i2cperipheral module

by dastels on Sat Oct 17, 2020 2:55 pm

Yes, that should do it. Have you tried the latest CircuitPython 6.0? (RC0 a the moment)

Dave

dastels
 
Posts: 3767
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2cperipheral module

by alfons_vandaele on Sat Oct 17, 2020 4:11 pm

I have done that now but I still get:

Adafruit CircuitPython 6.0.0-rc.0 on 2020-10-16; Seeeduino XIAO with samd21g18
>>> import i2cperipheral
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'i2cperipheral'

alfons_vandaele
 
Posts: 6
Joined: Sat Oct 17, 2020 9:03 am

Re: i2cperipheral module

by dastels on Sat Oct 17, 2020 8:21 pm

I checked the core module matrix. This board doesn't include i2cperipheral. It does include these core modules:

analogio, board, busio, digitalio, math, microcontroller, neopixel_write, nvm, os, pulseio, pwmio, random, rotaryio, rtc, storage, struct, supervisor, time, touchio, usb_hid, usb_midi

See https://circuitpython.readthedocs.io/en/latest/shared-bindings/support_matrix.html

Dave

dastels
 
Posts: 3767
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2cperipheral module

by alfons_vandaele on Sun Oct 18, 2020 4:02 am

I think I knew that. I had checked the matrix before. This takes me back to my original question: Where do I find the file peripheral.py ? Then I can include it in my lib folder and hopefully, that works?

alfons_vandaele
 
Posts: 6
Joined: Sat Oct 17, 2020 9:03 am

Re: i2cperipheral module

by dastels on Sun Oct 18, 2020 10:39 am

No idea. Where did you see it mentioned?

Dave

dastels
 
Posts: 3767
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2cperipheral module

by alfons_vandaele on Sun Oct 18, 2020 1:10 pm

It exists as a module. See https://circuitpython.readthedocs.io/en ... index.html. But I do not find the code. I need the .py file if I want to put it in my lib folder and use it from there like one do with other modules.

I had asked for it in another post and some refered to that page. But I could not get more information from him either.

alfons_vandaele
 
Posts: 6
Joined: Sat Oct 17, 2020 9:03 am

Re: i2cperipheral module

by dastels on Sun Oct 18, 2020 2:39 pm

As I said, it's a builtin core module, part of the C++ CircuitPython runtime. To my knowledge there is no python version.

dastels
 
Posts: 3767
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2cperipheral module

by alfons_vandaele on Sun Oct 18, 2020 2:44 pm

Is there another way of using the device Seeeduino XIAO as a i2c slave?

alfons_vandaele
 
Posts: 6
Joined: Sat Oct 17, 2020 9:03 am

Re: i2cperipheral module

by dastels on Sun Oct 18, 2020 3:41 pm

You could switch to C++. That would give you more options but may require some more detailed programming.

Dave

dastels
 
Posts: 3767
Joined: Tue Oct 20, 2015 3:22 pm

Re: i2cperipheral module

by tannewt on Mon Oct 19, 2020 6:06 pm


tannewt
 
Posts: 1837
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.