Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tuya adapter V2 arduino source code - RS485 temperature humidity sensor
#8
How i Can add New Value. i need to add CO2 Value in APP.

i have Change code also but app not identify  the CO2. for that I need different PID code ?

Code:
/* Data point define */
#define DPID_TEMP_CURRENT     1
#define DPID_HUMIDITY_CURRENT 2
#define DPID_CO2_CURRENT 3
unsigned char dp_array[][2] =
{
  {DPID_TEMP_CURRENT, DP_TYPE_VALUE},
  {DPID_HUMIDITY_CURRENT, DP_TYPE_VALUE},
  {DPID_CO2_CURRENT, DP_TYPE_VALUE},
};

my_device.mcu_dp_update(DPID_TEMP_CURRENT, temperature, 1);
my_device.mcu_dp_update(DPID_HUMIDITY_CURRENT, humidity, 2);
my_device.mcu_dp_update(DPID_CO2_CURRENT, co2, 3);

Can you Help me to fix this ?  - temperature & humidity work fine.


 yes
Reply


Messages In This Thread
RE: Tuya adapter V2 arduino source code - RS485 temperature humidity sensor - by sanjulanipun - 04-03-2025, 04:49 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)