I turn on the device, the led turns green. And I use usb to connect it with computer then I open the nrf connect for desktop, the bluetooth low energy tool,
I turn on the device, the led turns green. And I use usb to connect it with computer then I open the nrf connect for desktop, the bluetooth low energy tool,
Now I have switched to another 5340 board for the BLINKY test and the results are still the same, I think there is something wrong with the SAMPLE code or it does not apply to the 5340
Cong
Please try to build and program the blinky sample in /ncs/zephyr/samples/basic/blinky. Alternatively, send me the project you are using now so I can try it here.
this is the project I am using, I'll try your way.
/* * Copyright (c) 2016 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr.h> #include <drivers/gpio.h> /* 1000 msec = 1 sec */ #define SLEEP_TIME_MS 1000 /* The devicetree node identifier for the "led0" alias. */ #define LED0_NODE DT_ALIAS(led0) /* * A build error on this line means your board is unsupported. * See the sample documentation for information on how to fix this. */ static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios); void main(void) { const struct device *dev; bool led_is_on = true; int ret; if (!device_is_ready(led.port)) { return; } ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE); if (ret < 0) { return; } while (1) { ret = gpio_pin_toggle_dt(&led); if (ret < 0) { return; } k_msleep(SLEEP_TIME_MS); } }
okey, now it is working~ but how can I find the device on the phone with the nrf connect for mobile app?
Many thanks
Cong
You have to select one of the Blueooth peripheral samples here https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrf/samples/samples_bl.html if you want to test BLE connectivity with your phone. The blinky sample does not include Bluetooth at all.