main.c application sketch added
RF states incorporated