- Moved the Sensitivity constants to a dedicated section.
- SpiFrequency is set to 2Mz ( ADXL345 supports up to 5Mz )
- Removed the TurnOnOnStart options, we start measuring on instantiation.
- Minor typo and example.go fix.
- Moved the Sensitivity constants to a dedicated section.
- SpiFrequency is set to 2Mz ( ADXL345 supports up to 5Mz )
- Removed the TurnOnOnStart options, we start measuring on instantiation.
- Minor typo and example.go fix.
It is a 7 colour ePaper/eInk HAT that comes with 5.7" (600 x 448 pixel) or 4" (640 x 400 pixel).
Refactors the existing 3 color Inky and adds additional fields to
auto-detect via EEPROM.
Tested with 5.7" version.
The current and shunt voltage register values are signed, twos
complement format. In my tests interpreting them directly in the
way implemented here gave output consistent with other ina219
libraries.
Co-authored-by: Eldon Stegall <periphgithub@eldondev.com>
Some SPI devices take a while to set up for transfer, and while doing
so, show the first bit they're about to send.
This causes the first LED to always interpret the first symbol as a
logical 1. Zapping out the whole strip will leave the first LED green,
and the first pixel will always be slightly green-ish.
Prevent this, by applying the same 3 bit padding we have at the end to
the front.
Signed-off-by: Florian Klink <flokli@flokli.de>
* waveshare2in13v2: Populate bounds only once
The forthcoming introduction of image orientation will make the
computation slightly more complicated. The bounds are fixed during the
lifetime of a "Dev" instance, so it's better to retain them.
* waveshare2in13v2: Make sending image part of drawOpts
* waveshare2in13v2: Unexport drawSpec members
The members of the "drawSpec" structure are only for internal use, so
rename them to start with a lower-case letter.
* waveshare2in13v2: Implement support for rotating image
A new option named "Origin" controls which of the four corners of the
display should be used as the (0,0) position for the image. The
in-memory buffer is kept in logical orientation. The actual rotation
happens only when sending updates.
By aligning the buffer accordingly the code is already prepared for
a more efficient sending of image data for the "TopRight" and
"BottomLeft" origins. See the TODO comment on "drawSpec.BufferDstOffset"
for details.
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Additional research provided information confirming that Waveshare
2.13in v2 displays are in fact GDEH0213B72, not GDEH0213B73, or at least
equivalent.
Resolve the remaining two TODOs by adding an upper limit on the frame
rate (defaults to 15 per second) and sending an image every once in
a while even when there were no changes (defaults to once a minute).
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
With the introduction of the shadow buffer in commit 4f99575 there's
always a sufficiently large memory buffer to keep the bytes to send for
clearing and the dedicated code using a smaller buffer is no longer
needed. This also has the advantage of automatically updating both
on-device buffers.