From 7d7b18985cb388406ffd5b0419ba533c92020ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Sun, 22 Jan 2017 16:50:53 +0100 Subject: [PATCH] move RS-485 DE/RE pin to PB12 --- README.md | 4 ++-- lib/sensor_sdm120.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5c2762d..0daf772 100644 --- a/README.md +++ b/README.md @@ -88,8 +88,8 @@ Connections 3xSDM120 <-> board: - VCC; +5V - GND; ground - DI; PB10, USART3_TX -- DE; PB1 (shared with RE since one is active low while the other is active high) -- RE; PB1 (shared with DE since one is active low while the other is active high) +- DE; PB12 (shared with RE since one is active low while the other is active high) +- RE; PB12 (shared with DE since one is active low while the other is active high) - RO; PB11, USART3_RX ESP8266 diff --git a/lib/sensor_sdm120.c b/lib/sensor_sdm120.c index 76c6510..77f4951 100644 --- a/lib/sensor_sdm120.c +++ b/lib/sensor_sdm120.c @@ -45,7 +45,7 @@ * @{ */ #define SENSOR_SDM120_REDE_PORT B /**< GPIO port for RS-485 receiver and driver output enable signal */ -#define SENSOR_SDM120_REDE_PIN 1 /**< GPIO pin for RS-485 receiver and driver output enable signal */ +#define SENSOR_SDM120_REDE_PIN 12 /**< GPIO pin for RS-485 receiver and driver output enable signal */ /** @} */ /** @defgroup sensor_sdm120_timer timer peripheral to enforce waiting time between messages