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!
1 out of 1
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Radio waking up for no reason.
Development • 4 Jul 2020, 21:09 • Sasquatch 15 Jan 2025, 08:33 -
PJON and Minicore not working
Development • 27 days ago • Trand 27 days ago -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14 -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 12 Mar 2025, 23:39 -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26