CodeKit random Number Generator

Hi. I am working on a project which needs to display one of four random images on each of four LED matrix. I am not sure which commands to use in code kit to generate the random numbers. Any help would be greatly appreciated.

Sadly, the code kit app is missing this very important function. I reported this to littlebits on June 8, 2017. They promised that they were working on an update. I last heard from them on December 6, 2017 (almost a year ago), and at that time they said they were still working on it. I mean how hard is it to put a “rand()” function into this thing. So I gave up.

Thanks. Even bad news is news ;-(

Hi guys - have you tried using the random Bit with the codeBit? It can probably help for this project, although it is obviously not the solution you may be looking for.

If you place it on one of the input bitSnaps of the codeBit and trigger it via a button or any other input, I think it will produce a random voltage from 0-5 volts to the codeBit.

Link to the module:

1 Like

That’s right! I used it for a project. You can activate an output of the cloudbit that is connected to input of the random bit. Then wait some miliseconds for the signal to be stable (I’m not sure if this is really necessary but I did it) and finally, read the input of the cloudbit where the output of the random bit is connected.