const int SER = 8; // DATA
const int LATCH = 9; // RCLK or sr1:STCP
const int CLK = 10;
byte leds = B10101010;
long test_sum(long a, long b) {
return a + b;
}
void setup() {
Serial.begin(115200);
int pins[3] = {
[0] = SER,
[1] = LATCH,
[2] = CLK
};
for (int i = 0; i < 3; i++) {
pinMode(pins[i], OUTPUT);
}
unsigned char *p = 0x0100;
Serial.println(*p);
}
void loop() {
digitalWrite(LATCH, LOW);
shiftOut(SER, CLK, MSBFIRST, leds);
digitalWrite(LATCH, HIGH);
Serial.println(leds, BIN);
//leds =~ leds;
delay(1000);
long v = test_sum(3, 4);
leds = (byte)(random(0, 0xFF));
}