MAin screen is done

This commit is contained in:
2023-08-01 21:47:29 +03:00
parent 51d004b4a4
commit fb1436db18
3 changed files with 261 additions and 390 deletions

View File

@ -1,6 +1,4 @@
#include <Wire.h>
//#include <Adafruit_GFX.h>
//#include <Adafruit_SSD1306.h>
#include <RotaryEncoder.h>
#include <FlexiTimer2.h>
#include <EEPROM.h>
@ -16,17 +14,6 @@
#define MINBPM 20
#define SCREEN_TIMEOUT 600000 //Turn display off after 5 min
/* Rev 1 Config
#define ENC_BTN_PIN 14
#define ENC_D1_PIN 17
#define ENC_D2_PIN 4
#define START_STOP_BTN_PIN 5
#define EXT_INPUT_PIN 2 //needs to be an interrupt pin
#define ANALOGUE_INPUT_1_PIN A2
#define ANALOGUE_INPUT_2_PIN A1
const int outsPins[6] = {6, 11, 7, 10, 8, 9};
*/
// Rev 2 and 3 Config
#define ENC_BTN_PIN 14
#define ENC_D1_PIN 17
@ -127,26 +114,20 @@ bool encPressRegistered;
U8G2_SSD1306_128X64_NONAME_2_HW_I2C u8g2(U8G2_R2, SCL, SDA, U8X8_PIN_NONE);
RotaryEncoder encoder(ENC_D1_PIN, ENC_D2_PIN, RotaryEncoder::LatchMode::TWO03);
const uint8_t velvetscreen[597] U8G2_FONT_SECTION("velvetscreen") =
"I\0\2\2\3\3\3\3\4\5\5\0\0\5\0\5\0\0\363\0\0\2\70!\6)\251\254\0\42\6\23"
"\317$\25#\12-\351UC\345\241*\0$\11,\331\215\24e\32\11%\12-\351\250\244r\245\222\0"
"&\11-\351\351*\311\250\2'\5\21\257\10(\6*\271\251\62)\10*\271\304\224\24\0*\11-\351"
"V\325jF\0+\7\33\313\245\225\0,\5\21\251\10-\5\13\315\14.\5\11\251\4/\7$\331\307"
"\66\0\60\10,\331\251h&\5\61\7+\311\310\326\0\62\11,\331l\224T\36\1\63\11,\331l\224"
"\64\32\11\64\10,\331D\71t\1\65\11,\331\14\275\321H\0\66\11,\331\251\274bR\0\67\10,"
"\331\214\34\353\10\70\11,\331\251\230TL\12\71\11,\331\251\230vR\0:\6\31\253\244\0;\6!"
"\251$\1<\7+\311\246\272\0=\6\33\313\354\1>\7+\311\344\252\4\77\11,\331l\224\64\216\0"
"@\12-\351\255J\215\14\27\0A\10,\331\251\70\246\14B\11,\331\254\70R\34\2C\11,\331\251"
"\250cR\0D\10,\331\254h\216\4E\10,\331\14=\364\10F\10,\331\14\275r\6G\10,\331"
"\215\234f\32H\10,\331D\71\246\14I\6)\251\14\1J\10,\331\327\62)\0K\11,\331D\225"
"d*\3L\7,\331\344\366\10M\11-\351\344\265\222\326\1N\11-\351\344\251\222\334\1O\10,\331"
"\251h&\5P\11,\331\254\70R\316\0Q\10,\331\251h\305\24R\10,\331\254\70R\63S\11,"
"\331\215\214\64\32\11T\7+\311\254\330\2U\10,\331DgR\0V\12-\351d\235\312\224#\0W"
"\12-\351d\225TR]\0X\11,\331D\231T\224\1Y\12-\351\344Tg\224Q\4Z\7+\311"
"\314T\16[\6*\271\254J\134\11$\331d\224QF\1]\6*\271\250j^\5\23\317\65_\6\14"
"\331\214\0o\7[\333\214\64\2p\11-\351-\265\227Z\0q\7-\351\35_\13r\10+\311D\65"
"T\4s\7-\351\334\366\30t\7-\351\374G\0u\10-\351\334*\351\61v\5\211\335\4w\12-"
"\351\255J\215\234\26\0x\6\33\311\244\16\0\0\0\4\377\377\0";
const uint8_t velvetscreen[416] U8G2_FONT_SECTION("velvetscreen") =
"\62\0\2\2\3\3\1\3\4\5\5\0\0\5\0\5\0\0\216\0\0\1\203 \4@:%\11m:*"
"\251\134\251$(\6jn\252\14)\7j.\61%\5+\7\333ri%\0,\5Q*\2-\5K"
"\63\3.\5I*\1/\6d\366\261\15\60\10lv*\232I\1\61\6k\62\262\65\62\11l\66\33"
"%\225G\0\63\11l\66\33%\215F\2\64\7l\66Q\16]\65\11l\66Co\64\22\0\66\11l"
"v*\257\230\24\0\67\10l\66#\307:\2\70\11lv*&\25\223\2\71\11lv*\246\235\24\0"
":\5\331*)A\10lv*\216)\3B\11l\66+\216\24\207\0C\11lv*\352\230\24\0D"
"\10l\66+\232#\1E\10l\66C\17=\2F\10l\66C\257\234\1G\10lv#\247\231\6H"
"\10l\66Q\216)\3I\5i*CJ\7l\366\265L\12K\11l\66Q%\231\312\0L\7l\66"
"\271=\2M\11m:y\255\244u\0N\11m:y\252$w\0O\10lv*\232I\1P\11l"
"\66+\216\224\63\0Q\10lv*Z\61\5R\10l\66+\216\324\14S\11lv##\215F\2T"
"\7k\62+\266\0U\10l\66\321\231\24\0V\11m:Y\247\62\345\10W\12m:Y%\225T\27"
"\0X\11l\66Q&\25e\0Y\12m:\71\325\31e\24\1Z\7k\62\63\225\3r\10k\62Q"
"\15\25\1t\6m:\377\21w\11mz\253R#\247\5x\6[\62\251\3\0\0\0\4\377\377\0";
void setup() {