Motor CC turning (Project 9)
Hello,
I bought the starter kit of Arduino (the kit with the book which has 15 projects) and I tried to do the 9th but my motor is still turning when I am pressing my button, I did a simulation ;
Code:

28 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
And on B what I do then?
On the book it's like this so what I have to change with my transistor.
My transistor is mosfet in my kit.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
it gets clearer, if it's an N channel MOSFET the pinout is likely Gate Drain Source...
but the sim won't know that...
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I have this one.



@Deleted User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
9 -> to the first born of the transistor (first img).
2 -> the button.


@Deleted User :>.
No idea?
I have the same circuit :

But it does not, the motor is not stopping when I pressed or not on the button.
But I have info about the button so it works.
But just the motor is not listening.
I have always "1".
the
switchPin
is an INPUT
Did not fix :(.
@AnonEngineering
need a lot more detail, how is the switch wired, for one
and what is driving the motor, a transistor hopefully?
Yes?
Look at the circuit?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
No, but there you have to stop making fun of the world. If you are not able to look at a circuit, there is a problem, EVERYTHING IS ON IT, I GAVE EVERYTHING.
what is this? (it's part number)
https://media.discordapp.net/attachments/1112516980864454716/1113024592102035506/IMG_20230530_103117.jpg?width=266&height=473
inside an
if
you need to compare ==
not set =
here is an example of what you are trying to do https://www.tinkercad.com/things/g5OKJ6mUJRG-basic-dc-motor-driver/editelWtf???
Why it's not "=="...
Mb I will try.
==
compares two values, =
sets a value to be equal toIdk why I did not set "=="...
Thanks.
SO MUCH.
I tought it was a problem about my motor :(.
Now one thing :
I would like to do not have to press always on the button.
Once I press -> motor turn until I press.
If I press again it stops the motor.
But I tried this, it does not work.
look at the StateChangeDetect example
any progress?
I did not understand...
Ah thanks.
Alright I will study this.
feel free to ask if you get stuck