1.. zephyr:code-sample:: grove_temperature 2 :name: Grove Temperature Sensor 3 :relevant-api: sensor_interface 4 5 Get temperature data from a Grove temperature sensor and display it on an LCD display. 6 7Overview 8******** 9 10This sample application gets the output of the grove temperature sensor and prints it to the 11console, in units of celsius, once every second. When the :kconfig:option:`CONFIG_GROVE_LCD_RGB` 12and :kconfig:option:`CONFIG_I2C` options are set, the temperature will also be displayed on the 13Grove LCD display. 14 15Requirements 16************ 17 18To use this sample, the following hardware is required: 19 20* A board with ADC support 21* `Grove Temperature Sensor`_ 22* `Grove Base Shield`_ 23* `Grove LCD`_ [optional] 24 25Wiring 26****** 27 28The easiest way to connect the sensor is to connect it to a Grove shield on a board that supports 29Arduino shields. Provide a devicetree overlay that specifies the sensor location. If using the 30overlay provided for the sample, the sensor should be connected to A0 on the Grove shield. The 31Grove LCD, if being used, should be connected to I2C on the Grove shield and the overlay needs to 32contain an entry for it. 33 34Building and Running 35******************** 36 37Build and flash the sample as follows, changing ``nrf52dk_nrf52832`` to your board: 38 39.. zephyr-app-commands:: 40 :zephyr-app: samples/sensor/grove_temperature 41 :board: nrf52dk_nrf52832 42 :goals: build flash 43 :compact: 44 45Sample Output 46============= 47 48.. code-block:: console 49 50 *** Booting Zephyr OS build v3.6.0-rc1-32-gba639ed6a893 *** 51 Temperature: 22.90 C 52 Temperature: 22.96 C 53 Temperature: 22.82 C 54 55.. _Grove Base Shield: https://wiki.seeedstudio.com/Base_Shield_V2/ 56.. _Grove Temperature Sensor: https://wiki.seeedstudio.com/Grove-Temperature_Sensor_V1.2/ 57.. _Grove LCD: https://wiki.seeedstudio.com/Grove-LCD_RGB_Backlight/ 58