#include "GameBoy.h" //підключаємо бібліотеку робокотиків
GameBoy gb; // псевдонім для геймбою
int pointX = 1; //!!!!!!!!
int pointY = 12; //!!!!!!!!
int car[4][3]={
{0, 1, 0},
{1, 1, 1},
{0, 1, 0},
{1, 0, 1}
};
void cs(int x, int y){// cs - carShow - показатиМашинку
for(int c=0; c<=2; c++)//c-column-стовпчик
for(int r=0; r<=3; r++)//r-row-рядок
gb.setLed(x+c, y+r, car[r][c]);
}
void setup() {gb.begin(0);}
void loop() {
gb.clearDisplay();
cs(pointX, pointY); //!!!!!!!!
// 3up 6down 4left 5right
// pointX = gb.getKey();//!!!!!!!!
if(gb.getKey() == 4) pointX =1;//!!!!!!!!
if(gb.getKey() == 5) pointX =4;//!!!!!!!!
delay(80);
}