Hello,
My personal programming skills are like zero, but have been making alot of arduino stuff with the IDE and having fun, (I just copy/paste some frankenstein code together without fully understanding it lol
)
I have a question for the more experienced people here (and is a stupid one, but I am not sure how to do it)
I am currently making multiple arduino's that use DS18B20 temp send it with MQTT to Home assistant and show up , and thats all working fine.
But I want to finetune the process of making the same one's (since my brother keeps breaking them
) but with only changes in the stuff like sensor name, and arduino MQTT client name. (like for instance I have arduino RED, and it has the sensor's Blue, Yellow, ...)
can I define in some way at the start of the sketch for instance "Sensor1" = Blue
and than in the bottom of the sketch just use "Sensor1" but if I than make a new arduino , I just have to change the Blue at the start to for instance RED, and automaticaly everywhere it uses the "Sensor1" it now say's Blue instead of Red (like for the Serial print, for the MQTT topic, ....
That way I only have to change it one time, and not like 15 times in the sketch,
I know there is the "float" and "int" and stuff, but I cant find information anywhere to what I should use for simple text ??? (those int and stuff seems to be for numbers and calculations)
So my stupid question is, what command should I use to define some text at the start so I only have to change that next time , without messing any calculations or something up.
Any help, tips is appreciated,
and yes, I have been reading in the programming guides on the arduino site, but I think my question is so simple/stupid straitforward , that its not in there ??
thank you