Skip to content

Instantly share code, notes, and snippets.

@matham
Created October 20, 2023 21:35
Show Gist options
  • Save matham/44ec30dfb79e0b542971ba5c937fa276 to your computer and use it in GitHub Desktop.
Save matham/44ec30dfb79e0b542971ba5c937fa276 to your computer and use it in GitHub Desktop.
comm = TeensyComm()
comm.create_serial_device('COM5')
comm.write_serial(comm.make_modio_create(15, 2, 0x12, ModIOFreq.freq_100k, ModIOPullup.disabled))
comm.write_serial(comm.make_modio_write_digital(46, 2, 0x12, False, True))
comm.write_serial(comm.make_modio_write_digital(46, 2, 0x12, False))
for i in range(200):
comm.write_serial(comm.make_modio_write_digital(46, 2, 0x12, *vals[i % 2]))
#comm.write_serial(comm.make_modio_write_digital(46, 2, 0x13, *vals[i % 2]))
comm.read_serial()
print(comm.parse_buffer())
sleep(2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment