I haven’t been able to get the sample ‘EPaper29b.ino’ to run correctly (just displays gibberish on the display) but I can run the Rotated example fine. One question, where is the screen orientation set in this example? I tried playing with swapping the width and height values (thinking maybe it was derived from there) but that didn’t work. I also thought maybe it was the first few lines inside
loop(), but when I comment out all of the code inside
loop() it still runs in portrait orientation.
I see the paint class has some methods regarding orientation but I don’t see that they are called in the example. Am I missing something? I appreciate any help. Thanks.
These are the lines that actually set the screen orientation for the
Paint object according to the preselected orientation variable
if (orient & 0x01) paintRed.SetRotate(po); else paintBlack.SetRotate(po);
EPaper29b.ino I’d have to have a look what I get.
Why the if() statement? Why not just call SetRotate() to whatever orientation you want?
I was able to get the display to work in landscape with paintBlack.SetRotate(LANDSCAPE) , which I put into the setup() function, so thanks for your help!
Because it is a sample that should illustrate the use and continuously rotates the black and red portion alternately.
I saw that Sparkfun started carrying what looks like the same three color E-ink displays that Waveshare is also using on their products.
They are offering 4 & 7-inch displays that work with their adapter board.
I found a seller on Amazon that stock these same display model numbers with USA Amazon stock which is excellent and the larger displays are cheaper on Amazon.
I’m curious if Sparkfun’s Library for these displays is an improvement over the Waveshare or current library that you have been working on.
Sparkfun’s library for these displays is located here:
I’m interested in testing some of these out along with a low power indoor/outdoor solar harvesting battery charging chip I’ve been testing.
I’m hoping the Sparkfun library may make using multiple sized E-Ink screens easy with just a single library.
If any of you guys test out this Sparkfun library with your current Waveshare displays, I would love to hear about if they worked or not.
Thanks for the pointer to the display–it is a “SparkX” product, an experimental product that they may have for only a limited time.
I like my display but the update rate for the three color (white/black/red) is very long at somewhere around 15 seconds. The three color displays do not support partial refresh either.
There is also the number of write cycles problem where you can’t in theory write it every minute even without wearing it out in a year. I’m currently writing mine every 5 minutes.
They are beautiful and crisp displays and they definitely have their place in the world, but you have to work within their boundaries.
I forgot to mention that Adafruit is also selling a three color with added SRAM to store bitmaps a library.
@ScruffR I’m trying to work with the b/w/r Waveshare display (already have working code running the b/w version based on Martin Schreiber’s code found here) but am finding your example library isn’t working. I commented out the two line that were preventing compilation (curious why you disabled set width/height) and I’m just getting gibberish on the display. Only difference in wiring is using D7 instead of D4. Any suggestions on what I’m doing wrong?
I have the Waveshare black/red/white 1.54" display working with my own code and modified versions of the Waveshare libraries. My code is very prototype oriented and messy so I am hesitant to share it since it might be difficult to understand.
My pin definitions are:
// Pin definition #define RST_PIN D6 #define DC_PIN A6 #define CS_PIN A2 #define BUSY_PIN D5
So what are you connecting to D7? D7 might be a bad choice due to the LED, but I think it should work.
Ugh, A7. I’m connecting BUSY to A7 on the Photon.
Full pin list:
- BUSY - A7
- RST - A0
- DC - A1
- CS - A2
- CLK - A3
- DIN - A5
This pinout is working for the 2.9" b/w model. But switching the display and library to the b/w/r 2.9" model isn’t working.
OK that pinout should be OK.
You have to set the height and width since the power-up default for the controller is 96x230 and not 128x296. Your library should do this for you but you mentioned problems with height and width. See page 12 of this spec:
If you are not setting the size properly, you could be getting gibberish.
You also need 9472 bytes of bitmap storage for the two colors which is a lot so your program may be memory limited.
Can you send me a SHARE THIS REVISION link for your code?
Here you go.
Also attaching a video of what’s happening. Apparently the upload feature isn’t working
Well I read your code and parts seem OK but there is a lot going on for a first attempt at making it work. You have the
IMAGE_RED arrays declared
extern which seems wrong since they are further down in the same file. You have a bunch of code dealing with the paint object which you will need later but I would start with just the
const arrays for black and red (which will eventually need to be non-const). You call
epd.DisplayFrame() and then call
I would remove all the paint object stuff for now and just call
epd.DisplayFrame(IMAGE_BLACK, IMAGE_RED); and see if you can get an image that makes sense. It took me a while with the 1.54" display to figure out which direction was which at that is important since one direction is packet with 8 pixels per byte. I used my big image arrays to put boxes in the corners and then was able to figure out which direction was which. On my display
0xff is white and zero bits are black/red. My display takes 10-12 seconds to paint both black and red and my first attempts to update it were failing because I was trying to write to the display too quickly.
@TrikkStar, have you tried the demos that come with the library?
I’m mostly with @bko’s suggestions.
The “gibberish” I see on my display with your code suggests that the image buffer “orientation” does not fit the screen orientation.
The demos in the Particle library, or demos directly from Waveshare?
meaning the Particle library