Hello everyone im new at this forum.I want to control one stepper motor with arduino and python.I want to create one interface for control stepper motor but only for controlling direction.i will put forward and backward press buttons in the interface.and i will use pytq5 for this.I will use arduino for control speed and i will put one potentiometer.and i will use bluetooth module for communication each other arduino and computer.im confused a little bit and need your guys help.
Do have any code already - if so post it please, it will help greatly to be on the same page.
Also links to datasheets for any hardware involved.
I think what you require is something like AccelStepper using setSpeed/runSpeed to drive a stepper
controller, and then to add in direction control (the sign of the value passed to setSpeed) from a remote
computer via some sort of interface?
Please post the program that represents your best attempt and tell us in detail what it actually does and what you want it to do that is different. It will make it much easier to focus on the parts you need help with rather than wasting time on things that you can do.
This Simple Python - Arduino demo may give you some ideas.
The Python code should work on Windows if you edit it to use the Windows style of COM ports.
Also, it should be straightforward to adapt the concept to work with Bluetooth which is just serial-by-wireless. However I suggest you leave Bluetooth to one side until after you have the project working with the regular USB connection.
These links may also help
Stepper Motor Basics
Simple Stepper Code
and look up the AccelStepper library
...R
I dont have code yet.But i will start to work on it.Yes @MarkT you are right.im new at using arduino i didnt use before this project i already check simular topics.But probably need to get more information.@Robin2 i have to use bluetooth connection because i didnt choose this project
i will check accelstepper
this topic seems simular
https://forum.arduino.cc/index.php?topic=594124.0
and i will define forward and back ward functions and will put them in interface only 2 buttons.this buttons will pressable.
im thinking to use this HOW TO: Bluetooth Arduino connecting to Python on desktop - YouTube for open serial port and communicate.But how it will work.is python code directly access pins for using stepper motor or is it communicate with arduino code.
If you're asking, "can I run Python on the Arduino?" the answer is usually no. Some of the more advanced models might have enough memory for it.
@aarg Are codes communicating each other? How is it working?
emrekapusuz:
@anon57585045 Are codes communicating each other? How is it working?
I think it is your school assignment to research that.
@aarg Yes i know but i didnt find any research about my situation.Is it possible to communicate interface buttons and stepper motor? Can I send information from the interface to the step motor?
emrekapusuz:
@Robin2 i have to use bluetooth connection because i didnt choose this project
I did not suggest that you should not use Bluetooth - only that you should first get the project working without Bluetooth.
Successful computer projects are created in small steps with each part being tested before adding the next feature.
...R
@Robin2 understood thanks