There is an array:
byte customChar[8] = { B00000, B00000, B00000, B00000, B00000, B00000, B00000, B00000 }; In one of the functions, I collect a string like "10101" . Is there a function or method for converting this string to mind B10101 to add as an element to the customChar array?
stoi, for example:byte b = (byte) std::stoi("10101", nullptr, 2);- gil9redB10101is some kind of extension arduino, apparently. There are no such literals inb10101, so converting a string to a number of the typeb10101to add to the array looks meaningless. Yes, and the addition to the array of this type in runtime is not possible. The size of the array is fixed at compile time, you can only change the available values. - αλεχολυτstoibe, you need to have C ++ 11 support. Is it in your compiler? Or you can usestrtol. - αλεχολυτ