Randomness on nRF52 using Embedded Swift

Update 2025-07-12: Added import statement for getentropy() implementation in stubs.c Introduction Randomness comes in handy in many different places. It&rsquo;s useful in the logic of many games to make enemies behave in an unpredictable fashion, it can distribute the timing of events when used within a retry mechanism and random data is sometimes integral to AI algorithms. In this post,…