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 -
Gateway without a radio
Development • 12 Jan 2025, 23:19 • OldSurferDude 14 Jan 2025, 22:07 -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
PJON and Minicore not working
Development • 17 days ago • Trand 17 days ago -
Saving last known good state, but not in EEPROM
Development • 30 Jan 2024, 18:46 • OldSurferDude 15 Jan 2025, 08:51