sketch.ino 729 B

123456789101112131415161718192021222324252627282930
  1. #include <EEPROM.h>
  2. #include <SPI.h>
  3. #include <GD2.h>
  4. void setup() //' a{
  5. {
  6. Serial.begin(115200); // JCB
  7. GD.begin(~GD_STORAGE);
  8. GD.cmd_memset(0, 0, long(GD.w) * GD.h); // clear the bitmap
  9. GD.Clear(); // draw the bitmap
  10. GD.ColorRGB(0x202030);
  11. GD.cmd_text(240, 136, 31, OPT_CENTER, "sketch demo");
  12. GD.BitmapLayout(L8, GD.w, GD.h);
  13. GD.BitmapSize(NEAREST, BORDER, BORDER, GD.w, GD.h);
  14. GD.Begin(BITMAPS);
  15. GD.ColorRGB(0xffffff);
  16. GD.Vertex2ii(0, 0);
  17. GD.swap();
  18. GD.cmd_sketch(0, 0, GD.w, GD.h, 0, L8); // start sketching
  19. GD.finish(); // flush all commands
  20. }
  21. void loop() { } //' }a
  22. /* JCB{
  23. delay(60000);
  24. GD.cmd_stop();
  25. GD.dumpscreen();
  26. } }JCB */