Giter Site home page Giter Site logo

Comments (8)

aceisace avatar aceisace commented on August 15, 2024

@surak
The red part does not need to be calibrated if the E-Paper display does not support red. It's only intended for the 3-Colour E-Paper display.

I've updated the calibration file when I released v1.2. Here is the link to the updated calibration file. It's now installed by default when running the new installer.

from inkycal.

surak avatar surak commented on August 15, 2024

How about a setting "display=color| display=bw"? Something like that? That would eliminate those hacks and scripts, as both are supported at the same time.

from inkycal.

aceisace avatar aceisace commented on August 15, 2024

That's a good idea. I'll add an option to choose the display version (bw/colour) in the main script and test it out. Once that is ready, I'll let you know.

from inkycal.

aceisace avatar aceisace commented on August 15, 2024

@surak
I've just released an updated installer for the next release (v1.3). It has more options in the settings.py file (including an option to choose the display) and doesn't require seperate folders for bmps either.

The installer has been cleaned up greatly and is less complicated now.

from inkycal.

aceisace avatar aceisace commented on August 15, 2024

I've tested the new version (v1.3) and it seems to work fine on my E-Paper Display. Can I ask you to review the new version before I officially release the new version? Thanks in advance

from inkycal.

surak avatar surak commented on August 15, 2024

Sorry for the delay. Usually, I only have the weekends. I merged your master into my fork and it works wonderfully. I am still trying to remove the bitmaps for the month and change it into a short list of the next day's appointments.

About the month: I managed to write it using TrueType fonts instead of bitmaps - it's just a big number after all. What do you think?

from inkycal.

aceisace avatar aceisace commented on August 15, 2024

@surak
Thanks for the reply. I'll wait for your replies on weekends then. I'm glad to hear the new Installer and version (1.3) are working fine.

Showing upcoming events on the display is a good idea. If you need help with extracting the events from the iCal, I can provide you with an example code. Let me know if you need it.

As for replacing the months bmp with writing using ttf, I have a tip: Do take a look at the temperature, humidity and date writing functions in the main script (stable.py). All of these functions create a box first, add writing, rotate the box by 90 degrees clockwise and place it on the given position.

Please keep in mind that this method is a lot more complicated than simply pasting an image with fixed dimensions at a given place. For reference, a more detailed explanation of the date writing function at the top left corner:

  • option 1:
    # date writing function
    space1=Image.new('1', (115,25), color=255) ->define a box with the size: 115x25px in white
    date = ImageDraw.Draw(space1) -> define drawing that box
    date.text((2, 3), (time.strftime('%a %-d %b %y')), font=font, fill=0) -> write the date in the box with an x-offset of 2 and y-offset of 3 using the font defined before in black fill
    rotate1 = space1.rotate(270, expand=1) -> rotate that box 90° clockwise, expanding it to prevent stretched or squashed images.
    image.paste(rotate1, (595,20)) -> paste the image on the display at position 595(x) and 20(y)

But placing an image is very simple:

  • option 2
    draw = (ImageDraw.Draw(image)).bitmap -> describe what 'draw' means
    icon = open(path_to_icon.bmp) ->define name and path of bmp
    place = (340,280) -> x and y co-ordinates on where to place the icon
    draw(place, icon) -> draw the icon at the place

For static content which doesn't change, I'd recommend the latter option. I'm not sure if it's possible but if you know of a way to create a function that does all the steps from the first option, it'll make writing text a lot easier. Then you won't have to write all of this each time you want to write text on the display.

from inkycal.

aceisace avatar aceisace commented on August 15, 2024

I'm closing this issue for now. If you think that this issue should remain open, please let me know.

from inkycal.

Related Issues (20)

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.