Clock and thermometer based on arduino and max7219 led panel
Could be installed by Tools -> Manage Libraries and then search by name, or by downloading .zip from github and unzipping inside arduino's libraries folder.
Space invader:
const uint8_t F_INVADER = 2;
const uint8_t W_INVADER = 12;
static const uint8_t PROGMEM invader[F_INVADER * W_INVADER] =
{
0x00, 0x70, 0x10, 0x7d, 0xb6, 0x3c, 0x3c, 0xb6, 0x7d, 0x10, 0x70, 0x00,
0x00, 0x1c, 0x28, 0x7d, 0x36, 0x3c, 0x3c, 0x36, 0x7d, 0x28, 0x1c, 0x00
};
Mushroom:
const uint8_t F_MUSHROOM = 2;
const uint8_t W_MUSHROOM = 11;
static const uint8_t PROGMEM mushroom[F_MUSHROOM * W_MUSHROOM] =
{
0x00, 0x1c, 0x62, 0x91, 0xb1, 0x91, 0xb1, 0x91, 0x62, 0x1c, 0x00,
0x00, 0x1c, 0x62, 0x91, 0x91, 0x91, 0x91, 0x91, 0x62, 0x1c, 0x00
};
- Text seems to be reversed and blocks independent.
Change
HARDWARE_TYPE
variable toFC16_HW
as MAX7219 is of this type:
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
- Permission denied when uploading sketch:
avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
Solution: sudo chmod a+rw /dev/ttyUSB0