Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos ModbusSlave232 MODSERIAL max6675 millis
Diff: objects_and_variables.h
- Revision:
- 1:77e7cf856fae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/objects_and_variables.h Thu Jul 28 13:23:10 2016 +0000
@@ -0,0 +1,28 @@
+//for modbus
+const unsigned char SLAVE = 1;
+const long BAUD = 9600;
+const unsigned PARITY = 'n';
+ModbusSlave232 mbs; // Create new mbs instance
+
+Ticker modbus_updater;
+
+// Slave registers
+enum {
+ MB_0, // Register 0 air_co2
+ MB_1, // Register 1 air_humidity
+ MB_2, // Register 2 air_temp
+ MB_3, // Register 3 water_temp
+ MB_4, // Register 4 water_ec
+ MB_5, // Register 5 water_ph
+ MB_6, // Register 6 light_lux
+ MB_7, // Register 7 window_switch
+ MB_8, // Register 8 shell_switch
+ MB_9, // Register 9 relays
+ MB_REGS // Dummy register. using 0 offset to keep size of array
+};
+
+int regs[MB_REGS];
+
+char co2string[32];
+int CO2_PPM;
+float water_temperature;
\ No newline at end of file