Commit Graph

331 Commits

Author SHA1 Message Date
Thomas Kohler d097fae08d BUGFIX/Improvement: MPU6050 init and values 2022-10-03 12:05:07 +02:00
Thomas Kohler b4028e02ea BUGFIX/Improvement: L3GD20H full scale range usage 2022-10-02 16:31:57 +02:00
Thomas Kohler 2476bd9541 BUGFIX/Improvement: TH02 wrong register for heater, use i2c.Driver 2022-10-02 15:47:41 +02:00
Thomas Kohler 28c08be4a8 introduce PCA9501 driver inspired by mcp23017_driver and example for digispark 2022-10-02 14:51:53 +02:00
Thomas Kohler ad59d23e2e introduce generic i2c.Driver with example for digispark
fix missing/wrong entries in README
stabilize test
2022-10-02 14:18:08 +02:00
Thomas Kohler fc4894bd51 NEW: i2c.ReadBlockData(), BUGFIX: Read*Data() in digispark and some small other fixes 2022-10-01 17:33:02 +02:00
Thomas Kohler 3b3ad4df0e add AnalogActuatorDriver, analog temperature sensor, driver for PCF8591 (with 400kbit stabilization), driver for YL-40 2022-04-24 11:14:45 +02:00
Thomas Kohler 63472854a6 mcp23017: add mutex for write, hd44780: fix mutexes 2022-04-17 16:29:33 +02:00
Thomas Kohler 4565cc38de introduce adafruit1109 2x16 LCD with 5 keys 2022-04-17 16:29:33 +02:00
Thomas Kohler 1cd34fdde0 don't panic on 'With*' allow simpler wrapping of drivers 2022-04-08 19:42:13 +02:00
Thomas Kohler abbeeeb14c switch off debug 2022-04-08 19:42:13 +02:00
Thomas Kohler ee7bc59a9c add tests, shrink access to some internal variables 2022-04-08 19:42:13 +02:00
Thomas Kohler 491b14f1b9 introduce speed optimizations and related tests 2022-04-08 19:42:13 +02:00
Thomas Kohler 52f13b70b8 final cleanup of code and tests 2022-04-08 19:42:13 +02:00
Thomas Kohler d43d3430d9 fixed PinMode, SetPullUp and SetPolarity, unit tests activated 2022-04-08 19:42:13 +02:00
Thomas Kohler 37eeda80f5 ReadGPIO fixed with #576, failing leftovers for PinMode, SetPullUp and SetPolarity 2022-04-08 19:42:13 +02:00
Thomas Kohler 954d535093 failing leftovers after usage of PR #569 2022-04-08 19:42:13 +02:00
Thomas Kohler b673706fef prepare refactoring of PR569 2022-04-08 19:42:13 +02:00
Thomas Kohler 8f995aa272 FIX the bug #568 without further impact, heavy improvements of tests 2022-04-08 19:42:13 +02:00
Thomas Kohler f035ce3753 start by rollback code to state before 2018/06/21 2022-04-08 19:42:13 +02:00
Thomas Kohler 4ee5aaf39f bmp388 fix missing address write byte in test of Measurements 2022-03-19 08:04:37 +01:00
Thomas Kohler bfeb5bb182 drv2605l fix missing address write byte in test of Halt() 2022-03-19 08:04:37 +01:00
Thomas Kohler f312f00278 fix helper_test ReadByteData, ReadWordData to use reg 2022-03-19 08:04:37 +01:00
Tim Froidcoeur 40bf1710dd MCP3004: correct number of channels
the MCP3004 has 4 channels, not 3.

