Getting started with Thingy:53 and Zephyr
Tags: iot, zephyr, thingy53
Published: 2023-05-08 18:58:00

---
title: Getting started with Thingy:53 and Zephyr
published: true
description: A simple guide on how to develop for Thingy:53 using Zephyr
tags: IoT, Zephyr, Thingy53
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wge2simgafsh2e168mkt.jpeg
published_at: 2023-05-08 18:58 +0000
---

_UPDATE: hci_rpmsg was renamed to hci_ipc and the links and commands have been updated in this post._

[Thingy:53](https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-53) is the latest in the 'Thingy' line of devices made by [Nordic Semiconductor](https://www.nordicsemi.com).  At first sight, it looks very much like the [Thingy:52](https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-52), including buzzer, microphone, RGB LED, color & light sensor, accelerometer and more. While the Thingy:52 is a VERY good device to use for experimentation with a bunch of sensors and actuators, the Thingy:53 is a much more capable device, mainly because of the much more powerful dual-core [nRF5340](https://www.nordicsemi.com/products/nrf5340) (Thingy:52 is powered by [nRF52832](https://www.nordicsemi.com/products/nrf52832)).

The nRF5340 makes it possible to do advanced calculations on e.g. sensor data in the application core while the network core keeps connectivity. It also provides USB connectivity, which is hooked up to the USB port of the Thingy:53, allowing for applications to provide any kind of USB device the firmware stack supports.  By the way, the nRF5340 [can also run Doom](https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/doom-on-nrf5340)!

## Hardware Requirements
The easiest way to flash custom Zephyr builds to the Thingy:53 is to attach it to an [nRF Development Kit (DK)](https://www.nordicsemi.com/Products/Development-hardware/nRF5340-DK) via a small [SWD cable](https://www.adafruit.com/product/1675) attached to the debug out port of the DK.

Connect the nRF Development Kit to the host computer using a USB cable with a USB micro connector and connect the Thingy:53 to the Devlopment Kit board with the SWD connector cable:

![Connecting Thingy:53 and nRF DK](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fw03i3200h6b3x7otc28.jpg)

Switch on the Thingy:53 by sliding the power switch to the right:

![Thingy:53 power switch](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sf07cdvpk5ohxs40ysqm.jpg)

## Software Requirements

Install and set up a Zephyr environment by following the guide [here](https://docs.zephyrproject.org/latest/develop/getting_started/index.html)

In addition, install the [nRF Command Line Tools](https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools/download) and the latest [SEGGER J-Link software](https://www.segger.com/downloads/jlink/).

_Note:  There is a guide [here](https://docs.zephyrproject.org/latest/develop/flash_debug/nordic_segger.html) going into more detail on the installation of these tools for different platforms._

To inspect Bluetooth GATT services and characteristics, I'd recommend installing the [nRF Connect](https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-mobile) application on your mobile phone.

## Hello World
For me, the 'Hello World' of Zephyr Bluetooth samples is the [Heart Rate sensor sample](https://docs.zephyrproject.org/latest/samples/bluetooth/peripheral_hr/README.html).  Here is how you make it run on the Thingy:53:

First make sure you have a working Zephyr environment (see above). 

_NOTE: All commands below are to be executed in the root zephyr folder._

For the net core (controller), you need to compile and flash the [hci_ipc sample](https://docs.zephyrproject.org/latest/samples/bluetooth/hci_ipc/README.html):

```console
west build -b thingy53_nrf5340_cpunet -s samples/bluetooth/hci_ipc -d build_netcore
west flash -d build_netcore
```

> UPDATE NOTE:  hci_rpmsg was renamed to hci_ipc [here](https://github.com/zephyrproject-rtos/zephyr/pull/64391)

Then build the [Heart Rate sample](https://docs.zephyrproject.org/latest/samples/bluetooth/peripheral_hr/README.html) application and flash it:

```console
west build -b thingy53_nrf5340_cpuapp -s samples/bluetooth/peripheral_hr -d build_app_hr
west flash -d build_app_hr
```

After flashing the sample, use the nRF Connect app (on the mobile) to scan for the `Zephyr Heartrate Sensor`:

![Zephyr Heart Rate sensor scan](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e883iovd26lk8ivhnwv9.jpeg)

Click `CONNECT` to connect to the device, find the `Heart Rate` service and subscribe to heart rate measurements:

![Subscribing to Heart Rate measurements](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zlc3a824wtpusrwrioz0.jpeg)

You can also try to disconnect the SWD cable and switch off the nRF Development Kit board to verify that the heart rate application is indeed running on the Thingy:53 and not the Development Kit:

![Disconnecting the cables](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z4syi3egpxknehg6cuzy.jpg)

## Final notes
This is just a short introduction to get started developing for the Thingy:53 with Zephyr. Try to play with some of the other samples too.  I'd recommend trying the [Blinky sample](https://docs.zephyrproject.org/latest/samples/basic/blinky/README.html) and then move to more advanced things like hooking up data from the sensors to a custom GATT Service.

Enjoy! :)