Skip to content

Instantly share code, notes, and snippets.

@elorest

elorest/usb.cr Secret

Created January 17, 2019 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elorest/81e97bd30152cb34aa25b4241907e4ca to your computer and use it in GitHub Desktop.
Save elorest/81e97bd30152cb34aa25b4241907e4ca to your computer and use it in GitHub Desktop.
# shell command:
# echo -en '\x05\x40\x10\x08\xA3' > /dev/ttyUSB0
usb0 = File.open("/dev/ttyUSB0", "a+")
usb0.puts "\x05\x40\x10\x08\xA3".to_slice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment