2019-02-02 16:54:24 +01:00
|
|
|
#include "pattern.h"
|
|
|
|
#include "led.h"
|
|
|
|
#include "PontCoopScheduler.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void patternExec() {
|
|
|
|
static uint8_t i = 0;
|
|
|
|
static uint8_t j = 0;
|
|
|
|
|
2019-02-02 18:03:04 +01:00
|
|
|
ledSetMatrix(i, j, OFF);
|
2019-02-02 16:54:24 +01:00
|
|
|
|
|
|
|
i++;
|
|
|
|
if (i > 3) {
|
|
|
|
i = 0;
|
|
|
|
j++;
|
|
|
|
if (j > 3) {
|
|
|
|
j = 0;
|
|
|
|
}
|
|
|
|
}
|
2019-02-02 18:03:04 +01:00
|
|
|
ledSetMatrix(i, j, BLUE);
|
2019-02-02 16:54:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void patternInit() {
|
2019-02-02 18:03:04 +01:00
|
|
|
schAdd(patternExec, NULL, 0, 500);
|
2019-02-02 16:54:24 +01:00
|
|
|
}
|