Compare commits

...

21 Commits

Author SHA1 Message Date
Paco Hope ae854a7312 moving things a little 2022-04-05 18:46:55 -04:00
Paco Hope cdb56a9508 Updated weather to work with Watchy 1.3.2. Not quite right yet... 2022-01-08 11:07:35 -05:00
Paco Hope 3aef672c4f Added settings.h to work with Watchy v1.3.2 2022-01-08 10:01:27 -05:00
Paco Hope 1a8e2260eb Updated to more Bahn view 2022-01-06 22:43:41 -05:00
Paco Hope 32df788a61 added more details 2022-01-06 22:40:53 -05:00
Paco Hope 06595065f7 added 2022-01-06 22:40:32 -05:00
Paco Hope fc0de77c98 additional resources 2021-12-28 12:53:57 -05:00
Nicholas Hope a676b57031 documented more features 2021-12-28 10:51:54 -05:00
Nicholas Hope 9b580c3a6d updated 2021-12-28 10:48:28 -05:00
Paco Hope ec16a83d20 delete 2021-12-28 10:12:14 -05:00
Paco Hope 9652e0ac32 Updated 2021-12-28 10:11:59 -05:00
Frans van Bellen d2f0444533
Merge pull request #3 from TheLastProject/TheLastProject-patch-1
Add weather info
2021-08-15 19:47:44 +02:00
Sylvia van Os 1ad0bbc8d6
Add weather info 2021-08-04 23:16:13 +02:00
Brain in a Bowl 8f7f107c30 Reset steps at midnight 2021-07-01 20:59:09 +02:00
BraininaBowl e2026a11d9 filename change 2021-02-07 22:20:23 +01:00
Frans van Bellen 7fe96eea48
Add files via upload 2021-02-05 22:18:24 +01:00
Frans van Bellen 18265ddab5
Merge pull request #1 from BraininaBowl/add-license-1
Create LICENSE
2021-02-02 15:22:30 +01:00
Frans van Bellen cbd15ab228
Create LICENSE 2021-02-02 14:22:45 +01:00
Frans van Bellen feb0b9a42b
Update README.md 2021-02-02 14:19:11 +01:00
Frans van Bellen 3deb088d6f
Add files via upload
More minor design tweaks.
2021-01-31 21:02:38 +01:00
Frans van Bellen 5b26f4772f
Add files via upload
Improved battery indicator and minor design tweaks.
2021-01-30 21:54:58 +01:00
9 changed files with 854 additions and 2865 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.vscode
fontconvert

View File

@ -1,97 +0,0 @@
#include <Watchy.h> //include the Watchy library
#include <DIN_1451_Engschrift_Regular64pt7b.h>
#include <DIN_1451_Engschrift_Regular12pt7b.h>
class WatchFace : public Watchy { //inherit and extend Watchy class
public:
void drawWatchFace() { //override this method to customize how the watch face looks
int16_t x1, y1, lasty;
uint16_t w, h;
String textstring;
bool light = true;
//drawbg
display.fillScreen(light ? GxEPD_WHITE : GxEPD_BLACK);
display.fillRoundRect(2,2,196,196,8,light ? GxEPD_BLACK : GxEPD_WHITE);
display.fillRoundRect(6,6,188,188,2,light ? GxEPD_WHITE : GxEPD_BLACK);
display.setFont(&DIN_1451_Engschrift_Regular64pt7b);
display.setTextColor(light ? GxEPD_BLACK : GxEPD_WHITE);
display.setTextWrap(false);
//draw hours
textstring = currentTime.Hour;
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.setCursor(184-w, 100-5);
display.print(textstring);
//draw minutes
if (currentTime.Minute < 10) {
textstring = "0";
} else {
textstring = "";
}
textstring += currentTime.Minute;
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.setCursor(183-w, 100+3+h);
display.print(textstring);
// draw battery
display.fillRoundRect(16,16,34,12,4,light ? GxEPD_BLACK : GxEPD_WHITE);
display.fillRoundRect(49,20,3,4,2,light ? GxEPD_BLACK : GxEPD_WHITE);
display.fillRoundRect(18,18,30,8,3,light ? GxEPD_WHITE : GxEPD_BLACK);
float batt = (getBatteryVoltage()-3.8)/0.40;
if (batt > 0) {
display.fillRoundRect(20,20,26*batt,4,2,light ? GxEPD_BLACK : GxEPD_WHITE);
}
display.setFont(&DIN_1451_Engschrift_Regular12pt7b);
lasty = 200 - 16;
//draw steps
textstring = sensor.getCounter();
textstring += " steps";
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.fillRoundRect(16,lasty-h-2,w + 7,h+4,2,light ? GxEPD_BLACK : GxEPD_WHITE);
display.setCursor(19, lasty-3);
display.setTextColor(light ? GxEPD_WHITE : GxEPD_BLACK);
display.print(textstring);
display.setTextColor(light ? GxEPD_BLACK : GxEPD_WHITE);
lasty += -8-h;
// draw year
textstring = currentTime.Year + 1970;
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.setCursor(16, lasty);
display.print(textstring);
lasty += -20;
// draw date
textstring = monthShortStr(currentTime.Month);
textstring += " ";
textstring += currentTime.Day;
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.setCursor(16, lasty);
display.print(textstring);
lasty += -20;
// draw day
textstring = dayStr(currentTime.Wday);
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.setCursor(16, lasty);
display.print(textstring);
}
};
WatchFace m; //instantiate your watchface
void setup() {
m.init(); //call init in setup
}
void loop() {
// this should never run, Watchy deep sleeps after init();
}

