See: https://github.com/EEEManchester/Food-Computer
Dependencies: DHT DS1820 MODSERIAL ModbusSlave232 SoftSerial TSL2561_I2C mbed millis
Fork of ModbusRTU-RS232 by
Diff: main.cpp
- Revision:
- 4:796586b35695
- Parent:
- 1:77e7cf856fae
- Child:
- 5:4503f4d054ba
--- a/main.cpp Thu Jul 28 15:14:30 2016 +0000 +++ b/main.cpp Thu Jul 28 16:00:51 2016 +0000 @@ -6,7 +6,8 @@ void update_modbus() //check for request and update relays { led1 = !led1; //for debug - mbs.update(regs, MB_REGS); + if (mbs.update(regs, MB_REGS)) + {led3 = !led3;} R0 = (regs[MB_9] & (0x0001<<0)); R1 = (regs[MB_9] & (0x0001<<1));