X-Git-Url: http://git.techno-innov.fr/?a=blobdiff_plain;f=v04%2FREADME;h=d686ea56c53726d528a5576471828d74aa1fbc78;hb=2a3b309eae02d3d7b01562ebfafcb814c3b56b30;hp=6ce3aeb3c043a860f0a7a36c9927e2d6b91e5e91;hpb=25ce49481d0522395f2fb4c3a17d3e3f4a9d8bbc;p=soft%2Flpc82x%2Fexanh diff --git a/v04/README b/v04/README index 6ce3aeb..d686ea5 100644 --- a/v04/README +++ b/v04/README @@ -49,13 +49,41 @@ format is : # addr type [other data] 0x23 (0x01 to 0x1F) (0x00 to 0xFF) [....] Valid types are : - - 'a' : all - request to send all available sensor data to host. + - 'a' : get all - request to send all available sensor data to host, no data. - 'l' : set led color - set the sensor led color. Three bytes of data (RGB). + - 'c' : get compensation data from BME280 sensor. (TO BE DEFINED) It is also possible to broadcast a message to all sensors by sending to address 255 (0xFF) +The response for the "get all" request has the following format : + # (addr | sensors) data + 0x23 1 byte 18 bytes + +The second byte holds the address on the fist 5 bits (LSB), and information on +available sensors on the three top bits : +addr | sensors : (0x01 to 0x1F) | (got_tsl << 5) | (got_veml << 6) | (got_bme << 7) + got_tsl : Set if TSL256x sensor is present and configured + got_veml : Set if VEML6070 sensor is present and configured + got_bme : Set if BME280 sensor is present and configured + +data is a set of nine 16bits values, in network (big) endian order, with the +following meaning, in this order : + - raw_humidity from soil moisture sensor + - lux value from TSL256x + - ir value from TSL256x + - uv value from VEML6070 + - pressure from BME280 + - comp_temp from BME280 + - humidity from BME280 + - unused - should be 0 (nul) + - unused - should be 0 (nul) + + +The response for the "get compensation data" request has to be defined. + + To set the sensor address using a serial line from a linux host, you can use these commands (sensor connected to ttyUSB0) :