GithubHelp home page GithubHelp logo

sharp_display's Introduction

Sharp LCD Display Clock and Pimoroni Inky Impression Calendar

Notes

Can I use the tplot library to make a ascii visualised (hehe) plotted chart for temp over time? https://github.com/JeroenDelcour/tplot

Description

I wanted a non-intrusive clock and calendar on my desk that could funtion as I wanted it to. There's no snootiness there, I'm just very particular about things in my line of sight when I'm writing code, I wan't things that will tell me detail when I want to know, not when they think I have to know (thats a big difference to me), so I made this.

It all started when I got a Inky Impression from PimoroniInky Impression to use as a display for my Google Calendar. I chose this as I wanted something paper-like on my desk, something that didn't issue light as this would be less distracting (well, when it's not updating once an hour).

Calendar Display

E-Ink displays are awesome at being non-intrusive, the image is stable and just sits there, if you do lose power it doesn't care, it carries on showing the image, no state changes unless you tell it to. ...however they can be quite distracting when they do update, especially if like me you have a display with multiple colours and you want to update the whole canvas. It looks like a Spectrum 48k if someone tripped over the headphone cable to the tape drive when it was loading something, so I only update once an hour (it's fine for a calendar).

So, E-Ink for calendar is excellent, really good use case, but I want a desk clock with it, and this has similar requirements. It should require minimal control, and be non-intrusive.

Non-intrusive to me means ideally not casting light, so I opted for a Adafruit 2.7" LCD Sharp Display as it has no backlight.

A little bit on where to get the calendar data from, I used Google Calendar data for a while, and that was fine but I didn't need anything more than a developers app access for it, so I had to refresh the token every week which became quite boring after a while. I've since installed Xandikos (notice the complete lack of link there, as I'll explain in a moment I can't really reccomend it, it works for me but only just), Xandikos serves CalDav calendars, so thats nice.

CalDav seems like a bit of a bag of nails when you get further in, not bad but not enforcey so I've got my implementation working with a couple of kludges (if when getting a event you get loads of collections of columns, mix them all into one set, then look for what you care about..). Also, and this was really fun to debug, the CalDav python library throws an absolute fit if it gets naive datetimes (without concrete locale) for it's start/ends, so if you do use this, make sure when you are creating cal appts you specify a concrete locale (London, etc). Oh and all day events apparently don't even return, but I suspect that's more to do with Xandikos than anything.

Still, it works so ship it!

Screen Display

Detail

This whole thing was originally two seperate projects, but as times gone on I've pulled them together as there's a lot I want to use this for as I'm using the buttons on the Inky to change things and displaying the output on the LCD.

It's all in Python(3) because when I get to choose a language I like my languages to be friendly.

It uses 12h time because I prefer 12h time.

It uses Open Weather Map's API, if you want to use it you'll need a API key from them with the following environmental variables:

export OPENWEATHER={your open weather map api key}
export MYLOCATIONLAT={your lat}
export MYLOCATIONLONG={your long}

It uses a font with icons for the weather icons stashed in unicode addresses, so I've used isneezy's open-weather-fonts for this as it was the only one I could bloody well find that had references between the OpenWeatherMap's icon codes and the Unicode character addresses so I could create a simple mapping betwixt the two. Massive shouts out to isneezy for this, I was dreading creating my own mapping.

The temperature to the right is pulled from a temperature sensor rig in my garden. You'll likely want to change that... ;)

The line under the time is a seconds percentage bar for that minute :)

The Degrees C values (yes I also added a convertor helper function for the people out there that prefer Farenheit) are the 'feels like' values, cos frankly thats all I'm going to care about at a glance, if I want more then there is more available from this data set and I guess I'll need another screen or something. I dunno.

The Open Weather Map API is only called once an hour.

sharp_display's People

Contributors

headstrongsolutions avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.