Improve refresh screen system

This commit is contained in:
Diogo Cordeiro 2020-02-12 18:05:47 +00:00
parent ace698b10e
commit 7708bdf06b

View File

@ -54,7 +54,10 @@ void setup() {
}
void loop() {
delay(300);
for (int i = 0; i < 420; ++i) {
refresh_screen();
}
delay(42);
if (!move_snake(read_sensors())) {
switch(cur_dir)
{
@ -219,6 +222,13 @@ void blink(int x, int y)
}*/
void write_new_screen(int delay_write, int x, int y) {
for (int i = 0; i < 20; ++i) {
refresh_screen();
}
pixels[x][y] = LOW;
}
void refresh_screen() {
// iterate over the rows (anodes):
for (int thisRow = 0; thisRow < 8; thisRow++) {