how can i solve this should be keys (5 or 10 keys if possible 10) of both letters and numbers.
here (about 5 numbers and letters long)
here I want to make an nfc locker later
int keys[] = {"key1", "key2", "key3", "key4", "key5"};
byte count = sizeof(keys);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
for (byte i=0; i <= sizeof(keys*); i++){*
- Serial.println(i);*
_ Serial.println(keys*);*_
* }*
}
void loop() {
* // put your main code here, to run repeatedly:*
}
char* keys[] = {"key1", "key2", "key3", "key4", "key5"};
byte count = sizeof(keys) / sizeof(keys[0]);
void setup() {
Serial.begin(115200);
for (byte i = 0; i < count; i++) {
Serial.println(i);
Serial.println(keys[i]);
}
}
void loop() {}
Welcome to the Forum. Please read these two posts:
General Guidance and How to use the Forum and
Read this before posting a programming question ...
You may also find useful information that would answer your question here:
Useful links - check here for reference posts / tutorials
It is important to provide as much of the information that is needed to solve your problem as you can, in your first posts. The forum link above has guidelines for posting in a standard way that makes it easiest for people to provide you with useful answers. Making an effort to do this will greatly increase the number and quality of helpful responses that you get.
In this case, the problem is that you have posted code without using code tags. The code tags make the code look
like this
when posting source code files. It makes it easier to read, and can be copied with a single mouse click. Also, if you don't do it, some of the character sequences in the code can be misinterpred by the forum code as italics or funny emoticons. The "Code: [Select]" feature allows someone to select the entire sketch so it can be easily copied and pasted into the IDE for testing or review.
If you have already posted without using code tags, open your message and select "modify" from the pull down menu labelled, "More", at the lower right corner of the message. Highlight your code by selecting it (it turns blue), and then click on the "</>" icon at the upper left hand corner. Click on the "Save" button. Code tags can also be inserted manually in the forum text using the code and /code metatags.