Sort of paint for fun.
Posted: Mon Sep 05, 2016 9:04 pm
Hello fellow gamebuino fans. I have wrote a very simple and basic paint software (maybe etch-a-sketch?) for gamebuino. All it dose is draw one pixel at the coords x, y. By pressing the arraw keys you move the pixel on the screen. The button B clears the screen.
Is there any way to gat a print screen and save it to SD? It would be nice to be able to do this.
If you draw something cool please post it here
Thanks for taking your time to read this
Georgian.
Is there any way to gat a print screen and save it to SD? It would be nice to be able to do this.
If you draw something cool please post it here
Thanks for taking your time to read this
Georgian.
- Code: Select all
#include <Gamebuino.h>
#include <SPI.h>
Gamebuino gb;
byte x = 0;
byte y = 0;
void setup() {
gb.begin();
gb.titleScreen(F("Paint DEMO"));
gb.display.persistence = true;
gb.display.clear();
} //setup END
void loop() {
if (gb.update()) {
if (gb.buttons.pressed(BTN_C)) {
gb.titleScreen(F("Paint DEMO"));
} // if (gb.buttons.pressed(BTN_C)) END
if (gb.buttons.pressed(BTN_DOWN)) {
y += 1;
//gb.display.drawFastHLine(x, y, 1);
}
if (gb.buttons.pressed(BTN_UP)) {
y -= 1;
//gb.display.drawFastHLine(x, y, 1);
}
if (gb.buttons.pressed(BTN_LEFT)) {
x -= 1;
//gb.display.drawFastVLine(x, y, 1);
}
if (gb.buttons.pressed(BTN_RIGHT)) {
x += 1;
//gb.display.drawFastVLine(x, y, 1);
}
if (gb.buttons.pressed(BTN_B)) {
gb.display.clear();
}
gb.display.drawPixel(x, y);
} //if (gb.update()) END
} //loop END