Android and RN-42 BlueTooth module
NikosG
Posts: 705
Hi,
Here is a quick description of LEDs and lamp control with Android mobile phone using Parallax RN 42 BlueTooth module and Board of Education Shield
Google Play free App: Arduino BlueTooth control
Here is the circuit:
A video demo:
[video]
Here is a quick description of LEDs and lamp control with Android mobile phone using Parallax RN 42 BlueTooth module and Board of Education Shield
Google Play free App: Arduino BlueTooth control
Here is the circuit:
A video demo:
[video]
Comments
After you make the circuit from the previous post) you must load to your Arduino the next code: (I have also attached the code)
Then go to your mobile phone and istall the Google Play free App: Arduino BlueTooth control
and make the next steps:
1) after the istallation into your phone, "run" the application
2) choose the RN-42 BlueTooth and pair both devices
3) Connect in controller mode
4 & 5) Setup the keys as shown (Write the characters )
6) You are ready to Play
The setup of arrow keys is in order to make an RC robot (I explain in next post)
As you can see the characters that I wrote on my phone App (step5) are connected to the characters that exist on my Arduino code:
"r" for the red LED (The "sr" character has an "s" before "r" that says to the controller to switch off all the LEDs before switch on the red LED)
"g" for the green LED (the "sg" characte has an "s" before "g" that says to the controller to switch off all the LEDs before switch on the green LED)
"y" for the yellow LED (The "sy" character has an "s" before "y" that says to the controller to switch off all the LEDs before switch on the yellow LED)
"s"in order to switch off all the LEDs
The characters on (step 4) are for the RC- robot.....
"l" left movement
"r" right
"f" forward
"b" backward
"s" stop
Of course you can change the characters but remember to make it on both (adruino code and mobile App)
Build carefully the following circuit because we have high current voltage:
With the yellow led you also be able to switch on/off the lamp!
You can also add devices and relays to the other two LEds and play with them....
1) RFOBasic: This is an open source interpreter but can still produce a apk.
2) OliBasic: A derivative of RFOBasic but with enhanced features/capabilities
3) Mintoris: This BASIC features USB-serial comms, specifically for communications with microcontrollers.
Try the demo, it will put a big ol' smile on your face.