| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Random Number Generator Example

The Random Number Generator Example demonstrates the use of the RNG driver by obtaining a vector of random numbers and printing the numbers in a COM listener (for example PUTTY) using UART.

The application starts by configuring app_uart and the RNG driver. The main loop prints the vector of random numbers and waits for 100 milliseconds.

You can find the source code and the project file of the example in the following folder: `<InstallFolder>\examples\peripheral\rng`

# Testing

Test the Random Number Generator Example application by performing the following steps:

1. Compile and program the application.
2. Start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:
   - Baud rate: 115.200
   - 8 data bits
   - 1 stop bit
   - No parity
   - HW flow control: RTS/CTS
3. Observe that a vector of random numbers is output every 100 milliseconds.