Commit Graph

377 Commits (c89b202cf13cc58b276e90ed1ce0084601dfdfa8)
 

Author SHA1 Message Date
bpds c89b202cf1
Merge branch 'main' of github.com:benoit-pereira-da-silva/devices into main 2 years ago
bpds d15a6e9300
Fixing inconsistent Read of device id on multiple instantiation. 2 years ago
bpds 5fec9d4a45
Added I²C support.
- Removed useless ReadRaw
- Changed the scope of ReadAndCombine to private readAndCombine
2 years ago
bpds c666127d16
Some adxlXXX device may be well-supported so i added an internal switch to automatically recognize the device or enable to test one by declaring its expected value. 2 years ago
bpds c7ff3e4ed4
Prepare to support I2C in the future 2 years ago
bpds 8f0a10cd20
Doc 2 years ago
bpds d4248ebe06
Licence compliance, adding Copyright 2023 The Periph Authors. All rights reserved.... 2 years ago
bpds d22b1046b4
- Mark the register constants more explicitly.
- 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.
2 years ago
bpds 490bf3b7d0
Sensitivity String returns a human readable value 2 years ago
bpds 4c68073542
Added a bunch of clarifications 2 years ago
bpds e9a2fa73f9
Expose the simpliest api possible. 2 years ago
bpds dc6dcef45a
Keep it simple remove useless Acceleration func 2 years ago
bpds 641bb8a883
Added sensitivity option. 2 years ago
bpds 8778b8a954
adxl345: Driver, initial commit for review. 2 years ago
bpds 3dfa61987f
Fixing inconsistent Read of device id on multiple instantiation. 2 years ago
bpds 5eba749b5f
Added I²C support.
- Removed useless ReadRaw
- Changed the scope of ReadAndCombine to private readAndCombine
2 years ago
bpds 9ddc05227d
Some adxlXXX device may be well-supported so i added an internal switch to automatically recognize the device or enable to test one by declaring its expected value. 2 years ago
Benoit Pereira da Silva 931687b33a
adxl345: Driver, initial commit for review. (#66)
Accelerator sensor. Supports SPI, designed to support I2C in the future.
2 years ago
bpds b62bbe245f
Prepare to support I2C in the future 2 years ago
bpds a5a4a2c870
Doc 2 years ago
bpds 99ce1e25a3
Licence compliance, adding Copyright 2023 The Periph Authors. All rights reserved.... 2 years ago
bpds 7e0a946901
- Mark the register constants more explicitly.
- 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.
2 years ago
bpds 75b1480cb3
Sensitivity String returns a human readable value 2 years ago
bpds 9f4770f8c7
Added a bunch of clarifications 2 years ago
bpds 76bf276307
Expose the simpliest api possible. 2 years ago
bpds 006e2f063c
Keep it simple remove useless Acceleration func 2 years ago
bpds d3ad1aac1e
Added sensitivity option. 2 years ago
bpds a0f580fcea
adxl345: Driver, initial commit for review. 2 years ago
M-A c14e02d418
go.mod bump to go1.20 (#58)
Update github actions.
3 years ago
emulatorchen 8b220202b3
lirc requries linebreak \n for SEND_ONCE (#57)
Co-authored-by: Victor Chen <vc@discoverelement.com>
3 years ago
Çağlar Onur e271f7c07b
[inky] Add Inky Impression 5.7" and 4" support (#55)
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.
3 years ago
eldondevat ae3205944c
ina219: Interpret signed output register values (#54)
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>
4 years ago
Marc-Antoine Ruel 212f060876 Remove compatibility with before 1.17 4 years ago
Marc-Antoine Ruel eb0d2cc2b9 Update to go1.17
Update dependencies
Update github actions
Ran gofmt
Fix one gosec warning
4 years ago
bezineb5 f454513a2a
tlv493d: improved reset logging (#53) 4 years ago
bezineb5 43cd79527c
tlv493d: Auto-reset TLV493D on error (#52) 4 years ago
Weston Schmidt a6bfa877b6
tca95xx: Add support for i/o extenders. (#51) 4 years ago
Matt Hazley 600c8cc85c
Added a new set of Opts for the waveshare 2in13 rev2.1 - needed a different LUT (#49)
Co-authored-by: Matthew Hazley <Matthew.Hazley@dyson.com>
4 years ago
Florian Klink 05bab7ef1f
nrzled.NewSPI: also add padding in the front (#48)
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>
4 years ago
Marc-Antoine Ruel 4dd649e46c github actions: remove golint
It's been deprecated since 2020. Good bye
4 years ago
Marc-Antoine Ruel 0fff63390d github actions: fix actions/setup-go@v3
I was misusing semver, using ^ where I wanted ~
4 years ago
hansmi 0012149b5d
waveshare2in13v2: Support rotation of image (#46)
* 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>
4 years ago
Michael Hanselmann 394037d235 waveshare2in13v2: Simplify memory area configuration
Use Go's built-in "encoding/binary" package to encode the memory area
size and re-use the encoded positions for setting the counters.
4 years ago
Michael Hanselmann 0349dabcd3 waveshare2in13v2: List width first in String() result
The convention is to write dimensions with the width first.
4 years ago
Michael Hanselmann 59e1d3f851 waveshare2in13v2: Add test for New()
Ensure the internal buffer has the correct size and a few other
properties are correct.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
4 years ago
Michael Hanselmann 0e5a5b501f image1bit: Fix typos 4 years ago
Falk Scheerschmidt f6271cf4a4 add sgp30 air quality sensor 4 years ago
Michael Hanselmann 36e39aaecb waveshare2in13v2: Clarify documentation on controller
Additional research provided information confirming that Waveshare
2.13in v2 displays are in fact GDEH0213B72, not GDEH0213B73, or at least
equivalent.
4 years ago
Michael Hanselmann 8f521b945e videosink: Implement rate-limiting, keep-alive
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>
4 years ago
Michael Hanselmann 1b1970bf7c waveshare2in13v2: Use drawing functionality for clearing
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.
4 years ago