-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repeat movement without going through the setup again #2
Comments
I have modified the code to do just that - after the run finishes it returns to the start position and you can change the speed if you wish. `// Sketch for CamSlider #include <SPI.h> int startmelody[] = { int volatile prevPOS = 0; #define enterSwitch1 11 //Enter values switch // setting pins for old mechanical rotary encoder // #define SCREEN_WIDTH 128 // OLED display width, in pixels // setting pins for oled display // AccelStepper stepper2(1, 7, 6); // (Type:driver, STEP, DIR)PANNING-MOTOR MultiStepper StepperControl; long gotoposition[2]; volatile long XInPoint=0; void Switch() } } void Rotary() void setup() // iterate over the notes of the melody:
} Serial.begin(9600); pinMode(enterSwitch1, INPUT_PULLUP);
if(!display.begin(SSD1306_SWITCHCAPVCC)) { display.clearDisplay(); // Create instances for MultiStepper - Adding the 2 steppers to the StepperControl instance for multi control attachInterrupt (digitalPinToInterrupt(2),Switch,RISING); // SW connected to D2 // display Boot logo Home(); // Move the slider to the initial position - homing } void Home() while (digitalRead(limitSwitch2)== 1) // returns carriage to end-stop switch } void SetSpeed()
}
} } void stepperposition(int n)
} void loop() //Set Slider Start Position }
} //Display Set Speed
} { // iterate over the notes of the melody:
} //Return to start } |
Thanks! There is a lot more on your code... but I figured what I needed to do... I had made a mistake setting a flag at the end after returning to XInPoint e YInPoint |
No problem.
What Arduino are you using ?
I’m currently using a Mega 2560 as the UNO won’t let me run the code -
Sent from Chris Brights iPhone
… On 10 Aug 2020, at 23:06, maxmontegtr ***@***.***> wrote:
Thanks! There is a lot more on your code... but I figured what I needed to do... I had made a mistake setting a flag at the end after returning to XInPoint e YInPoint
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
just a Nano |
I would be interested to see the code that you are running and a schematic of your connections because as I say I am having trouble running it on my uno as the display will not initialise - I keep getting the allocation failure message
Sent from Chris Brights iPhone
… On 11 Aug 2020, at 08:20, maxmontegtr ***@***.***> wrote:
just a Nano
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I am using the original code (I just changed the speed and direction, but that depends on my slider design), plus a little tweak at the end for the last two "if" //Slide Finish |
Cheers mate
Sent from Chris Brights iPhone
… On 11 Aug 2020, at 09:24, maxmontegtr ***@***.***> wrote:
I am using the original code (I just changed the speed and direction, but that depends on my slider design), plus a little tweak at the end for the last two "if"
//Slide Finish
if(flag==9)
{
display.clearDisplay();
display.setCursor(20,26);
display.println("Repeat?");
display.display();
}
//Return to start
if(flag==10)
{
gotoposition[0]=XInPoint;
gotoposition[1]=YInPoint;
display.clearDisplay();
display.setCursor(6,28);
display.println("Rewinding");
display.display();
stepper1.setMaxSpeed(3000);
StepperControl.moveTo(gotoposition);
StepperControl.runSpeedToPosition();
flag=6;
//SetSpeed();
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi , can I know where can get the 3 libraries file. and what transistor use for this project pls.... any one can help ? wish to make one set of this amazing build. |
I have problem on this project, the Y motor not always working and work very weak...I have few times are working well, then after that is not working at all.....I have no idea why, check the cable connect is fine. and the encoder is keep floating, just touch a little bit with my finger, then it will move the motor, and sometime switch to another mode like from X out change to y out.... im not sure is about the hardware or the coding or the cabling ..... I watch the video many time and Raj are using transistor and resistor in this project...but it not show up in the schematic ... hope some one can help...thanks so much !! |
Hi, I'm a total noob and I don't know what I am doing with code. That said... I made a slider and use your code, thanks!
It's awesome.
I think it would be even better if at the end of the cycle, when you click after "finish", it went back to X in e Y in (like it does on preview), and allowed you to star the program again with the last used parameters (same in and out points, same speed).
that way it would be more convenient to do multiple takes while filming, instead of having to set everything up every time.
Thanks! Max
The text was updated successfully, but these errors were encountered: