From 15d79e5ce7c3524f33bdadd51db8f6d831b9a538 Mon Sep 17 00:00:00 2001 From: Badger Date: Sun, 18 Apr 2021 03:03:50 +0000 Subject: [PATCH] Add 'settings.json' --- settings.json | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 settings.json diff --git a/settings.json b/settings.json new file mode 100644 index 0000000..ecc9646 --- /dev/null +++ b/settings.json @@ -0,0 +1,40 @@ +{ + "mac_address": "10:52:1c:51:0e:84",? The device knows this anyway + "name": "Industrial",? This is managed at the server is it not? + "pcb_version": "4.0",? Why does the firmware need to know this? + "analogue_ports": 4,? Same as above, we will only push the correct number of sensor settings to the board. + "digital_ports": 2,? "" + "adc": "ADC128S022",? Won't the below adc settings take care of this? + "adc_miso": 19, + "adc_mosi": 23, + "adc_clk": 18, + "adc_cs": 5, + "upload_interval": 15, + "address": "mqtt.senseright.com.au", + "port": 1884, + "ota_path": null, + "mqtt_secondary_address": "mqtt.senseright.com.au", + "mqtt_secondary_port": 1884, + "sensors": [ ! We need to sit down and define what settings and naming we are using for all our current sensors so this is fully defined. + { + "port_type": "Analogue", ! This will define how and what settings we look for below. + "port": 1, + "sensor_type": "0-5m pressure transducer", ! This should be a lot shorter as we will use this for control flow. For example "Pressure1", we would just keep a list of what key means what device. + "sensor_address": null, + "read_interval": 15, + "communication_type": "4-20mA", ? Does this change how we should read the device + "daughterboard": "4-20", ? "" + "pcb_version": "1.0" ? "" + }, + { + "port_type": "Analogue", + "port": 2, + "sensor_type": "0-5m pressure transducer", + "sensor_address": null, + "read_interval": 15, + "communication_type": "4-20mA", + "daughterboard": "4-20", + "pcb_version": "1.0" + } + ] +} \ No newline at end of file