From 3fac022999e009cb7cfd7773c4e59308cb74889c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 29 Jul 2013 00:03:55 +0200 Subject: start work on commandline documentation --- Readme.txt | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'Readme.txt') diff --git a/Readme.txt b/Readme.txt index c668932..94e3239 100644 --- a/Readme.txt +++ b/Readme.txt @@ -3,27 +3,17 @@ VUSB-based USB to I2C conversion board. This setup assumes that you have a VUSB board with level conversion on D+ and D- , use an ATTiny and have D+ is connected to INT0, D- to INT1, -SDA to PB6 and SCL to PB7. Using hardware 1k5 pull-ups on SDA and SCL is -recommended. +SDA to PB6 and SCL to PB7. hardware pull-ups must be connected to SDA and SCL. -The i2c program in the commandline directory will transmit the I2C -start condition and then the bytes it reads on stdin (as decimal numbers, -separated by newlines). On EOF, a stop condition is transmitted. - -So, to set a freshly flashed MicroMoody's color to yellow, you'd have to do: - -> ./i2c -35 -0 -0 -255 -255 -0 -0 -1 - +The commandline utilities are meant to be similar to the i2c-tools utilities. +vusb-i2cdetect can be used to scan a bus, while vusb-i2cget and vusb-i2cset +read/write data. +For instance, to set a MicroMoody's color to yellow: +> vusb-i2cset 17 0 0 255 255 0 0 1 +Or, to read out the temperature from a TC74 thermal sensor: +> vusb-i2cget 77 0 -- cgit v1.2.3