CLIENT_GW_MQTT / Setup and automatisation of Presentation and set/req
-
Hi,
just writing a sketch, which i want to share later on wit ALL who wants to have an MEGA as client, sensor node and GW ...
AT first i want to have a overview over all my pins at MEGA 2560 and see what they "are".
So i started with setting a String Array for 80 PINS:
String iomodus[80][3] = { //"presentation", "set/req", "description" {„0“, “0“, “free“}, {„0“,“0“,“free“}, {"S_BINARY","V_STATUS","test switch"}, //D3 {„0“,“0“,“free“}, //D4 ... {„0“,“0“,“free“}, //D80 };- i want to present sensors ...and here is my problem...
I want to convert String rows to uint8_t to make a procedure to let the sketch present all my sensors. where
i= CHILD_ID
iomodus[i][1st COLUMN] = presentation ID
iomodus[i][3rd COLUMN] = description as Text
ACK= truevoid presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Relay+Max31855", "1.0"); for (int i = 0; i<70; i++) //all Ports D0 bis D69 //present(uint8_t childSensorId, uint8_t sensorType, const char *description, bool enableAck) present(i, iomodus[i][1], iomodus[i][3], true); }does no work!!!
and says :
**cannot convert 'String' to 'uint8_t {aka unsigned char}' for argument '2' to 'void present(uint8_t, uint8_t, const char*, bool)'**- Want to set Variables/Topics to my controller with...
iomodus[i][2nd column]
Could you please help me to solv this...
tried 6h everything i knew (pointers etc..) but no luck...
Thank you in Advance!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login