View File

@ -93,8 +93,9 @@ const uint8_t DIN_1451_Engschrift_Regular12pt7bBitmaps[] PROGMEM = {
0x18, 0x70, 0x60, 0xFF, 0xF0, 0xC6, 0x10, 0xC2, 0x18, 0xC3, 0xFF, 0xC0,
0x3B, 0xD8, 0xC6, 0x31, 0x8C, 0x67, 0x30, 0xC6, 0x31, 0x8C, 0x63, 0x1E,
0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xE7, 0x8C, 0x63, 0x18, 0xC6, 0x30,
0xCE, 0x63, 0x18, 0xC6, 0x31, 0xBD, 0xC0, 0x38, 0x2F, 0xCF, 0x1F, 0xA0,
0xE0 };
0xCE, 0x63, 0x18, 0xC6, 0x31, 0xBD, 0xC0,
0x6F, 0xFF, 0xFF, 0x6F, 0xF0 // º symbol, normally 0xBA, stored at 0x7e
};
const GFXglyph DIN_1451_Engschrift_Regular12pt7bGlyphs[] PROGMEM = {
{ 0, 1, 1, 4, 0, 0 }, // 0x20 ' '
@ -191,11 +192,25 @@ const GFXglyph DIN_1451_Engschrift_Regular12pt7bGlyphs[] PROGMEM = {
{ 1104, 5, 20, 7, 0, -15 }, // 0x7B '{'
{ 1117, 2, 19, 5, 1, -15 }, // 0x7C '|'
{ 1122, 5, 20, 7, 1, -15 }, // 0x7D '}'
{ 1135, 11, 4, 16, 2, -9 } }; // 0x7E '~'
{ 1135, 4, 9, 6, 1, -15 } // 0x7E '~' replaced by 'º'
};
// Approx. 1818 bytes
const GFXfont DIN_1451_Engschrift_Regular12pt7b PROGMEM = {
(uint8_t *)DIN_1451_Engschrift_Regular12pt7bBitmaps,
(GFXglyph *)DIN_1451_Engschrift_Regular12pt7bGlyphs,
0x20, 0x7E, 27 };
0x20, 0xBA, 27 };
// Approx. 1813 bytes
// 'feet', 32x32px
// Generated using https://javl.github.io/image2cpp/
const unsigned char png_feet [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x01, 0xb7, 0x00, 0x00,
0x06, 0x87, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xfc, 0x00, 0x00, 0x1b, 0xfc, 0x60, 0x00,
0x07, 0xfc, 0x70, 0x00, 0x07, 0xfc, 0x76, 0x00, 0x0f, 0xfc, 0x75, 0x80, 0x0f, 0xf8, 0x01, 0x00,
0x0f, 0xf0, 0x00, 0xc0, 0x0f, 0xe0, 0x78, 0xc0, 0x07, 0xe0, 0xfe, 0x30, 0x07, 0xe0, 0xff, 0x30,
0x07, 0xe0, 0xff, 0x80, 0x03, 0xe0, 0x7f, 0x80, 0x03, 0xf0, 0x3f, 0xc0, 0x03, 0xf8, 0x3f, 0xc0,
0x03, 0xfc, 0x3f, 0x80, 0x01, 0xfc, 0x3f, 0x80, 0x01, 0xfc, 0x3f, 0x00, 0x01, 0xf8, 0x7f, 0x00,
0x00, 0xf0, 0xfe, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x07, 0xf8, 0x00,
0x00, 0x07, 0xf0, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x01, 0xc0, 0x00
};

