Need assistance converting String to byte array
Posted: Wed Feb 10, 2016 1:08 pm
I want to use the WakeOnLAN example posted at https://github.com/mikispag/arduino-Wak ... eOnLan.ino It accepts a byte array for the input like this: byte pc_mac[] = {0x00, 0x24, 0x1D, 0xCD, 0x6D, 0x24}
I've made a webserver where the user can type in the target, which gets stored as a String, like this: 00241dcd6d24
Now I'm a newbie when it comes to C so this might be an easy one for a real programmer, but I'm having a devil of a time figuring out how to turn that user typed string into the byte[] that the function can use. Can anybody throw me a bone? I appreciate it.
I've made a webserver where the user can type in the target, which gets stored as a String, like this: 00241dcd6d24
Now I'm a newbie when it comes to C so this might be an easy one for a real programmer, but I'm having a devil of a time figuring out how to turn that user typed string into the byte[] that the function can use. Can anybody throw me a bone? I appreciate it.