ChriX
Member
I'm currently building a little robot (I suppose I could call it that) based around a PIC and driven via an RS232 port of a PC, via Bluetooth using one of the SparkFun modules.
I was wondering if anyone had any links to, or advice on creating a command set, so I can send 0xCC<cr> (for example) and the PIC does one thing, and 0xC0<cr> and it does another.
Currently I'm receiving a character, and testing to see if it is one I should be responding to by subtracting and then testing for zero. I only have 2 commands at the moment but I could end up with a huge list of things that it has to go through before it finds the right one, which doesn't seem like good practise to me.
Thanks in advance for any help.
I was wondering if anyone had any links to, or advice on creating a command set, so I can send 0xCC<cr> (for example) and the PIC does one thing, and 0xC0<cr> and it does another.
Currently I'm receiving a character, and testing to see if it is one I should be responding to by subtracting and then testing for zero. I only have 2 commands at the moment but I could end up with a huge list of things that it has to go through before it finds the right one, which doesn't seem like good practise to me.
Thanks in advance for any help.