File diff suppressed because it is too large Load Diff

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Frans van Bellen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

212
PacoWatchyBahn.ino Normal file
View File

@ -0,0 +1,212 @@
#include <Watchy.h> //include the Watchy library
#include "settings.h" // stupid static constants
#include "DIN_1451_Engschrift_Regular64pt7b.h"
#include "DIN_1451_Engschrift_Regular12pt7b.h"
#include "heavitas12pt7b.h"
// RTC_DATA_ATTR weatherData currentWeather;
class WatchFace : public Watchy { //inherit and extend Watchy class
using Watchy::Watchy;
public:
//! Change these if you want light background, dark text
uint16_t bg = GxEPD_BLACK;
uint16_t fg = GxEPD_WHITE;
void drawWatchFace() { //override this method to customize how the watch face looks
int16_t x1;
int16_t y1;
uint16_t w;
uint16_t h;
String textstring;
int16_t lasty;
// Flood fill with background
// display.fillScreen(bg);
// display.fillRoundRect(2,2,196,196,8,bg);
// display.fillRoundRect(6,6,188,188,5,fg);
display.setFont(&DIN_1451_Engschrift_Regular64pt7b);
display.setTextColor(fg);
display.setTextWrap(false);
drawTime( 183, 92 );
drawBattery( 8, 4 );
display.setFont(&DIN_1451_Engschrift_Regular12pt7b);
display.setTextColor(fg);
drawSteps( 8, 20 );
drawDate( 8, 140 );
display.setFont(&DIN_1451_Engschrift_Regular12pt7b);
display.setTextColor(fg);
display.setTextColor(fg);
lasty = 120;
// weather things
weatherData currentWeather = getWeatherData(settings.cityID, settings.weatherUnit,
settings.weatherLang, settings.weatherURL,
settings.weatherAPIKey, settings.weatherUpdateInterval);
textstring = "";
textstring += currentWeather.weatherDescription;
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.setCursor(16, lasty);
display.print(textstring);
lasty += -20;
// draw temperature
textstring = currentWeather.temperature;
if( currentWeather.isMetric ) {
textstring += "~ C"; // ~ will be rendered as º
} else {
textstring += "~ F"; // ~ will be rendered as º
}
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.setCursor(16, lasty);
display.print(textstring);
}
private:
// Draw step counter and footrpints icon
// x and y are the top corner
void drawSteps(uint8_t x, uint8_t y) {
int16_t x1;
int16_t y1;
uint16_t w;
uint16_t h;
String textstring;
//reset step counter at midnight
if(currentTime.Hour == 00 && currentTime.Minute == 00) {
sensor.resetStepCounter();
}
// Put the feet icon down
display.drawBitmap(x, y, png_feet, 32, 32, fg);
textstring = "000000"; // prototype 6-digit number
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
// Now we know how wide a 6-digit number would be. We want to right-justify
// our number. So figure out how wide 6 digits are, and subtract how wide
// our current number is.
x = w; //hang on to width
textstring = String(sensor.getCounter());
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.setCursor( x + 42 - w, y + 32 ); // add 32 because of icon, right justify
display.print(textstring);
}
//! Draw the battery symbol with its x and y coordinates starting at x,y
#define BATTWIDTH 26
void drawBattery( uint8_t x, uint8_t y ) {
float batt;
// draw battery
display.fillRoundRect( x, y, 34, 12, 4, fg ); // overall frame
display.fillRoundRect( x+34, y+2, 4, 8, 2, fg ); // nub, to look like battery
display.fillRoundRect( x+2, y+2, 30, 8, 3, bg ); // area for battery charge
// According to 7_SEG, 3.8 is the voltage floor. Below that is rendered as
// flat battery on that watch face.
batt = (getBatteryVoltage()-3.3)/0.9;
if (batt > 0) {
display.fillRoundRect( x+4, y+4, (BATTWIDTH*batt), 4, 2, fg ); // actual charge
}
}
void drawTemperature() {
}
//! Draw time on the right side of the face.
/**
* Note that x is the RIGHT margin, not the left. The
* numbers are right justified. The y is the top of the
* numbers.
**/
void drawTime( uint8_t x, uint8_t y ) {
int16_t x1;
int16_t y1;
uint16_t w;
uint16_t h;
String textstring;
// draw hours with leading 0
if( currentTime.Hour < 10 ) {
textstring = "0";
} else {
textstring = "";
}
textstring += currentTime.Hour;
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.setCursor( x-w, y );
display.print(textstring);
y = y + h + 8;
if( currentTime.Minute < 10 )
{
textstring = "0";
} else {
textstring = "";
}
textstring += currentTime.Minute;
display.setTextColor(fg);
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
display.setCursor( x-w, y );
display.print(textstring);
}
#define BOXX (70)
#define BOXY (50)
void drawDate( uint8_t x, uint8_t y ) {
int16_t x1;
int16_t y1;
uint16_t w;
uint16_t h;
uint8_t width;
uint8_t newx;
uint8_t newy;
String textstring;
// draw box
display.fillRoundRect( x, y, BOXX, BOXY, 2, fg ); // overall frame
// draw short day name inverted
display.setFont(&Heavitas12pt7b);
display.setTextColor(bg);
textstring = currentTime.Day;
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
h = h/2; // this font seems really tall.
// center text in box
newx = x + ((BOXX-w) / 2 );
display.setCursor( newx, y + 20 );
display.print(textstring);
// draw day
textstring = dayShortStr(currentTime.Wday);
textstring.toUpperCase();
display.setFont(&Heavitas12pt7b);
display.setTextColor(bg);
display.getTextBounds(textstring, 0, 0, &x1, &y1, &w, &h);
h = h/2; // this font seems really tall.
// Start at bottom of box, go up height, plus a small margin
newy = y + BOXY - h; // Near bottom of box
newx = x + ((BOXX-w) / 2 );
display.setCursor( newx, newy );
display.print(textstring);
}
};
WatchFace w(settings); //instantiate your watchface
void setup() {
// Weather settings are in settings.h now
w.init(); //call init in setup
}
void loop() {
// this should never run, Watchy deep sleeps after init();
}

