From 56affff3b667fe07e46fdaf8b695f926edf4a0c2 Mon Sep 17 00:00:00 2001 From: aivs Date: Mon, 4 Mar 2024 16:48:16 +0300 Subject: [PATCH] ADC0,1,2,3 - BlackLine, INPUT_PULLUP --- .../svg-shild/components/devices/door/door.component.svg | 9 ++++----- libs/arduino-code-gen/src/lib/devices/sensor-binary.ts | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/configurator/src/app/components/z-uno-shield/svg-shild/components/devices/door/door.component.svg b/apps/configurator/src/app/components/z-uno-shield/svg-shild/components/devices/door/door.component.svg index b6d4550..dbab2a9 100644 --- a/apps/configurator/src/app/components/z-uno-shield/svg-shild/components/devices/door/door.component.svg +++ b/apps/configurator/src/app/components/z-uno-shield/svg-shild/components/devices/door/door.component.svg @@ -15,11 +15,10 @@ - - - - - + + + + diff --git a/libs/arduino-code-gen/src/lib/devices/sensor-binary.ts b/libs/arduino-code-gen/src/lib/devices/sensor-binary.ts index c66f2c5..b518ea8 100644 --- a/libs/arduino-code-gen/src/lib/devices/sensor-binary.ts +++ b/libs/arduino-code-gen/src/lib/devices/sensor-binary.ts @@ -57,7 +57,7 @@ export class SensorBinary extends BaseDevice { public override get setup(): string { const inverted = this.config.device?.type === 'inverted' ? '!': ''; - return ` pinMode(A3, INPUT_PULLDOWN); + return ` pinMode(${this.config.id}, INPUT_PULLUP); zunoChangeInit(pin${this.config.id}SensorBinaryState, ${inverted}!digitalRead(${this.config.id}));`; }