snow.ino 514 B

123456789101112131415161718192021222324
  1. #include <SPI.h>
  2. #include <GD.h>
  3. #include "random.h"
  4. void setup()
  5. {
  6. GD.begin();
  7. int i;
  8. Serial.begin(1000000); // JCB
  9. for (i = 0; i < 256; i++) {
  10. GD.wr16(RAM_PAL + (4 * i + 0) * 2, RGB(0,0,0));
  11. GD.wr16(RAM_PAL + (4 * i + 1) * 2, RGB(0x20,0x20,0x20));
  12. GD.wr16(RAM_PAL + (4 * i + 2) * 2, RGB(0x40,0x40,0x40));
  13. GD.wr16(RAM_PAL + (4 * i + 3) * 2, RGB(0xff,0xff,0xff));
  14. }
  15. GD.microcode(random_code, sizeof(random_code));
  16. }
  17. int shot; //JCB
  18. void loop()
  19. {
  20. // GD.screenshot(shot++); //JCB
  21. }