View File

@ -1,3 +1,19 @@
# Bahn-for-Watchy
# Bahn for Watchy
My very first watchface for Watchy. Design inspired by Din Time for Pebble by Christian Liljeberg.
My very first watchface for Watchy. Forked from [Bahn for Watchy](https://github.com/BraininaBowl/Bahn-for-Watchy) by [braininabowl](https://github.com/BraininaBowl). His original design inspired by [Din Time for Pebble](https://christianliljeberg.se/din-time/) by [Christian Liljeberg](https://christianliljeberg.se/).
## Additions
- Foot icon by step counter
- Reading ambient temperature from RTC if internet is not available.
- Added degree symbol (º) to font
- Added leading zero to single-digit hours
## Useful Links
- [Online font converter](https://oleddisplay.squix.ch/#/home) Choose a font, size, and make sure to have it create **AdaFruit GFX Font**
- [LCD Image Converter](https://github.com/riuson/lcd-image-converter) and [rop.nl](https://rop.nl/truetype2gfx/)
- [DIN 1451 Engschrift](http://www.peter-wiegel.de/Din1451-H.html) font
## URL for openweathermap
- [API call](http://api.openweathermap.org/data/2.5/weather?id=4751935&units=imperial&appid=ca4849c5f0c3949bda419307e34a669e)

172
heavitas12pt7b.h Normal file
View File

@ -0,0 +1,172 @@
const uint8_t Heavitas12pt7bBitmaps[] PROGMEM = {
0x07, 0xE0, 0x1F, 0xF8, 0x3F, 0xFC, 0x7F, 0xFC, 0x7F, 0xFE, 0x7E, 0x3E,
0xFC, 0x3F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xFC, 0x3F,
0x7E, 0x7E, 0x7F, 0xFE, 0x3F, 0xFC, 0x3F, 0xFC, 0x1F, 0xF8, 0x07, 0xE0,
0x03, 0xC1, 0xF0, 0xFC, 0x7F, 0x3F, 0xDF, 0xFF, 0xFD, 0xFF, 0x3F, 0x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4'
{ 153, 14, 18, 15, 0, -17 }, // 0x35 '5'
{ 185, 13, 18, 15, 1, -17 }, // 0x36 '6'
{ 215, 13, 18, 14, 0, -17 }, // 0x37 '7'
{ 245, 14, 18, 15, 0, -17 }, // 0x38 '8'
{ 277, 14, 18, 16, 1, -17 }, // 0x39 '9'
{ 309, 5, 11, 6, 0, -10 }, // 0x3A ':'
{ 316, 5, 14, 6, 0, -10 }, // 0x3B ';'
{ 325, 11, 14, 13, 1, -15 }, // 0x3C '<'
{ 345, 11, 11, 13, 1, -13 }, // 0x3D '='
{ 361, 11, 14, 13, 1, -15 }, // 0x3E '>'
{ 381, 14, 18, 14, -1, -17 }, // 0x3F '?'
{ 413, 16, 18, 19, 2, -17 }, // 0x40 '@'
{ 449, 20, 18, 19, -1, -17 }, // 0x41 'A'
{ 494, 15, 18, 17, 1, -17 }, // 0x42 'B'
{ 528, 18, 18, 19, 0, -17 }, // 0x43 'C'
{ 569, 16, 18, 19, 1, -17 }, // 0x44 'D'
{ 605, 14, 18, 16, 1, -17 }, // 0x45 'E'
{ 637, 14, 18, 16, 1, -17 }, // 0x46 'F'
{ 669, 20, 18, 20, 0, -17 }, // 0x47 'G'
{ 714, 16, 18, 19, 1, -17 }, // 0x48 'H'
{ 750, 5, 18, 8, 1, -17 }, // 0x49 'I'
{ 762, 13, 18, 15, 0, -17 }, // 0x4A 'J'
{ 792, 16, 18, 18, 1, -17 }, // 0x4B 'K'
{ 828, 13, 18, 15, 1, -17 }, // 0x4C 'L'
{ 858, 20, 18, 24, 1, -17 }, // 0x4D 'M'
{ 903, 17, 18, 20, 1, -17 }, // 0x4E 'N'
{ 942, 18, 18, 20, 1, -17 }, // 0x4F 'O'
{ 983, 15, 18, 17, 1, -17 }, // 0x50 'P'
{ 1017, 19, 18, 20, 0, -17 }, // 0x51 'Q'
{ 1060, 16, 18, 18, 1, -17 }, // 0x52 'R'
{ 1096, 14, 18, 16, 1, -17 }, // 0x53 'S'
{ 1128, 15, 18, 15, 0, -17 }, // 0x54 'T'
{ 1162, 16, 18, 19, 1, -17 }, // 0x55 'U'
{ 1198, 19, 18, 20, 0, -17 }, // 0x56 'V'
{ 1241, 27, 18, 27, 0, -17 }, // 0x57 'W'
{ 1302, 19, 18, 18, -1, -17 }, // 0x58 'X'
{ 1345, 18, 18, 17, 0, -17 }, // 0x59 'Y'
{ 1386, 15, 18, 17, 1, -17 } }; // 0x5A 'Z'
const GFXfont Heavitas12pt7b PROGMEM = {
(uint8_t *)Heavitas12pt7bBitmaps,
(GFXglyph *)Heavitas12pt7bGlyphs,
0x30, 0x5A, 24 };
// Approx. 1728 bytes

28
settings.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef SETTINGS_H
#define SETTINGS_H
//Weather Settings
#define CITY_ID "4751935" // Chantilly, VA https://openweathermap.org/current#cityid
#define OPENWEATHERMAP_APIKEY "ca4849c5f0c3949bda419307e34a669e" //use your own API key :)
#define OPENWEATHERMAP_URL "http://api.openweathermap.org/data/2.5/weather?id=" //open weather api
#define TEMP_UNIT "imperial" //metric = Celsius , imperial = Fahrenheit
#define TEMP_LANG "en"
#define WEATHER_UPDATE_INTERVAL 30 //must be greater than 5, measured in minutes
//NTP Settings
#define NTP_SERVER "0.us.pool.ntp.org"
#define GMT_OFFSET_SEC 3600 * -5 //New York is UTC -5
#define DST_OFFSET_SEC 3600
watchySettings settings{
CITY_ID,
OPENWEATHERMAP_APIKEY,
OPENWEATHERMAP_URL,
TEMP_UNIT,
TEMP_LANG,
WEATHER_UPDATE_INTERVAL,
NTP_SERVER,
GMT_OFFSET_SEC,
DST_OFFSET_SEC
};
#endif