snow.pde 431 B

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