Files
InsoLab/minuteur/bitmaps.h
jearz 41fdaaa1ae Divers ajouts et correctifs
ajout sauvegarde en flash
et ajout écran de veille
2026-05-22 00:35:39 +02:00

116 lines
6.7 KiB
C

/*----------------------------------------------------------------------
Project: InsoL@b
Author : user@B0 Tetalab.org
File : bitmaps.h 2025-05-21
This work is copyrighted under CERN Open Hardware Licence Version 2
------------------------------------------------------------------------
----------------------------------------------------------------------*/
#ifndef _INSOLAB_BITMAP_H_
#define _INSOLAB_BITMAP_H_
#define LOGO_COLOR 1 // display SSD1306 black
#define LOGO_X0 0 // logo bitmap width offset to center bitmap
#define LOGO_Y0 0 // logo bitmap height offset to center bitmap
#define LOGO_WIDTH 128
#define LOGO_HEIGHT 32
// logoBN128x32.png | 128x32 | 1-bit vertical bytes (LSB=top)
const unsigned char logo_bmp[] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xe0, 0x0f,
0xa0, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x0f, 0xff, 0xff, 0xff, 0xe8, 0x0f,
0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xe0, 0x0f,
0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0x81, 0xff, 0xff, 0xff, 0xe3, 0x81,
0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0x81, 0xff, 0xff, 0xff, 0xe3, 0x81,
0xfe, 0x3f, 0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0xc7, 0xfc, 0x60, 0x00, 0x30, 0x00, 0x03, 0xe0, 0x01, 0x80, 0x00, 0x03, 0xe0, 0x0f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
// RTTTL sounds
#include <anyrtttl.h>
#include <binrtttl.h>
#include <pitches.h>
const char * _missip1_=
"mip:d=16,o=6,b=95:32d,32d#,32d,32d#,32d,32d#,32d,32d#,32d,32d,32d#,32e,32f,32f#,32g,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f";
const char * _count_=
"Pacman:d=32,o=6,b=112:b.5,b.,f#.,d#.,b.,f#.,16p,16d#,c.,c.7,g.,e.,c.7,g.,16p,16e,b.5,b.,f#.,d#.,b.,f#.";
const char * _finish_=
"LightMyFire:d=4,o=5,b=140:8b,16g,16a,8b,8d6,8c6,8b,8a,8g,8a,16f,16a,8c6,8f6,16d6,16c6,16a#,16g,8g#,8g,8g#,16g,16a,8b,8c#6,16b,16a,16g,16f,8e,8f,1a,a";
const char * _logo_ = "Star Trek:o=5,d=16,b=63,b=63:8f.,a#,4d#6.,8d6,a#.,g.,c6.,4f6";
const char * _neon_ =
"Neonligh:d=4,o=5,b=100:8e#7,16p,16d#7,8d#7,8p,16c#7,8c#6,16a#6,8e#7,16p,16d#7,8d#7,8p,8c#7,16a#6,8e#7,16p,16a#6,8a#6,8p,16c#7,8d#7,16e#7,8e#7,16p,8d#7";
const char * _com_ = "Communic:d=4,o=5,b=100:16g#7,8a#7,16a#7,16a#7,8f#7";
const char * _pop_ = "Popcorn:d=1,o=5,b=800:8c6,8a#,8c6,8g,8d#,8g,c6";
const char * _clk_ = "clock:d=16,o=8,b=420:b7,32p,c";
void playRTTTL (screen_t itune){
//#ifdef SOUND_ON
switch (itune) { // ugly code to manage SOUND off
case sNONE : noTone(PIEZO); // PIEZO defined in main
return;
case sLOGO : anyrtttl::blocking::play(PIEZO, _logo_); break;
case sTITRE : ; break; //rtune = _missip1_
case sCHOIX : anyrtttl::blocking::play(PIEZO, _com_); break;
case sEXPOS : anyrtttl::blocking::play(PIEZO, _finish_); break;
case sREGLE : ; break; //tune = _count_
default : ; break;
}
}
void playPop(){ anyrtttl::blocking::play(PIEZO, _pop_);}
void playClk(){ anyrtttl::blocking::play(PIEZO, _clk_);}
// Snooze screen saver
#define SNOOZE_HEIGHT 16
#define SNOOZE_WIDTH 16
#define XPOS 0 // Indexes into the 'icons' array in function below
#define YPOS 1
#define DELTAY 2
#define _DISPLAYWIDTH 128
#define _DISPLAYHEIGHT 32
#define FLOCONS 4 // snowflakes in animation
const unsigned char flake_bmp [] PROGMEM = {
0x01, 0x80, 0xc3, 0xc3, 0xe3, 0xc7, 0xfb, 0xdf, 0x7f, 0xfe, 0x3f, 0xfc, 0x1f, 0xf8, 0x0f, 0xf0,
0x0f, 0xf0, 0x1f, 0xf8, 0x3f, 0xfc, 0x7f, 0xfe, 0xfb, 0xdf, 0xe3, 0xc7, 0xc3, 0xc3, 0x01, 0x80
};
// 'smiley', 16x16px
const unsigned char smiley_bmp [] PROGMEM = {
0x07, 0xc0, 0x1f, 0xf0, 0x3f, 0xf8, 0x7f, 0xfc, 0x63, 0x8c, 0xdd, 0x76, 0xd3, 0x96, 0xe7, 0xce,
0xff, 0xfe, 0xfd, 0x7e, 0x6f, 0xec, 0x73, 0x9c, 0x3c, 0x78, 0x1f, 0xf0, 0x07, 0xc0, 0x00, 0x00
};
// 'frown', 16x16px
const unsigned char frown_bmp [] PROGMEM = {
0x07, 0xc0, 0x1f, 0xf0, 0x3f, 0xf8, 0x67, 0xcc, 0x53, 0x94, 0xdd, 0x76, 0xd9, 0x36, 0xe1, 0x0e,
0xff, 0xfe, 0xff, 0xfe, 0x78, 0x3c, 0x73, 0x9c, 0x37, 0xd8, 0x1f, 0xf0, 0x07, 0xc0, 0x00, 0x00
};
//sprite_t smiley = { 6, 16, 16, 0, 1, 2, smiley_bmp };
//sprite_t frown = { unsigned short c6, 16, 16, 0, 1, 2, frown_bmp };
#endif // _INSOLAB_BITMAP_H_