Open dhalbert opened 1 year ago
8.0.0-beta.6
import board import sdioio import storage import time import displayio import adafruit_displayio_sh1107 i2c = board.I2C() displayio.release_displays() display_bus = displayio.I2CDisplay(i2c, device_address=0x3C) display = adafruit_displayio_sh1107.SH1107(display_bus, width=128, height=64) sdcard = sdioio.SDCard( clock=board.SDIO_CLOCK, command=board.SDIO_COMMAND, data=board.SDIO_DATA, frequency=2500000) print(f"{sdcard.frequency=}") vfs = storage.VfsFat(sdcard) storage.mount(vfs, "/sd") with open( "/sd/test.txt", "w" ) as f: f.write( "year, month, day, batch\n" ) f.write( "2022, 12, 30, 0\n" ) with open("/sd/test.txt", "r") as f: print("Printing lines in file:") print() line = f.readline() while line != '': print(line) line = f.readline() print()
OSError: [Errno 5] Input/output error
If the display = line is commented out, it works.
display =
No response
Reported in https://forums.adafruit.com/viewtopic.php?p=954144 Seems related to #6082, which does not use displayio.
displayio
Another odd thing is that setting frequency= seems to have no effect, as noted by the print() in the test program.
frequency=
print()
Maybe similar code in i.MX as well
CircuitPython version
Code/REPL
Behavior
If the
display =
line is commented out, it works.Description
No response
Additional information
Reported in https://forums.adafruit.com/viewtopic.php?p=954144 Seems related to #6082, which does not use
displayio
.Another odd thing is that setting
frequency=
seems to have no effect, as noted by theprint()
in the test program.