Skip to content

Instantly share code, notes, and snippets.

@pdg137
Created June 18, 2015 01:41
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 pdg137/5923e58bbe11ccdf05c1 to your computer and use it in GitHub Desktop.
Save pdg137/5923e58bbe11ccdf05c1 to your computer and use it in GitHub Desktop.
Ruby works!
#!/usr/bin/ruby
require 'i2c'
bus = I2C.create('/dev/i2c-1')
bus.write(20, 200, "abcd")
bus.write(20, 201, "bcde")
while true
raise if "abcde" != bus.read(20, 5, 200)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment