Notifications
Clear all

Arduino based function to control stepper motors

43 Posts
6 Users
3 Likes
1,304 Views
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@kirk @Inq is perfectly capable of answering your question but I don't see him online so I will take the easy one.

const_float is not a valid keyword. const is and float is, they mean constant (can't be modified by program code) and float means a floating point number. Those are numbers with . in them generally like 3.14. 

Flat 4 strand cable as you call it is available from all the usual places, Amazon for speedy delivery but highest price, AliExpress for long delivery but cheap, e-bay or bang good in betweeen the other two plus any one of numerous electronics supply houses, just google it.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
Inq reacted
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@kirk Is this what you are looking for?

https://amz.run/5sKd "https://amz.run/5sKd"

NOTE, Canadian site, change it to .com if in the USA.

 

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@kirk @Inq FYI Try testing with @Inq's amended sketch. We know it works, if yours does not then you have hardware problems. Change each piece of hardware while running the known working sketch until you find the problem. Now you can try to move forward.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Kirk
 Kirk
(@kirk)
Eminent Member
Joined: 1 year ago
Posts: 26
Topic starter  

@zander 

Thanks Ron. I will compare sites and see what looks good.


   
ReplyQuote
Kirk
 Kirk
(@kirk)
Eminent Member
Joined: 1 year ago
Posts: 26
Topic starter  

@zander     I appreciate the good advice. I will update you on progress.


   
ReplyQuote
Kirk
 Kirk
(@kirk)
Eminent Member
Joined: 1 year ago
Posts: 26
Topic starter  

@robotbuilder 

Hi,  The code is designed to turn the motor-that was the plan anyway.


   
ReplyQuote
Will
 Will
(@will)
Noble Member
Joined: 1 year ago
Posts: 2112
 
Posted by: @kirk

Do you know a good source for flat  4 strand cable?  I want to connect straight from the Arduino digital output port to the driver.

see Amazon

"https://www.amazon.ca/C-able-Extension-Extend-Solderless-Connector/dp/B07FDW4M89/ref=sr_1_6?crid=1NO0M35HLML8G&keywords=extension+wire+led&qid=1661134899&sprefix=extension+wire+led%2Caps%2C294&sr=8-6"

I was kidnapped by mimes.
They did unspeakable things to me.


   
ReplyQuote
Kirk
 Kirk
(@kirk)
Eminent Member
Joined: 1 year ago
Posts: 26
Topic starter  

@zander   For anyone interested I found a source for cables with Arduino terminals on EBAY.  I pasted the link below.

https://www.ebay.com/itm/124825421876

 


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@kirk I am not sure what you bought, but the price is high and it does not appear to be a complete set.

The set I bought is 360 pieces total, for $11.55

3 x 40 Male to Female

3 x 40 Male to Male

3 x 40 Female to Female

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@kirk What is an Arduino terminal?

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Kirk
 Kirk
(@kirk)
Eminent Member
Joined: 1 year ago
Posts: 26
Topic starter  

@zander    Re: Arduino cables. What I intended to be ordering was two male/female cables 4 strand x 50 cm. They are on their way. You may be right I don't order from EBAY a lot; so I didn't know if that was a good price. I don't really need that length at the moment; but I will need to set up for outdoor testing.


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@kirk This is a complete set, Male to Male, Female to Female, and Male to Female. 40 wires per bunch, 3 bunches per type. Ends are male and female dupont connectors. I have never heard of Arduino terminals.

https://amz.run/5sir "https://amz.run/5sir"

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Kirk
 Kirk
(@kirk)
Eminent Member
Joined: 1 year ago
Posts: 26
Topic starter  

@zander   @Inq

      Hi Ron,   I located the problem, aka my mistake.  I had switched between a couple of different types of driver boards and assumed the Vcc and Ground were in a certain location. I attached a photo. As you know there are different styles of board that differ somewhat on Vc placement.  In the future I'm always going to check continuity between pin 16 of the Darlington chip and the output pins as well as documentation if I can find any.  Any suggestions?

Thanks again for your help. I will provide follow-up as my crazy project proceeds.  Kirk

M3 Driver

 


   
DaveE reacted
ReplyQuote
Page 3 / 3