Please please please please PLEASE!!! When posting code in the forum do not just copy and paste it into your post. Above the box you type into when making a new post or a reply is a whole series of buttons. If you hover your mouse over the 11th button from the left in the top row (The Hash # symbol) you will see it says "Insert Code". Click on this and then inbetween the two sets of brackets [ ] paste your code.
This way your code is captured inside a small box with scrollbars making it easy to read and keeping the size of the whole thread to a minimum. If you don't do this, the thread turns into pages and pages of code, with lots and lots of mouse wheel scrolling to be done to read it, making it hard work to read and losing its clarity.
BullEngineer:
Above the box you type into when making a new post or a reply is a whole series of buttons. If you hover your mouse over the 11th button from the left in the top row (The Hash # symbol) you will see it says "Insert Code". Click on this and then inbetween the two sets of brackets [ ] paste your code.
slipstick:
Yes but servos don't need particular initialising whereas ESCs quite often do.
Steve
I know that, and didn't mean to say (and in fact didn't say) that it would work with ESCs. All I meant was that the OP's code was "intact" in the sense that the writes are changing with the pot, as expected.
neiklot:
I don't have the ESC / brushless motors that you have, but your code, with one of the attach(9)'s changed to 10, works for me with 2 servos.
When i turn everything on, only one motor turns. The ESC are on pin(9) and pin(10), and ground. The potentiometer is on A0 for the information, 5V and ground. The esc and the arduino card are on an external power source. It the same motor that turns, when on pin(9) or (10). (The second motor turns when the connnections change).
I can't understand why doesn't it work.
PICHAR:
It the same motor that turns, when on pin(9) or (10). (The second motor turns when the connnections change).
Sorry that doesn't make any sense.
Do you mean that only one of the motors ever turns whether it is connected to pin 9 or pin10? If so then the other motor or ESC is bad. If not perhaps you could try the explanation again.
Do you hear any beeping from the ESC/motors? Both of them?
Can you post a diagram showing exactly what wires are connected where and also give details of the "external power source".
Yes only one motor turns whether it is connected to pin 9 or 10.
The ESC that doesn't turn does 1 less beep than the one who turns.( The final beep isn't emitted)
The external power source is just an alimentation of 0-30 V set on 12V with 3A possible.
They are exactly the same. The problem is that I have already done a test and both work normally. And I can't understand why this time only knew motor turns.