i2c on Spike Prime #1047
-
I've got a number of HiTechnic IR Seekers, which I've got left over from my days of using LEGO NXT devices. I'd love to make them work on my Spike Prime bots. Those HiTechnic sensors use I2C, so in principle, if I can get I2C going on the Spike Prime, I should be able to make it work. I've already got an adapter cable that I wrangled up that conects the Powered Up connector on the SpikePrime and the old LEGO style connectors. (I can't guarantee that the cable is wired correctly, but I'm optimistic; I won't know for sure without trying to make it work on the software side.) I know that pybricks is capable of I2C communication on the EV3. That page I just linked says
So, I'm asking! Can it be added? Alternatively, is there some other sort of hack I should be looking at? I could try to write my own I2C implementation from scratch via bit-banging, but it would be lovely to not have to do that, especially if this might be coming via pybricks in the future. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
It's not out of the question, but it will need quite a bit of work if we want to do it properly. See pybricks/pybricks-micropython#159 for some very early ideas about making the ports multi-functional. A small number of ports on SPIKE may support I2C via hardware, but the more likely route may be a software based solution so that it could work on all hubs/ports. This is essentially still bit-banging, but with a lower level process so it doesn't depend on the timing of Python code. |
Beta Was this translation helpful? Give feedback.
-
I know that this has been addressed, yet I would really like to know if we can interface other sensors via I2C now. Has this been worked on lately? For example, this year in WRO, we can use any kind of platforms and sensors. We want to stay competitive and having such an option might become more interesting for students in Senior category. |
Beta Was this translation helpful? Give feedback.
It's not out of the question, but it will need quite a bit of work if we want to do it properly. See pybricks/pybricks-micropython#159 for some very early ideas about making the ports multi-functional.
A small number of ports on SPIKE may support I2C via hardware, but the more likely route may be a software based solution so that it could work on all hubs/ports. This is essentially still bit-banging, but with a lower level process so it doesn't depend on the timing of Python code.