Hello, Every time I try and compile this code I get an error stating “thinger_device” has no member named “write_bucket”; did you mean “to_socket”. below is my code what am I doing wrong?
int main(int argc, char *argv[])
{
//wiringPiSetupGpio(); // Initialized wireingPi using the Broadcom GPIO pin Numbers
thinger_device thing(USER_ID, DEVICE_ID, DEVICE_CREDENTIAL);
// define thing resources here. i.e, this is a sum example
thing["sum"] = [](pson& in, pson& out){
out["result"] = (int) in["value1"] + (int) in["value2"];
out["result2"] = (int) in ["value1"] * (int) in["value2"];
result1 = out["result"];
result2 = out["result2"];
};
thing["resultTest"] >> [](pson& out){
out["result1"] = result1;
out["result_2"] = result2;
};
//thing.start();
while(1){
thing.handle();
//ChargeState = (digitalRead(ChargeStatePin));
thing.stream(thing["sum"]);
thing.stream(thing["resultTest"]);
if (result1 != preResult1){
preResult1 = result1;
thing.write_bucket("StreamTest1","resultTest");
};
}
return 0;
}