Okay so how do I do data type conversions? I think it’ such a basic question that I’m worried I’m asking a dumb question.
I want to publish a boolean value (a door is open or closed). So I can get the value of the sensor on the door by checking variable = digitalRead(D0). But when I publish the value I want to do spark.publish(“variable”, variable).
Variable must be declared as: int variable=0; but the datatype of the publish function is char* how do I convert?