Skip to content

Commit 7f51bbc

Browse files
committed
Release v1.1.0
1 parent b2a768b commit 7f51bbc

File tree

5 files changed

+39
-30
lines changed

5 files changed

+39
-30
lines changed

ESTimer.ino

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
#define INCLUDE_OLED 0
1+
#define INCLUDE_OLED false // Change it to true if you assemble monitor version
2+
#define BRIGHTNESS_OLED 0.5 // In Range of 0 to 1
3+
#define FLIP_VERTICAL_CONTENT false // If you have connect your ES Timer to right side of computer must change it to true
24

35
#include <ESTimer.h>
46
#if INCLUDE_OLED
57
#include "Fonts.h"
8+
#include "Images.h"
69
#endif
710

811
#define seconds(n) (n)
@@ -50,6 +53,9 @@ void initTimer() {
5053
EEPROM.get(8, countDonePomodoros);
5154

5255
#if INCLUDE_OLED
56+
#if FLIP_VERTICAL_CONTENT
57+
ESTimer.flipVerticalContent();
58+
#endif
5359
splash();
5460

5561
initNumbers();
@@ -126,6 +132,12 @@ void startCountdownTimer(bool isAwake) {
126132
}
127133

128134
#if INCLUDE_OLED
135+
void splash() {
136+
ESTimer.drawBitmap(46, 0, 82, 8, es_logo);
137+
ESTimer.delay(3000);
138+
ESTimer.clear();
139+
}
140+
129141
void drawNumbers(uint8_t m0, uint8_t m1, uint8_t s0, uint8_t s1) {
130142
ESTimer.drawBitmap(65, 1, 100, 4, numbers[m0]);
131143
ESTimer.drawBitmap(65, 4, 100, 7, numbers[m1]);
@@ -138,12 +150,6 @@ void initNumbers() {
138150
drawNumbers(t, t, t, t);
139151
}
140152

141-
void splash() {
142-
ESTimer.drawBitmap(46, 0, 82, 8, es_logo);
143-
ESTimer.delay(3000);
144-
ESTimer.clear();
145-
}
146-
147153
void initStatusPomodoros() {
148154
for (uint8_t i = 0; i < 16; i += 2) {
149155
if (i < 8) {

Fonts.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,6 @@
22

33
// bitmap to code -> https://javl.github.io/image2cpp/
44

5-
const unsigned char es_logo[] PROGMEM = {
6-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf8,
7-
0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00,
8-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf8, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x0f,
9-
0x07, 0x03, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x07, 0x0f, 0x0f, 0x3f, 0xff,
10-
0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
11-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
12-
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
13-
0xff, 0xff, 0x7f, 0x3f, 0x00, 0x80, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7,
14-
0xe7, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
15-
0x00, 0x00, 0x0f, 0x87, 0xe1, 0xf0, 0xfc, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff,
16-
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x1f, 0x1f, 0x3f, 0xff, 0xff, 0xfe, 0xfc, 0xf0, 0xe1,
17-
0x87, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
18-
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
19-
0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1f, 0x3f, 0x7f, 0xff,
20-
0xff, 0xfc, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
21-
0x00, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
22-
0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f,
23-
0x1f, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
24-
};
25-
265
const uint8_t numbers[10][105] PROGMEM = {
276
{
287
// 0

Images.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include <avr/pgmspace.h>
2+
3+
// bitmap to code -> https://javl.github.io/image2cpp/
4+
5+
const unsigned char es_logo[] PROGMEM = {
6+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf8,
7+
0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00,
8+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf8, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x0f,
9+
0x07, 0x03, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x07, 0x0f, 0x0f, 0x3f, 0xff,
10+
0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
11+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
12+
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
13+
0xff, 0xff, 0x7f, 0x3f, 0x00, 0x80, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7,
14+
0xe7, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
15+
0x00, 0x00, 0x0f, 0x87, 0xe1, 0xf0, 0xfc, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff,
16+
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x1f, 0x1f, 0x3f, 0xff, 0xff, 0xfe, 0xfc, 0xf0, 0xe1,
17+
0x87, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
18+
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
19+
0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1f, 0x3f, 0x7f, 0xff,
20+
0xff, 0xfc, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
21+
0x00, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
22+
0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f,
23+
0x1f, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
24+
};

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ After opening the file `EsTimer.ino` in `Arduino IDE` In order to be able to up
5858

5959
`Arduino IDE Toolbar -> Sketch -> Include Library -> Add .ZIP Library...`
6060

61-
If you have assembled the monitor version, you need to change the value of `INCLUDE_OLED` to `1`. Now to upload the code in `ES Timer` click on the arrow button or use shortcut `Ctrl + U`. Wait for the code to be compiled. After you see the `Please plug in the device ...` message. Connect the device to the computer. After a maximum of 5 seconds, the code will be uploaded. Congratulations 🎉, your ES Timer is ready to use.
61+
If you have assembled the monitor version, you need to change the value of `INCLUDE_OLED` to `true`. Now to upload the code in `ES Timer` click on the arrow button or use shortcut `Ctrl + U`. Wait for the code to be compiled. After you see the `Please plug in the device ...` message. Connect the device to the computer. After a maximum of 5 seconds, the code will be uploaded. Congratulations 🎉, your ES Timer is ready to use.
6262

6363
## Configurations
64-
You can customize the awake and sleep system. All you have to do is change the definition values of `AWAKE_TIME` and `SLEEP_TIME`.
64+
You can customize the awake and sleep system. All you have to do is change the definition values of `AWAKE_TIME` and `SLEEP_TIME` also, if you want you can change the brightness OLED by changing `BRIGHTNESS_OLED` defines in range of `0..1` and if you have connected your ES Timer to right side of computer must change `FLIP_VERTICAL_CONTENT` to `true`
6565

6666
**Note 📝**: According to the code, the maximum definition time for `AWAKE_TIME` is 99 minutes and for `SLEEP_TIME` is a quarter `AWAKE_TIME`.
6767

lib/ESTimer.zip

88 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)