3 ms·
Simonoids. It's 'Simon' in an Altoids can powered by Arduino
- TazeTSchnitzel 15y agoSorry, am I missing something here? It just seems like one of many simple electronics projects, nothing strikes me as very special about it.
- lifeisstillgood 15y agoIts not supposed to be special to us all, just to jgc. If it gets voted up a lot, it's special to someone. Aha - I have found the tagline for the Facebook IPO ;-)
- jgrahamc 15y agoYou're not missing anything, except, perhaps that simple is ok. For some people projects like this are quite complex, for others trivial. My personal purpose in building this is that it was fun, the blog post is there so that others can see how they themselves might build something like this.
- simcop2387 15y agoI'm curious how he tackled the issue of the random number generator in the arduino. The fairly simple one included in avr-libc would be prone to repeating after a power off. There's two ways I can think of to deal with that, save the state in the EEPROM so that it doesn't repeat, or add a hardware based random number generator, i'd like to know which he ended up going with.
- jgrahamc 15y agoIt's in the source code on github (https://github.com/jgrahamc/simonoids/blob/master/simonoids.ino https://github.com/jgrahamc/simonoids/blob/master/simonoids....). I use a combination of reading the microsecond time (hoping that there'll be some variation because of the ADC conversion time), reading floating ADC inputs and storing random values from previous execution in the EEPROM: // Set the random number generator from a seed generated by reading from a // floating analog pin or two long seed = micros(); for ( int i = 0; i < 1000; ++i ) { seed += analogRead(0); seed += analogRead(1); seed += micros(); } // Use EEPROM locations to store a value from the random number generator so that from // switch on to switch on the seed will change even if the above loop always gave the same // value for ( int i = 0; i < 4; ++i ) { seed += (long)EEPROM.read(i); } randomSeed(seed); for ( int i = 0; i < 4; ++i ) { EEPROM.write(i, random(0,255)); }
- simcop2387 15y agoAh I had missed the link to the github code in there. I like the idea of reading some floating analog pins to get some entropy.