Today We have our cellphones in every damn place in this world, so why not make a controller unit working through Cellphones.
During calls, when we prace any key a tune plays for every different key. this tune is DTMF i.e. Dual tone Multiple Frequency. So what our aim is we will take 2 phones. Call one from another. Then we will press keys to send DTMF tones and by analyzing these tones we will Make a robot run as a demo.
What we need :
2 Cellphones.
Microcontroller
MT8870 (DTMF decoder)
Cellphone Jack
(And other Components Depending on what you are making)
The best thing about 8870 is for corresponding inputs it directly generates a binary output. Like for Key 1 it produces 0001 for 2 0010 like that.
So by Analyzing this binary data we will drive our robot.
As simple as that.
Here is the sample code. Use the same logic for whatever you want. And you can control anything from anywhere in this world ( till there is a network Coverage).
void mobile() { dtmf=PIND; dtmf=dtmf & 0x1b; if(dtmf==0x02) { fwd(150); } if(dtmf==0x10) { back(150); } if(dtmf==0x08) { left(120); } if(dtmf==0x0A) { right(120); } if(dtmf==0x09) { stop(); } }
P.S :- Use code in infinite loop Only