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: DHT DS1820 MODSERIAL ModbusSlave232 SoftSerial TSL2561_I2C mbed millis
Fork of ModbusRTU-RS232 by
objects_and_variables.h
00001 //for modbus 00002 const unsigned char SLAVE = 1; 00003 const long BAUD = 9600; 00004 const unsigned PARITY = 'n'; 00005 ModbusSlave232 mbs; // Create new mbs instance 00006 00007 Ticker modbus_updater; 00008 00009 // Slave registers 00010 enum { 00011 MB_0, // Register 0 air_co2 00012 MB_1, // Register 1 air_humidity 00013 MB_2, // Register 2 air_temp 00014 MB_3, // Register 3 water_temp 00015 MB_4, // Register 4 water_ec 00016 MB_5, // Register 5 water_ph 00017 MB_6, // Register 6 light_lux 00018 MB_7, // Register 7 window_switch 00019 MB_8, // Register 8 shell_switch 00020 MB_9, // Register 9 relays 00021 MB_REGS // Dummy register. using 0 offset to keep size of array 00022 }; 00023 00024 int regs[MB_REGS]; 00025 00026 char co2string[32]; 00027 int CO2_PPM; 00028 float water_temperature;
Generated on Wed Jul 13 2022 13:23:15 by
1.7.2
