Reading temperature data from DS18B20 sensor using nRF5340-DK

Hello everyone , I'm having trouble activating my DS18B20 temperature sensor (waterproof) with the nRF5340, SDK v2.3.0, and VS Code. I'm using the "zephyr/samples/sensor/ds18b20" template and have created the overlay file, but when I try to flash it, I get the error " no device found"  despite the wiring is correct 

Wiring : 

GND + GND (nrf5340)

VCC + VDD (nrf5340)

DATA + P1.10 (nrf5340)

I think that the problem is in the overlay file .

Thanks.

Here is my code

main.c

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* Copyright (c) 2022 Thomas Stranger
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/sensor.h>
/*
* Get a device structure from a devicetree node with compatible
* "maxim,ds18b20". (If there are multiple, just pick one.)
*/
static const struct device *get_ds18b20_device(void)
{
const struct device *const dev = DEVICE_DT_GET_ANY(maxim_ds18b20);
if (dev == NULL) {
/* No such node, or the node does not have status "okay". */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

prj.conf

Fullscreen
1
2
3
4
5
CONFIG_SENSOR=y
CONFIG_W1=y
CONFIG_LOG=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

C:\ncs\ds18b20\nrf5340dk_nrf5340_cpuapp.overlay

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// To get started, press Ctrl+Space to bring up the completion menu and view the available nodes.
// You can also use the buttons in the sidebar to perform actions on nodes.
// Actions currently available include:
// * Enabling / disabling the node
// * Adding the bus to a bus
// * Removing the node
// * Connecting ADC channels
// For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html
// You can also visit the nRF DeviceTree extension documentation at https://nrfconnect.github.io/vscode-nrf-connect/devicetree/nrfdevicetree.html
/*
* Copyright (c) 2022, Thomas Stranger
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Example configuration of a DS18B20 device on an Arduino serial bus.
* Requires external circuit to provide an open-drain interface.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX