Using SD Cards with...
 
Notifications
Clear all

Using SD Cards with Arduino - Record Servo Motor Movements

84 Posts
6 Users
1 Likes
7,792 Views
(@robomaster)
Member
Joined: 3 years ago
Posts: 36
 

@will 

 

I ran the program and the record works fine and now I have to get the play function to what you did in the record in reverse. which I will get working tomorrow. Again I thank you for all your help on this.


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@robomaster 

Posted by: @robomaster

@will 

I ran the program and the record works fine and now I have to get the play function to what you did in the record in reverse. which I will get working tomorrow. Again I thank you for all your help on this.

I can't test your code, but I had a quick look through it and wanted to provide some constructive criticism.

1) Clean code is good code, and when seeking help, I also agree with others that it's a good idea to have a consistent indentation scheme.  Many people don't have a lot of time to waste and will not sift through many lines of hard to read code, so the message is for you to help others, to help you, for optimum results.

2) Aside from indentation, I'm a strong advocate for employing meaningful variable names

3) When seeking help, you should only post the bare minimum code, that is... you currently have another three buttons not being used, and all of the associated led code is not required to address, or solve the program logic either.

4) One of the biggest issues I see whilst reading through all the responses, is also that you didn't nail down the program requirements before you jumped in code deep.  Without knowing them up front, you end up chasing your tail, and it is frustrating for others to follow along whilst trying to help too, so keep that in mind, as it will help solve any problems sooner rather than later.

Lastly, the following piece of code does not do what you may think it does, which is probably why you're not getting the result you expect:

return count > 0;

 ...should be:

return (count > 0) ? count : 0;

 

The first statement will always evaluate to true and always return 'true', which evaluates to the integer 1.

The second statement uses the 'ternary' operator to properly evaluate the condition and return the appropriate result - basically a shortcut of an if conditional statement.

Cheers.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 
Posted by: @robomaster

For now, I need to have four channels working so I can show it to my client I can record and playback from an SD Card and then get them to lock down all the functions that they want

So you're going to use our help to get paid for this project ?

I'm out.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@robomaster)
Member
Joined: 3 years ago
Posts: 36
 

@will 

No, I don't do Art. Thank You for that link but that is not what I will be doing with the MP3 Player unit.

Above are some Videos that I did in 2013. That figure has 30 servos in it.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@robomaster 

I didn't send you a link.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@robomaster 

Above are some Videos that I did in 2013. That figure has 30 servos in it.

My assumption would have been it was a puppet with human hands in gruesome gloves.
Horror is not something I enjoy although some people get a real kick out of it.
Good luck with your project.

 


   
ReplyQuote
(@robomaster)
Member
Joined: 3 years ago
Posts: 36
 

@will 

Do you have a PayPal account?


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@robomaster 

That's not public information.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 
Posted by: @robomaster

@will 

Do you have a PayPal account?

Hey, what about me, I contributed something way back when.  I claim my fair share of consultancy fees. 😎 

This post was modified 3 years ago by byron

   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@byron 

It's all yours Byron, I'm done with this project.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@robomaster)
Member
Joined: 3 years ago
Posts: 36
 

@will 

Look here is my email address guy's I want to talk to both of you outside the Forum.

Please contact me. 

tim_lewis_53@hotmail.com


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@robomaster 

I am not interested in any communication outside of the forum.

I've given you most of the code you need, and Play() will mostly be like the easy part of Record(). At this point I feel that you should be able to complete the sketch yourself.

The videos you posted show control of 30 servos in a single figure, so I am unable to understand why you should now require so much assistance to handle a meagre 16 of them.

Anything seems possible when you don't know what you're talking about.


   
frogandtoad reacted
ReplyQuote
(@robomaster)
Member
Joined: 3 years ago
Posts: 36
 

@will 

I Thank You for all your help on this.

The CryptKeeper was done in 1996 and there were no Arduino, Rasberry Pi's no pic chips, etc. they had not been invented yet. All we had to work with were eight-channel MIDI boards.  In 2013 we had some updated Servo drive board that I was able to use to control sixteen or so. Using some software that ran off a laptop.

 

This is a small-scale stand-alone system.

 

 

 

 


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@robotbuilder 

Posted by: @robotbuilder

Horror is not something I enjoy although some people get a real kick out of it.
Good luck with your project.

LOL, I think I've seen those before... reminds me of the old: "Deadly Earnest" stuff! 🙂


   
ReplyQuote
(@robomaster)
Member
Joined: 3 years ago
Posts: 36
 

@will 

To answer your question abbout the Crypter Keeper figure it was made in 1996 at that time the Arduino Boards had not be invented yet. Had to make my own servo driver boards using MIDI which worked pretty good.

I am extermely sorry about what happen here on Servo Controler code. What can I do to compensate you for time and help on this?


   
ReplyQuote
Page 5 / 6