Being new at C, I am looking for a way to send to the Arduino the following command via the serial console (note that the commands can be of varying length):
PROCESS 0000 0067 0000 000d 0060 0018 0030 0018 0030 0018 0030 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0018 03de
The Arduino should then recognize that a "PROCESS" command was sent, and feed the following string into an array of hex numbers:
uint16_t array_of_hex[] =
{0x00, 0x67, 0x00, 0x0d,
0x60, 0x18, 0x30, 0x18, 0x30, 0x18, 0x30, 0x18,
0x30, 0x18, 0x18, 0x18, 0x30, 0x18, 0x18, 0x18,
0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
0x18, 0x3de };
And hand it over to the process() function:
process(array_of_hex);
Then it should continue to listen on the serial line for further commands.
Can you help me please? In case you are wondering what I am trying to do, I would like to send the Arduino infrared remote codes in the industry standard Pronto Hex format via the serial line, and have the Arduino send them out via an attached IR LED.
The code I would like to use is available at
- GitHub - stephenong/Arduino-IR-Remote-Control-Player: Infrared remote control player using Arduino platform (has the hex hardcoded while I want to send it over serial), and
- GitHub - plietar/ir-control: An Arduino/AVR project for controlling ir devices. (needs an Ethernet shield while I am looking for serial)