Step 4: Connect the Arduino to a Computer
First download the arduino sketch (make sure you have the newest version of the arduino software) and burn it to your arduino.
Then, download one of the processing sketches.
A couple of notes about the software:
The arduino sketch constantly reads pin 8, checking for a pulse from the geiger counter. When it detects a pulse, it checks the time in milliseconds that the arduino has been running for. It does this four times and then finds the length of time between the first and second pulses and the third and fourth pulses. If the first length of time is greater than the second length of time, then the bit will be a 0. If the second length of time is greater than the first length of time, then the bit will be a 1. Once the bit is generated, it is sent to the computer. This is based of the algorithm used by http://www.fourmilab.ch/hotbits/
There are two different versions of the processing sketch, one with biased bits, and the other with unbiased bits. The difference is that the biased one may be biased slightly due to the hardware, but produces a bit every four counts of radiation. The unbiased sketch preforms an XOR operation on two incoming bits to remove hardware bias, but produces a bit every 8 counts, doubling the time it takes for bits to be produced.
Regardless of the version you chose, the processing sketch will run until it makes 1000000 bits (or you turn it off). Every 500 bits, it saves the bits to a text file that you specify when the sketch starts up.
Remove these ads by
Signing Up

























Not Nice














Visit Our Store »
Go Pro Today »



