Ok, here's my attempt using the watchdog timer jitter. It's slow (64 bit/s) and I can't prove that it's truly random, but it doesn't require external components or timers, seems to test well, and is at least more random looking than TrueRandom:
LICENSE.txt
MIT License
Copyright (c) 2012 endolith
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
This file has been truncated. show original
probably_random.ino
#include <stdint.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
byte sample = 0;
boolean sample_waiting = false;
byte current_bit = 0;
byte result = 0;
void setup() {
This file has been truncated. show original
probably_random_with_TimerOne.ino
#include <stdint.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include <TimerOne.h>
byte sample = 0;
boolean sample_waiting = false;
byte current_bit = 0;
byte result = 0;
This file has been truncated. show original
There are more than three files. show original
https://secure.flickr.com/photos/56868697@N00/sets/72157629934367149/
Tested only on my Duemilanove.