Hello,
I wanna make bluetooth door with servo motor and hc06.I make a android application for this. I created a "Door Open" button. Button value = 8. You can see the photo I uploaded.
But I can't do the ardunio code.Can anybody help me for the code? When I press the value 8 door will open.When I press value 9 door will close.My english not so good.I am sorry about it.
İf u didn't understand the button thing I can give an example.
Some light projects have the same system.When you press the 'A' the light is on.
if( val == '1' ) {
digitalWrite(Lamp1,ON); statusLamp1="1"; }
maybe code wrong but I tried to explain.Again I am sorry for my English.
welcome to the forum. Your english is good enough to understand the main sense of your question.
You can use google-translate for a better understandable english. Write your question into google-translate in your mother-language (your native language) and let do google-translate the translation into english.
You can use google-translate to translate this text into your native language too.
You seem to have some example-codes tapping on the smartphone and an LED switches on/off.
Which seem to work. You should post this LED-switching-code here in the forum in this way
There is an automatic function for posting code right out of the Arduino-IDE
just three steps
press Ctrl-T for autoformatting your code
do a rightclick with the mouse and choose "copy for forum"
paste clipboard into write-window of a posting
It will be much easier to help you if you post your complete sketch from the very first line to the very last line
I want to make a door connected to the servo motor with the close and open keys as in the LEDs. When I give the value 1 on the leds, it opens. I want to open the door with a value of 8.Thanks for the all information.
to control Servos you need a library that creates the servo-signal.
It would be good if you learn something about how the servo-signal works.
You can translate complete websites with google-translate
here is a video that shows how servo-signals look like on an oscilloscope
There are examples for servos in the arduino-IDE-examples
important thing:
a RC-servo needs its own power-supply.
Of course you can find amateur-videos where the rc-servo is supplied from the arduino directly. But this is unprofessional. Even a small servo which has to work under load needs more current than the Arduino can deliver.
Your Arduino will reset or even worse the voltageregulator will burn through.
You should first do a test with such an example code.
If this example-code does move your servo start to implement it into your code
If you want further help you should really post your existing code.