Created
June 18, 2015 01:41
-
-
Save pdg137/5923e58bbe11ccdf05c1 to your computer and use it in GitHub Desktop.
Ruby works!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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