adafruit / seesaw

I2C friend to expand capabilities of other chips.
Other
76 stars 34 forks source link

Building crickitHat with DEBUG=1 does work #76

Open miltieIV2 opened 1 month ago

miltieIV2 commented 1 month ago
MacOS$ make --debug BOARD=crickitHat DEBUG=1

MacOS$ python ~/src/github.com/microsoft/uf2/utils/uf2conv.py --convert --output build/crickitHat/seesaw-crickitHat.uf2 build/crickitHat/seesaw-crickitHat.bin
Converted to uf2, output size: 54272, start address: 0x2000
Wrote 54272 bytes to build/crickitHat/seesaw-crickitHat.uf2

<double click reset on CRICKIT HAT>
MacOS$ cp -X build/crickitHat/seesaw-crickitHat.uf2 /Volumes/CRICKITBOOT/

rpi5$ (env) jbm@rpi5:~/src/Adafruit $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
(env) jbm@rpi5:~/src/Adafruit $ date; python3 crickit_test_neo.py; date
Wed  8 May 19:31:25 BST 2024
Traceback (most recent call last):
  File "/home/jbm/src/Adafruit/crickit_test_neo.py", line 8, in <module>
    from adafruit_crickit import crickit
  File "/home/jbm/src/Adafruit/env/lib/python3.11/site-packages/adafruit_crickit.py", line 408, in <module>
    crickit = Crickit(Seesaw(board.I2C()))  # pylint: disable=invalid-name
                      ^^^^^^^^^^^^^^^^^^^
  File "/home/jbm/src/Adafruit/env/lib/python3.11/site-packages/adafruit_seesaw/seesaw.py", line 166, in __init__
    pid = self.get_version() >> 16
          ^^^^^^^^^^^^^^^^^^
  File "/home/jbm/src/Adafruit/env/lib/python3.11/site-packages/adafruit_seesaw/seesaw.py", line 212, in get_version
    self.read(_STATUS_BASE, _STATUS_VERSION, buf)
  File "/home/jbm/src/Adafruit/env/lib/python3.11/site-packages/adafruit_seesaw/seesaw.py", line 508, in read
    i2c.readinto(buf)
  File "/home/jbm/src/Adafruit/env/lib/python3.11/site-packages/adafruit_bus_device/i2c_device.py", line 81, in readinto
    self.i2c.readfrom_into(self.device_address, buf, start=start, end=end)
  File "/home/jbm/src/Adafruit/env/lib/python3.11/site-packages/busio.py", line 203, in readfrom_into
    return self._i2c.readfrom_into(address, buffer, stop=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jbm/src/Adafruit/env/lib/python3.11/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 67, in readfrom_into
    readin = self._i2c_bus.read_bytes(address, end - start)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jbm/src/Adafruit/env/lib/python3.11/site-packages/Adafruit_PureIO/smbus.py", line 170, in read_bytes
    return self._device.read(number)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 121] Remote I/O error