> For the complete documentation index, see [llms.txt](https://cocolinx.gitbook.io/cocolinx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cocolinx.gitbook.io/cocolinx-docs/home/english/development/nrf9151-example-code.md).

# nRF9151 | Example Code

All examples can be found in the link below:

{% embed url="<https://github.com/cocolinx?tab=repositories>" %}
Example repositories link
{% endembed %}

All examples are in repositories 'som\_examples' and 'proto\_examples'.

They include:

* accel - for a simple onboard accelerometer demo (only in Proto)
* adc - for a simple potentiometer AD converter demo
* battery - for a simple onboard battery voltage measurement demo
* blinky - for a simple led blink demo
* button - for a simple onboard button click event demo
* flash - for a simple onboard flash demo (only in Proto)
* gnss - for a simple gps demo
* helloworld - for a simple hello world log demo
* led\_pwm - for a simple example of LED brightness control using PWM
* mqtt - for a simple mqtt example of using MQTT Explorer
* tcp - for a simple tcp example of communicate with echo server
* temperature - for a simple onboard temperature measurement demo (only in Proto)
* test\_pins - for a simple LOW/HIGH test of GPIO pins
* udp - for a simple udp example of communicate with echo server

More examples are coming soon!

After pull the project, you need to add build file.

<figure><img src="https://4012614526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuolW15Ii136DOeL4XvSy%2Fuploads%2FKqd0YN7381KCuWClRG9A%2Fimage.png?alt=media&amp;token=77f97e3f-e33f-401c-9402-048c99c1e5ef" alt=""><figcaption><p>Example - Hello World</p></figcaption></figure>

Select the SDK and Toolchain that you will use and select 'cocolinx\_dev9151/nrf9151/ns' and put 'prj.conf' in Base configuration files.

<figure><img src="https://4012614526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuolW15Ii136DOeL4XvSy%2Fuploads%2F7Wziptg3hIJ1YYFtEadd%2Fimage.png?alt=media&amp;token=9e701a33-7bc1-4cd5-a191-0bef38117605" alt=""><figcaption><p>Example - Hello World</p></figcaption></figure>

After build the project you can flash the project to device.

If you see log like this, the flash has completed successfully.

```
-- west flash: using runner nrfutil
-- runners.nrfutil: reset after flashing requested
-- runners.nrfutil: Flashing file: D:\CocoLinx\Projects\Csom\csom_v1_examples\helloworld\build\merged.hex
-- runners.nrfutil: Erasing address ranges touched by firmware
-- runners.nrfutil: Programming image
-- runners.nrfutil: Verifying image
-- runners.nrfutil: Reset
-- runners.nrfutil: Board(s) with serial number(s) 801032619 flashed successfully.
 *  Terminal will be reused by tasks, press any key to close it. 
```
