This week I need to control my DC motor remotely by bluetooth, so I will use MIT App Inventor to make it happen.
Then I will try the wired connection using Processing app.
Simply by using arduino CC I need to write code when I give the arduino specific value the motor will run and stop depending on the value the user enter it.
Now I need to create mobile app using MIT to connect my mobile phone with attached bluetooth on the arduino board.
this video helped me to create and coding my mobile app
Simpely this code meant to connect the bluetooth and when I press buttom (ON) the arduino will recive number 1 so my motor will start and when i press buttom (OFF) the arduino will recive number 0 so my motor will stop.
Now it's time to connect my motor driver and bluetooth to arduino.
VCC on bluetooth module connected to 5V on arduino.
GND on bluetooth module connected to GND on arduino.
TXD on bluetooth module connected to RXD <-- 0 on arduino.
RXD on bluetooth module connected to TXD -- > 1 on arduino.
Please keep in mind you need to upload your code to the arduino before you connected the TXD and RXD with bluetooth module because the ardunino using this ports too to upload your cc code so if you using this ports with bluetooth module you will not be able to upload you code to the arduino.
It's time to connect the bluetooth with the MIT mboile app that I creat to check if every thing going well, and yes it's works but only for 10 sec i can control my motor by the app but then i got Error 516 : unable to write : broken pipe.
as always Atef is my biggest fan, He told me just with some design improvements the app will be better.
To slove the (Error 516 : unable to write : broken pipe) I used many other MIT app coding but still the same proplem.
By using Arduino bluetooth controller every thing went prefect.
you can find this app on google play app store.