The transistor acts like a switch, controlling the power to the motor, Arduino pin 3 is used to turn the transistor on and off and is given the name 'motorPin' in the sketch. When the sketch starts, it prompts you, to remind you that to control the speed of the motor you need to enter a value between 0 and 255 in the Serial Monitor. We are proud to show you a tutorial about using an Arduino Motor Shield with the Arduino Due. This example shows the simplest thing you can do: driving a DC motor forward and backwards.
This is probably the most affordable bluetooth module out there Hc-05 the one Im using. You can buy one for 8$ on ebay. You can use my code but you need to add a new motor to the code and define the forward and reverse button. I will post the robot in 1/2weeks Im waiting for one IC and some others parts i need. You just need to change my code a bit. For the android you will need the blueterm app or any app similar to do that, so you can connect your arduino to the bluetooth module.
I can write the code for you Its pretty quick. Nice ? btw usually the HC-05 requires a pass and its ‘1234’.you can use an iphone you just need to find a similar appIf you’re familiar with the Arduino IDE, what the blueterm app actually does it connects your smartphone to your arduino via Bluetooth, and it does a serial communication between the devices. Hi Thomson!You can use the Arduino uno or the Arduino Leonardo they both are capable to do that project, you can read this post for more information and see the advantages between the 2 boardsBut in conclusion for that project it doesn’t make much difference they’ll both work just fine ?I didn’t made the app I’m running on my smartphone And I don’t know much about iOS programming, I was thinking in making one but actually I’ll only be able to do that If I’ve buy a Mac or something otherwise would be really hard to create one app. With just my ipad or with my linux computer with a virtual machineI didn’t found any similar app for my iphone/ipad that’s why I used my androidActually I don’t know any free app that does the same as Blueterm. Thanks for your support, I’m really glad you enjoyed it!You can buy any Arduino to control the fan and the speaker, I would recommend you to buy the Arduino Uno or the Arduino Duemilanove. You can buy an original or a clone, It’s easy to find on ebay.I don’t know what you want to do when you said control a small speaker, I don’t know what’s your project about.But with the Bluetooth module, a smartphone and an Arduino You can control the fan and the speaker for sure!And the Arduino Can run with a 9V battery!If you have more questions just let me know or just talk about your project!?. Thanks for those elements.
It helps a lot.The idea it to have the sound go thru the running fan to study how disformed it souds like while the beat frequence is modified and the fan speed is as well. (listen to music thru a fan, you’ll understand what I am talking about).On the hardware configuration, I have been looking further, and there is still a challenge:1. The bluetooth needs to be able to transfer data and music which will be stored on the smartphone that commands it2. I need to make sure that the arduino is “smart” enough to understand a music signal AND data signals that controls teh fan speed. And it has to transfer the music part to the autoamplified speaker.So, still not sure what hardware configuation to use (especially, which bluetooth receiver between the large choice), but if you have any ideas, tey are more than welcomed ?!!!Thanks!. Firstable sorry for the late delay replyng to your comment, I’ve missed it, just found it today.Please check the wire from your bluetooth module, the most common mistake is this:bluetooth module: TX pin - RX pin from the arduinobluetooth module: RX pin - TX pin from the arduinoThen I also recommend to open your Arduino IDE and your serial monitor and send the commands for example “0” and “1”.
Whataver you defined and see if the circuit is working. If it working then try via bluetoothGood Luck!Rui Santos. Hi Rui Santos, thank you for your sharing how to do arduino project here firstly.
I had tried to use of your arduino uno codes in virtual simulation of Proteus for controlling 2 DC motor using L293D and Atmega328p. However, the simulation program prompted me error message and I don’t understand why the error occurred since I had sorted out all possible problems before. Could I send you the proteus simulation file for your reference and then can you point out how I can slove the simulation problem please? I would like to complete the simulation firstly before launching the hardware circuit development processes. Many thanks.