Fixes: b0160105("spi: Add MCP3202, MCP3204, MCP3208, and MCP3304
drivers")

Signed-off-by: Tim Froidcoeur <tim.froidcoeur@gmail.com>
2021-11-14 13:31:47 +01:00
Diego Parisi 27c76b4585 Fix servo and DC motors presence
Fix the presumption both servo and DC motors are present
2021-04-14 07:01:30 +02:00
Yuri Gorokhov 979379d765 Adding support for hmc8553l compass 2021-04-14 06:57:48 +02:00
tdaira 15284227bb Add delay for Run function of StepperDriver. 2020-11-28 12:50:18 +01:00
deadprogram 879e89e227 gpio: correct test for hd44780 driver to match newer signature
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-11-28 12:42:26 +01:00
nigamishibumi 5ecfcdfbb8 Add HD44780 support 2020-11-28 12:36:02 +01:00
merlin 111b5c6dc1 feat(ultrasonic): Add ultrasonic i2c
add ultrasonic support for i2c driver
add basic test for ultrasonic sensor
fix length and update test for i2c driver
2020-11-27 19:41:56 +01:00
imle 4a30f5b693 Resolve issue with PWM for PWMWrite
4096 is outside of the value that is able to be written to a pin. Lowered the scale and updated the comments
2020-10-29 20:17:28 +01:00
Cédric cf368e912b [test] Implement driver tests 2020-10-28 21:18:57 +01:00
Cédric 1823ed9372 Support for BMP388 Barometric Pressure/Temperature/Altitude Sensor 2020-10-28 21:18:57 +01:00
Yoshio HANAWA c2689effd9 Initial support for SHT2x Temperature/Humidity sensor driver
Signed-off-by: Yoshio HANAWA <y@hnw.jp>
2020-06-21 16:34:44 +02:00
Stuart Leeks 73eafc5237
Update RelayDriver to invert value written on Inverted 2020-03-31 06:43:00 +01:00
Stuart Leeks 558e98193b
Add tests for DigitalWrite value 2020-03-31 06:40:22 +01:00
Stuart Leeks 66af2582e9
Update function signatures in gpioTestAdaptor 2020-03-30 21:36:32 +01:00
Eithel 6bf5b3a532 #700 - Avoid to close the connection.
Each spi drivers must not close the connection: it's not its responsibility.
Robots should close the connection.

Signed-off-by: Eithel <tux.eithel@gmail.com>
2020-01-14 07:27:23 +01:00
Andre Engelbrecht c7d6ea7569 Added ability to make a relay driver inverted (#674)
* gpio: Added ability to make a relay driver inverted
2019-06-25 07:13:17 +02:00
Erwan Morvan d73466a5f9 Apa102 use default brightness (#671)
* spi/apa102: use uint8 type with a max of 31 for brightness

Signed-off-by: Erwan Morvan <air1bzz@gmail.com>
2019-05-31 11:34:00 +02:00
Ron Evans ee68549f94 spi: correct param used for APA102 Draw() method
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-05-22 11:34:39 +02:00
Mike Zange 78ec92af7a Stop using Red parameter for brightness value
This change corrects using Red parameter of RGBA for the Brightness value, to using the Alpha parameter of RGBA.

As the brightness max value for APA102 is `31` the `math.Min` stops the driver from using any value higher than 31.
2019-05-22 11:34:39 +02:00
Kevin Lutzer 64ab6f6b8f build out the ccs811 driver 2019-05-22 11:34:39 +02:00
Brendan Stennett 59cbea5eb6 Added some missing tests to increase coverage 2019-05-22 11:34:39 +02:00
Brendan Stennett d072e758c0 Add SparkFun’s EasyDriver (and BigEasyDriver)
Signed-off-by: Brendan Stennett <brendan@thinkdataworks.com>
2019-05-22 11:34:39 +02:00
Daniel Esteban 1c82bf72af Simplify code as suggested in #617 2019-05-22 11:34:39 +02:00
npotts bdca7a67c9 Adde unit tests for TH02 & Minor improvement
- Added ability to change sample resolution
- Added unit tests for TH02Driver.  The way the functions are written,
it will be hard to get a fully working .Sample() coverage with my
limited understanding of gobot's testing API.  The chip is rather needy,
and each sample requires multiple read and write steps, so getting both
read and write for 2 independant measurements it a little over my head
without some more code viewing.

Id rather get this checked in and think of a better way to do this.
Otherwise, this does test the functionality

Signed-off-by: npotts <npotts@users.noreply.github.com>
2019-05-22 11:34:39 +02:00
npotts 1d6b33a351 More reworking
- Added ability to add heating profile
- waitForReady now takes a variable timeout value
- Added ability to change the sample accuracy
2019-05-22 11:34:39 +02:00
npotts b1825f2e90 Added rudiementary support for TH02 Grove Sensor
This commit adds basic support for a TH02 based Grove Sensor which is
silkscreened as

  Temperature&Humidity Sensor (High-Accuracy & Mini ) v1.0

https://www.seeedstudio.com/Grove-Temperature-Humidity-Sensor-High-Accuracy-Min-p-1921.html

This is a modified variant of a SHT2* driver, and still needs some
changes to be more useable.  It is written to assume you want to use the
High Precisions (slow sample rate)

Signed-off-by: npotts <npotts@users.noreply.github.com>
2019-05-22 11:34:39 +02:00
Ron Evans 518f4e921f grovepi: add mutex to control transactionality of the device communication
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-05-22 11:34:39 +02:00