TSP
HTML-код
- Опубликовано: 28 авг 2024
- In this episode Shahriar demonstrates the capabilities of a Waveshare 7.5-Inch tricolor e-Paper display. By combining the display with a Raspberry Pi Zero, the SPI interface of the mini-computer can be used to program and configure the e-Paper display using Python scripts. Furthermore, the Python script takes advantage of the available API of a few website to provide relevant information such as the current date, calendar, task list with due-dates as well as the current weather and weather forecast all in a clean user interface.
The complete Python code is presented and analyzed and the principle operation of the display is also presented. Do not forget to check Applied Science's video on this topic as well:
• E-paper hacking: faste...
Finally, the individual pixels are examined under the microscope while the screen undergoes a refresh which demonstrated how various colors are displayed.
The complete code can be downloaded here:
www.TheSignalpa...
You can also buy the e-Paper display here:
amzn.to/2BtCuW8
Raspberry Pi Zero kit here:
amzn.to/2DV7LDE
If you are interested in using an ESP WiFi module with Arduino to interface with the e-Paper display, it can be found here:
amzn.to/2Kv874k
You can chose any picture frame to complete the project. The Task Manager and Weather APIs can be found here:
www.ToDoist.com
openweathermap...
Some inspiration for this project:
• Task List using Raspbe...
The Signal Path
www.TheSignalPath.com
/ thesignalpath
www.Patreon.com/TheSignalPath
Shahriar, it's good to see other topics as well. My personal preferences are more in depth electronics stuff than programming. For example I love your repair videos. Based on the current topic of this video. I'd love to see more on the SPI level, some logic level stuff, kind of just look under the hood what drives the panel itself.
Extremely clean code. Beautiful.
Improvement: those ttf fonts end up looking pretty awful on a 1-bit display, all deformed and misaligned. You can get much more well rendered text by using purposely designed 1-bit bitmap fonts.
Can you kindly point me to these optimized fonts?
Wow - the refresh is painfull. 31 seconds to do a full refresh. I thought my 7.5 display was faulty! but see yours does the same.
Was super excited when seeing this videos, but more for the local/partial update reasons.
Love the gratuitous use of Kapton tape, nice explanation of interesting display tech.
How come, that the differently charged particles don't attract each other?
The only question I have is did Pooch get all those pets and treats?
Indeed.
I got the same question!
Pooch is the best
Yes! Very happy Pooch!
No idea if you check comments on old videos, but the asyncio library is perfect for scheduling repetitive tasks like grabbing fresh API data.
Very nice! But the microscope view puzzled me a bit. I expected the “lines” to follow the honey-cone frame. But same separations black/white where half way???
I think the hexagons are just structural spacers if not walls and don't have anything to do with displaying the image. In LCDs for example there are spacers between the glass sheets to keep a uniform distance. The displayed shapes (be it segments, pixels, symbols; whatever the LCD is made for) are purely defined by the shape of the electrodes, not by "containing" the fluid inside some walls.
In case of e-ink the walls would also prevent sideways migration of the particles, so that one pixel that is supposed to be black doesn't attract all the black particles from around it. Without walls you could have areas where the constant attraction of black particles has pushed away all the white/red particles, leaving some areas unable to display black and others unable to display anything but black. This wouldn't be an issue with b/w e-ink displays btw. because there the particles are combined on spheres that just turn around.
@@superdau There is something missing from the explanation. The honey-comb structure does not hold the particles itself. Under it are "micro capsules" that are small balls that contains the ink particles.
I am really looking forward to the day where we have really good true colour eink displays so I can finally have a changing picture frame
Just want to respond to this to let you know they do exist now!. :)
@@casperr3717 link?
@@Sarge92 ruclips.net/video/YawP9RjPcJA/видео.html
I had this project started with an ESP32 and a kindle 3 display. Never found time to program the driver and the PCB ended up collecting dust =(( Goal was to get 3 month of operation on a single charge...
Can you do this with the epd7in5V2 screen, or does the code change?
Great vid, but I think the code download link doesn't work, could you please look into it? I want to get started with programming this display, I could really use the code.
Please do the same now with the 9.7 grayscale display ;-) Keep it up!
Love your tutorials, keep them up!
Use polyimide tape to stick the paper down to the table, its exactly how it should be done.
Can you please upload a version where you don't make a cut in the video between the point where you run the script (22:48) to the point where the screen updates? Or a least write the time it takes in the description. Thank you.
Shahriar, how is it that your code is also beautiful! Skill level extraterrestrial!
It really is not beautiful. As a software engineer I can tell you that it really breaks a lot of widely accepted recommended practices. But hey, if it works it doesn't matter. Still not beautiful.
@@kathipaw Perhaps. But the code is easy to read, well organized, and logical - and that to me is beautiful.
@@JGunlimited it's not well organized. All the global variables are testimony for that. But I guess we have different points of view about this.
I liked the work Shahriar! Mersi! And it will be cool to talk a bit more about this in detail if you have time?
I still wonder why these displays for the maker market are still so expensive - many stores e.g. MediaMarkt in Europe uses large e-paper displays all over the shop to replace earlier printed paper versions. This means that there must be a source of very cheap versions otherwise it would not pay off to use e-paper...
in the video you should use a larger font in your editor if you want your audience to be able to follow what you are doing...
Yes I noticed the same thing. In some supermarket, all price labels are now epaper. But it costs so much to buy a single one for making stuff, even from china
Simply because a retail company uses a product does not mean the product needs to be affordable for the maker market. LED billboards are a perfect example of this. Some marketing decisions are based upon the wow factor, impressing customers or just having a progressive tech look, not basing decisions on display being cheaper than paper labels over the course of xx years. In the USA Kohl's & Beals uses e-ink heavily, in Thailand Uniqlo uses them. I have never put them to use beyond the breadboard stages personally, due to price.
My though is that they're paying similar prices still. The real cost savings is not paying someone an hourly wage to print and replace stickers weekly or daily. It's all controlled by the main corporate office with a single click.
Wow that's cool! Thanks for showing this mate :)
Excellent work with the display. I'm tinkering with one myself, but I'm far from finished as the refresh rate of the display may be the decision point against this type of display. One remark that I would like to make is the use of global variables. My programming professor once advised to reduce the use if possible. For ease of use this is probably the best and straight forward solution, but I still would have tried to put it in a class or at least put them declaration outside the main() function. I'd love to hear your thoughts about my remark as I'm still a novice when it comes to programming, so I like to learn to understand your reasoning. cheers.
Where in the code do you define which elements to render as red, as far I can see the declaration for image red and image black are identical except for name
Interesting project but it isn't very cost efficient when the e-color display alone is $74 USD. I can buy a cheap android tablet for the same price that has a full color IPS display that is infinitely more useful.
Wow, Big job, nice coding
Thanks for sharing :-)
mh, I wonder if partial refresh can be used to update a hh:mm clock in real time.It should be noted when the burn in kicks-in and then do a full refresh when needed. Maybe even a localized full refresh (if it is possible?)
Paper tablets like the reMarkable has real time drawing and updating of the screen per-pixel, fast enough to make handwriting feel natural. Faster than most actual graphics tablets. I don't know what kind of vodoo magic they are emplying to make that possible, since they are using a real e-paper display (I own one, can verify it displays the same picture even if completely unpowered). But clearly there is some trick to it. Probably local updating like you said, updating tiny areas of the display as needed. It does occasionally do a full-screen refresh which only takes 1 second or so, but it seems they eventually have to reset the charge on all the particles.
Any way to, rather than just display some kind of weather/other 'guage' display - to just 'echo' or pipe a terminal/screen session to the display? I've been looking for ways to use a standard black/white epaper display, as a nice and clean, low power, portable console device (I have to connect to all sorts of routers, firewalls, etc. to do troubleshooting and configs). I would really like to just build my own schweet little lightweight device that can last me ALL DAY, without lugging around my ancient laptop I have to plug in at every stop, cuz the batteries only last a couple hours otherwise.
These things look great. However, to buy one with a regular HDMI port is like $549 minimum. There's tons of these at a good size for less than $160, with under 1 sec refresh rates.
Thanks!
Hi can you please help me with my display.... It's not responding at all......program executes fine but I couldn't see any changes in display module.......
Too bad you don’t show how to connect the display and make some basic tests; mine does not seem to work, but I don’t know why.
Shahriar I did make a pot of coffee while watching so I might have missed it if you did, but had you experimented with partial updating/refresh? For example, simply refreshing the small red/white section of ... & 2 more ...? No sense in refreshing the entire display for a minor update, right?
It doesn't really support partial update unfortunately.
So far I had to change some imports to use 'from PIL', and i forget a bunch of changes i had to make...
Now im getting a Type Error that I cant seem to resolve.
TypeError: Can't multiply by non-int of type 'float'
Beautiful!
Dude this is a great project!
Where did you find buy this frame? Is it stainless steel or aluminum?
It is Aluminum. I found it at a local CVS. Nothing special about it...
Hi, first time ever, working with a raspberry. I'm trying to implement your code, but I receive this error:
File "/usr/local/lib/python3.7/dist-packages/Jetson/GPIO/gpio_pin_data.py", line 343, in get_data
raise Exception('Could not determine Jetson model')
Exception: Could not determine Jetson model
Any ideia?
Thanks!
Can you update only the part of the screen that changes? Redrawing the entire display (31 seconds) every 1 minute (to update the clock in the lower-right corner) destroys the entire point of using e-ink ...
This was the limitation of the display unfortunately. I think they may have new ones which can be updated partially.
Mine doesn't present the due date as "Nov 20" in the far right of every line, but in the format YYYY-MM-DD. This doesn't fit on the screen. How do I change the format to the format you're using? Thanks in advance!
Yeah, I had a similar issue. Look at the Python version and packages you have installed.
Thank you for the great video. I'm wondering, is there some way to display online image please? I would like to display current weather radar, although I know, that the image will need to be preprocessed due to limited colors on this display.
Can we use this for displaying rendering time left of a software....
Please help
Hi, would your routine work with a larger display? If so, which characteristic would determine the limit? Thx!
The link for the code is broken, would you please update it?
Oh found it: www.TheSignalpath.com/uploads/ePaper_Frame.zip
wget thesignalpath.com/uploads/ePaper_Frame.zip
This is a great tutorial Shahriar, thanks. Is the Python code still available? The links on RUclips and your website no longer work.
Right click >> Save Target As >>
is partial refresh possible or not on multicolour displays epaper like this?
There is something here that I don't understand. When we see the microscope image, the black line cuts one of the cells completely in half. So is the size of the cells nothing to do with the resolution of the display? Is the resolution to do with the size of the underlying electrodes then? Thanks.
Yeah i was kind of thinking that too. You imagine that each cell would be all one colour. Interesting tech.
Probably the true resolution is due to the electrode size underneath. I guess the oil is viscous enough so lateral diffusion is low enough and walls per pixel are not needed. This is good because more walls equals a darker display. I guess this thing could be a giant single cell, the walls are structural and to keep eventual damage localized.
I think the hexagons are just structural spacers if not walls and don't have anything to do with displaying the image. In LCDs for example there are spacers between the glass sheets to keep a uniform distance. The displayed shapes (be it segments, pixels, symbols; whatever the LCD is made for) are purely defined by the shape of the electrodes, not by "containing" the fluid inside some walls.
In case of e-ink the walls would also prevent sideways migration of the particles, so that one pixel that is supposed to be black doesn't attract all the black particles from around it. Without walls you could have areas where the constant attraction of black particles has pushed away all the white/red particles, leaving some areas unable to display black and others unable to display anything but black. This wouldn't be an issue with b/w e-ink displays btw. because there the particles are combined on spheres that just turn around.
are e-paper displays suitable for DIY synthesizers and midi-controllers to visualize parameter changes and evolving audio dynamics?
No, they're too slow. Use an OLED display for that.
Shahriar please, can you boost the audio by at least 3db, on your videos, it's particularly low.
Thank you for this video.
I'd vote for you
Hi, could you please show a textbook page on your eink display for resolution comparison please? Thank you.
Is it touch? How do you expand the "2 more" in the task list?
There is no touch, it's more of an alert that there's more than the screen can display
really usefull - thanks!
Nice Job!
Love it
When The Signal Path makes a tutorial, I know I won't be making it.
are e-paper screens with RGB colors available?
not unless you want one that has an LCD panel on top. E-ink makes such a thing impossible, only one extra color as here. E-wetting may make this possible, though it is far away.
Is is possible to program other colors in the screen, too?
No, this one is only three colors.
Useful video 👍
Hi, r u available on Facebook or WhatsApp? Need more information on the eink devices and their programming..
Another great video, however the view of all those globals made my eyes bleed. Using global symbols for everything is an extremely bad style of programming. You completely loose control over what data is available where, and it's very easy to make a mistake, which will be a huge PITA to debug. One of the most tragic failures in automotive industry of recent years, which caused many deaths (unintended acceleration in Toyota cars), was partially attributed to a huge swarm of global variables. Of course code displaying information on a display is nowhere close to the level of criticality of firmware controlling operations of a car, but the principle of limiting scope of visibility of variables still holds. Even with descriptive variable names, when you return to the code in several months to change something, you may have to spend a lot of time on figuring out what you wanted to do, and what is the intended value of a variable.
Variables storing information shared by several separate blocks of code are often necessary, however their visibility should be limited. One of the very useful tools to limit scope of visibility are classes and objects (let's not talk about functional programming here). You could split the code info several sections responsible for fetching weather, to-do list, operations on the display, etc, and use them in the top-level code like Lego blocks. Another big advantage of such architecture would be decoupling of data processing from presentation. With careful design you may be able to change in the future provider of the todos, or weather, or even change the code driving the display without a need to touch a single line in the top-level code or other, unrelated components.
Another useful habit is keeping blocks of code short, at most one screen long. It is a soft requirement, there are situations where it is not possible to split the program into such small pieces, but again, spending some time on thinking about design of the structure of the code will save a lot of time in the future, when you will have to make changes to the program.
Yes, you are right. The bare code I started with had a lot of global variables and I never bothered to get rid of them and make the program better.
can it be lit up for night view ?
Ask RoGeorgeRoGeorge
, he has an amazing video about a blinking light...
@@thekaduu I was looking more for candle light effects.
I need one of those so bad. But 13"", to read comfortably
I don't understand why this technology is so expensive =(
I think it should be a lot cheaper than a normal screen, I don't know if it's because they are not so common in the market
Greetings from Colombia
COOL :)
I made a PV power status display using one of their smaller displays. Code and photo here: github.com/josefjahn/energydisplay
The code only works on Linux :(
That's because it uses spidev module.
wireless energy harvest to charge a batt, may not be fast enough for a clock, seconds anyway...
Indoor solar cells like those used on calculators and keyboards should be fine
Tha's not honeycomb, Shahriar.
Alexey Zaytsev You are right! What I drew was not a honeycomb.
Uh oh, too many globals on that py code! 🤣
I know, I know. :)
If I were you, I'll stick to the RF/microwave topics.
RUclips already has enough RPi or Python videos.
Apparently, RUclips must not have enough videos on blinking lights... So you uploaded one too. Congrats on your achievement! When are you getting the platinum play button? Let me know...
@thekaduu No need to attack him personally, just because you disagree with him!
@@Garbaz... are you his RUclips attorney? If not, and when you are done (when his hands are free, I mean), tell him to type his own comments... personally.
Whyyyyyyyyyyy.
boring