diff --git a/docs/sgp40_voc_index/copy_files.png b/docs/sgp40_voc_index/copy_files.png deleted file mode 100644 index be3c3b5..0000000 Binary files a/docs/sgp40_voc_index/copy_files.png and /dev/null differ diff --git a/docs/sgp40_voc_index/genericsetup.rst b/docs/sgp40_voc_index/genericsetup.rst index 2927a12..b5d9337 100644 --- a/docs/sgp40_voc_index/genericsetup.rst +++ b/docs/sgp40_voc_index/genericsetup.rst @@ -4,14 +4,11 @@ Getting Started On a Custom Platform Copy files to your project -------------------------- -#. Copy all SGP driver files (.c and .h) into your software project folder. -#. Make sure all files are added to your IDE. - -.. note:: - Include new image - -.. image:: copy_files.png - + 1. Copy all top level source files (.c and .h) into your software project folder. + 2. Copy *hw_i2c/sensirion_hw_i2c_implementation.c* to your project as well. + You'll need to adapt it to your platform. + See :ref:`I2C implementation`. + 3. Make sure all files are added to your IDE. Adapt *sensirion_arch_config.h* for your platform ------------------------------------------------- @@ -20,6 +17,8 @@ You may need to adapt *sensirion_arch_config.h* if your compiler doesn't support C99 and thus does not provide `stdint.h` and `stdlib.h`. +.. _I2C implementation: + Implement *sensirion_hw_i2c_implementation.c* --------------------------------------------- To use your I2C hardware the file *hw_i2c/sensirion_hw_i2c_implementation.c* @@ -39,3 +38,26 @@ I2C functions to implement .. doxygenfunction:: sensirion_i2c_write .. doxygenfunction:: sensirion_sleep_usec .. doxygenfunction:: sensirion_i2c_select_bus + +Run *sgp40_voc_index_example_usage.c* +------------------------------------- + +If your platform supports the ``printf`` function just run the examples and you +should see the following messages: + +:: + + initialization successful + VOC Index: 0 + Temperature: 39.128degC + Relative Humidity: 29.695%RH + VOC Index: 0 + Temperature: 39.086degC + Relative Humidity: 29.687%RH + VOC Index: 0 + Temperature: 39.106degC + Relative Humidity: 29.647%RH + ... + +If your platform doesn't support ``printf`` remove the print statements and +observe the measurement values in your debugger.