23 lines
467 B
Arduino
23 lines
467 B
Arduino
|
const unsigned int LED_BIT0 = 10;
|
||
|
const unsigned int LED_BIT1 = 11;
|
||
|
const unsigned int LED_BIT2 = 12;
|
||
|
|
||
|
void outputResult(const long result) {
|
||
|
digitalWrite(LED_BIT0, result & B001);
|
||
|
digitalWrite(LED_BIT1, result & B010);
|
||
|
digitalWrite(LED_BIT2, result & B100);
|
||
|
}
|
||
|
|
||
|
void setup() {
|
||
|
pinMode(LED_BIT0, OUTPUT);
|
||
|
pinMode(LED_BIT1, OUTPUT);
|
||
|
pinMode(LED_BIT2, OUTPUT);
|
||
|
|
||
|
randomSeed(analogRead(A0));
|
||
|
|
||
|
outputResult(random(1, 7));
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
}
|