Stepper Step to Music

Hello, I just have some questions about turning the speed and steps into music of a stepper motor. I am using an Arduino Mega 2560 with a Nema 17 stepper motor, along with a L298N driver. If this is not possible, then how would I use the other Tone() library that I heard that controls stepper motors to music? Wiring and code: (the stepper has 12V)

#include <Stepper.h>

const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution
// for your motor

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 22, 23, 24, 25);

void setup() {
  // put your setup code here, to run once:



void loop() {
  // put your main code here, to run repeatedly:

I see nothing in your code that is sensing music or controlling the stepper. If you want somebody to do the software designed for you there are people here that would do that for a fee. What is the source of music and what is the interface, a schematic of your design, not a frizzy thing, would help a lot.

No, I don't want anybody to do the software part, all I am asking is what does the step function and speed have to do with making music such as the one in this video:

The step and setspeed function are in the setup, I just want to know how speed of the stepper is related to frequency of piano notes and guitar notes.

Here is the schematic:



This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.