volatile uint8_t* const REG_GPIO = (uint8_t*)0x20000018; #define P0 (REG_GPIO[0]) #define P1 (REG_GPIO[1]) #define P2 (REG_GPIO[2]) #define P3 (REG_GPIO[3]) int kkk[1*1024]={999, 1000, 10001, 1898, 8888}; void setup() { // put your setup code here, to run once: Serial.print(" ===================="); P3 = 0xAA; delay (1000); } int t = 0; uint32_t i = 0; uint8_t led_position = 0; void loop() { Serial.print (i); i = (i + 1) %(1024); Serial.print(" ===================="); kkk [i] = kkk [i] + i; Serial.print (kkk[i]); Serial.println (" "); delay (600); led_position = (led_position + 1) % 8; P3 = ~(1 << led_position); }