<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Random Integer Problem]]></title><description><![CDATA[<p dir="auto">I'm trying to generate a new random number every time the unit gets reset/rebooted but it always returns the same number, 6 in this case. Any thoughts on how this could be done? Is it a bug in Random Integer? It will be running on an ATOM Lite (testing on a Core2 so I see it on screen)</p>
<p dir="auto"><img src="/assets/uploads/files/1700735596047-uiflow_block_1700735577078.png" alt="0_1700735595822_uiflow_block_1700735577078.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/topic/5843/random-integer-problem</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 01:02:18 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5843.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Nov 2023 10:34:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Random Integer Problem on Thu, 23 Nov 2023 11:03:27 GMT]]></title><description><![CDATA[<p dir="auto">According to <a href="https://xkcd.com/221/" target="_blank" rel="noopener noreferrer nofollow ugc">https://xkcd.com/221/</a> the random number should be 4  :-)<br />
In reality a randomizer will just be an algorithm to create numbers and often they get initialized by a timer. So if you always start the same code after reset and read the number it seems to met always the same initialisation. I miss a function to "randomize" the initialisation. Try to do it by any loop/function before that delays in a random way e.g. connection to wifi or read from a noisy AD channel until a specific value is read.</p>
]]></description><link>https://community.m5stack.com/post/22871</link><guid isPermaLink="true">https://community.m5stack.com/post/22871</guid><dc:creator><![CDATA[holofloh]]></dc:creator><pubDate>Thu, 23 Nov 2023 11:03:27 GMT</pubDate></item></channel></rss>