From bf0eb1637354499f79f648b50e25c3ba60712e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3r=C3=A1nt=20Pint=C3=A9r?= Date: Wed, 31 Jan 2024 18:19:12 +0100 Subject: [PATCH] Add MK4 built-in SHT31 --- src/devices/UglyDucklingMk4.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/devices/UglyDucklingMk4.hpp b/src/devices/UglyDucklingMk4.hpp index 322e7fd1..e405bd89 100644 --- a/src/devices/UglyDucklingMk4.hpp +++ b/src/devices/UglyDucklingMk4.hpp @@ -44,6 +44,21 @@ class UglyDucklingMk4 : public DeviceDefinition { peripheralManager.registerFactory(flowControlFactory); } + std::list getBuiltInPeripherals() override { + // Device address is 0x44 = 68 + return { + R"({ + "type": "environment:sht31", + "name": "environment", + "params": { + "address": "0x44", + "sda": 8, + "scl": 9 + } + })" + }; + } + Drv8801Driver motorDriver { pwm, GPIO_NUM_10, // Enable