Random Command

KeithRB

Senior Member
I am thinking about creating an LED flickerer to simulate fire. What kind of distribution does the Random command create?

What is the period?
 

hippy

Technical Support
Staff member
RANDOM is implemented as a 16-bit Linear Feedback Shift Register (LFSR) on the variable specified. Various taps feed XOR gates to create the new lsb. Not sure which bits are the taps but it has maximal length before repeating.
 

Rickharris

Senior Member
I am thinking about creating an LED flickerer to simulate fire. What kind of distribution does the Random command create?

What is the period?
Quite a reasonable firelight / candles flicker can be produced very easily by using the tune command but putting an LED on the output rather than a speaker. - This is how a lot of commercial offerings do it.
 

manuka

Senior Member
Almost what I was going to say! The exact nature of the generating technique can be almost incidental if a flickering flame effect looks convincing.
 

Janne

Senior Member
Some flickering led candles will indeed play music if you attach a small speaker to them :)
 
Top