Seeed Studio XIAO nRF52840 2: Zephyr, nRF Connect SDK, GPIO and UART

  Рет қаралды 6,741

WSN & IoT

WSN & IoT

Күн бұрын

Пікірлер: 28
@maksymkoval1754
@maksymkoval1754 Жыл бұрын
XIAO nRF52840 is a really great board! I'm glad you started tutorials with it.
@CalinGilan
@CalinGilan 10 ай бұрын
I really really appreciate your tutorial. It was the only thing I found online that was of high quality for this lil board!! Your video is also super well annotated. As someone who is trying to get into embedded stuff, this has helped tremendously
@mariamn4752
@mariamn4752 Жыл бұрын
Thanks!
@wsniot
@wsniot Жыл бұрын
Thx for the support. I appreciate it.
@bluestek
@bluestek Жыл бұрын
Thank you so much!!! Having a workflow for working the nRF52840 makes this chip so much more fun to play with!
@mrafayshams3089
@mrafayshams3089 Жыл бұрын
Thank you so much!
@wsniot
@wsniot Жыл бұрын
My pleasure!
@mariamn4752
@mariamn4752 Жыл бұрын
Thanks so much for the video! I was wondering how to edit the code to be able to read sensor data using UART?
@wsniot
@wsniot Жыл бұрын
IF a sensor has another interface than UART and your device is battery powered, i would recommend not to using UART since the receiving over UART uses a lot energy. But anyway receiving is similar but a little bit more complex and there are multiple ways. I prefer to using two buffers. If the buffer is full you would otherwise to have to start the receiving new: static uint8_t rx_buf1[10] = {0}; static uint8_t rx_buf2[10] = {0}; static uint8_t rx_buf_num=1; void uart1_cb(const struct device *dev, struct uart_event *evt, void *user_data){ ARG_UNUSED(dev); switch (evt->type) { case UART_RX_RDY: ;//empty statement int offset = evt->data.rx.offset; int len = evt->data.rx.len; for (size_t i = offset; i < (offset+len); i++){ if (evt->data.rx.buf[i]==' '){ printk(" "); }else{ printk("%c", evt->data.rx.buf[i]); } } break; case UART_RX_BUF_REQUEST: if(rx_buf_num==1){ uart_rx_buf_rsp(uart_dev,rx_buf2, sizeof(rx_buf2)); rx_buf_num=2; }else{ uart_rx_buf_rsp(uart_dev,rx_buf1, sizeof(rx_buf1)); rx_buf_num=1; } break; default: break; } } Dont forget to enable the receiving: uart_callback_set(uart_dev, uart1_cb, NULL); uart_rx_enable(uart_dev, rx_buf1, sizeof(rx_buf1), 100 * USEC_PER_MSEC);
@mariamn4752
@mariamn4752 Жыл бұрын
@@wsniot thank you for your reply. i will test it out
@soulprospector6931
@soulprospector6931 Жыл бұрын
Hey I have a major question about this chip. You mentioned that UART and I2C pins can nit work togeather at the same time. I am trying to use BLE UART as well as an I2C temp sensor. My temp sensor is not working correctly. Could this be why? Even tho I have not used the tx and rx pins?
@wsniot
@wsniot Жыл бұрын
UART0 and I2C1 should work together in the default XIAO project. I2C0 and UART1 is disabled by default because of the number limitation of the pins. Did you use pullup resistors for the data and clock line of the I²C-bus? It should use the internal as default, but sometimes its disabled or it is also more stable if you use external pullups.
@soulprospector6931
@soulprospector6931 Жыл бұрын
@wsniot hey thanks for responding, and yes the temp sensor I'm using has 2 10k pull-up resistors installed on it already. I'm using the mcp9808 temp sensor from adafruit. For some reason, the temp sensor keeps returning a value of "nan", and I can't figure out why.
@soulprospector6931
@soulprospector6931 Жыл бұрын
@wsniot to me it seems like there I'd a problem with initializing the i2c bus on the xaio nrf52840. I am using the arduino IDE to program like how you showed in your tutorial. Not sure what I'm doing wrong, but you seem like you know more about this chip than anyone else on youtube
@DanielMorales-rc1bw
@DanielMorales-rc1bw Жыл бұрын
Is this board compatible with software serial communication?
@maxmonterocarreras6164
@maxmonterocarreras6164 8 күн бұрын
Hi! would you share your zephyr application? thnks in advance!
@NoumanAli
@NoumanAli Жыл бұрын
Can you kindly make a video using UARTE? I have another question: can we arbitrarily make any pin as UART Tx and Rx pins?
@KlausB-x2u
@KlausB-x2u Жыл бұрын
Did you manage to use the XIAO BLE as matter device? If so, may you share how to do it?
@wsniot
@wsniot Жыл бұрын
I didnt try the Xiao BLE yet, but actually it should work. If i find the time i will check it out, but at the moment still other tasks are in my priority lists first.
@KlausB-x2u
@KlausB-x2u Жыл бұрын
@@wsniot Thanks for your answer. I tried for the last days, could compile changing the nrf52840DK overlays and configs but after flashing everything is dead and I can't figure out what's going on. I'll definitely keep following your channel and hope you'll find the time. ;)
@browaruspierogus2182
@browaruspierogus2182 Жыл бұрын
any specific advantages of Zephyr?
@wsniot
@wsniot Жыл бұрын
Advantages over what? Arduino IDE? Zephyr is a very powerful RTOS with many features, such as task scheduling, modular design, many libraries, hardware controllers via device tree and so on. It also offers support for Thread, Matter, BLE, BLE-Mesh and ZigBee, for example.
@browaruspierogus2182
@browaruspierogus2182 Жыл бұрын
@@wsniot over freeRTOS. Looks like it is some 'distro' of RTOS
@HomoSapiensMember
@HomoSapiensMember Жыл бұрын
was banging my head on the table over the 'connected devices' not showing my xiao ble :'(
@wsniot
@wsniot Жыл бұрын
I hope you had enough aspirin😉.
@MrIgorek123
@MrIgorek123 Жыл бұрын
so it's normal that this board is not visible in 'connected devices' table?
@wsniot
@wsniot Жыл бұрын
@@MrIgorek123 Yes. This device has no j-link programmer/debugger integrated. It has a bootloader for transfering the firmware like using a usb-flash stick. Otherwise the USB acts only as USB-UART-communication, means you can use a COM-Port for interchanging data with the MCU.
@raniaamara6715
@raniaamara6715 5 ай бұрын
hi i wanna work with the lsm6ds3 integrated in the seeed when i build it always builds xiao_ble.dts not xiao_ble_nrf52840_sense.dts can you help me please
CircuitPython nRF52840-dongle OpenOCD Pi Tutorial
14:39
rdagger68
Рет қаралды 19 М.
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН
XIAO ESP32S3 Sense - Tiny ESP32 Camera
45:28
DroneBot Workshop
Рет қаралды 91 М.
XIAO ESP32C6 Getting Started Tutorial, Seeed Studio, Smallest ESP32
11:14
Electronic Clinic
Рет қаралды 23 М.
Zephyr and nRF Connect SDK: Logging
13:14
WSN & IoT
Рет қаралды 2,1 М.
Unboxing and testing the Seeedstudio XIAO | nerdhut.de
6:35