Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: trouble uploading firmware
Ria
Newbie
Posts: 7
Permalink
Post trouble uploading firmware
on: November 15, 2015, 15:33
Quote

Hi!

I try to build the Polargraph with the instruction on instructables. I got an error trying to verify/upload polargraph_server_a1 to the board:

polargraph_server_a1:160: error: 'multiplier' was not declared in this scope
float mmPerStep = mmPerRev / multiplier(motorStepsPerRev);

polargraph_server_a1:161: error: 'multiplier' was not declared in this scope
float stepsPerMM = multiplier(motorStepsPerRev) / mmPerRev;

exit status 1
'multiplier' was not declared in this scope

Along with polargraph_server_a1 there are 14 other tabs open. The libraries AccelStepper and AFMotor are included.

Thank you!
Ria

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: trouble uploading firmware
on: November 15, 2015, 15:48
Quote

Hi Ria, I'm going to guess that you're using Arduino v1.6.6? Its the newest version of the Arduino IDE and it seems to have broken a few things.

Firmware still compiles fine in Arduino IDE v1.6.5.

I'm working on a fix! Ideas anybody?

Sn

Ria
Newbie
Posts: 7
Permalink
Post Re: trouble uploading firmware
on: November 15, 2015, 16:21
Quote

Yes, I’m using Arduino v1.6.6.
Is there a way to get v1.6.5?

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: trouble uploading firmware
on: November 15, 2015, 16:34
Quote

Yes https://www.arduino.cc/en/Main/OldSoftwareReleases#previous has a link.

Good luck 🙂

Ria
Newbie
Posts: 7
Permalink
Post Re: trouble uploading firmware
on: November 15, 2015, 17:01
Quote

Ah great! It successfully uploaded with v1.6.5. Thank you very, very much!

(I’m afraid that wasn’t the last time I needed your help, but I really like this project and want to have a functioning Polargraph! 🙂 )

Ria
Newbie
Posts: 7
Permalink
Post Re: trouble uploading firmware
on: November 16, 2015, 21:36
Quote

Hi again!

I didn’t want to create another topic so I just add this one. I hope that’s okay.

Today I built everything together and it worked. But I have some problems adjusting it to the perfect result.

This should have been a perfect square:
Image

The conter weights are 120g each. My suggestion is that the beaded cord hasn’t enough grip on the sprockets. It sometimes jumps because the space between the beads is a bit to large. Can that be the reason? Or did I something wrong? It’s strange that it has a strong right twist.

I use two Adafruit Stepper motors (http://www.exp-tech.de/stepper-motor-nema-17-200-steps-rev-12v-350ma) with this driver shield (http://www.ebay.de/itm/181882507101?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT) on an Arduino Uno.

The program:
Image

Thank you!

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: trouble uploading firmware
on: November 16, 2015, 21:56
Quote

StepsPerRev should be 400 rather than 800. But that won't change what is happening. But make sure you do a "upload spec" after you change it.

When you do a "set home" command, do the motors lock? Are they held firmly?

When you pull on the gondola, does the sprocket move, or does the beaded cord jump over the teeth of the sprocket?

sn

Ria
Newbie
Posts: 7
Permalink
Post Re: trouble uploading firmware
on: November 16, 2015, 22:44
Quote

I changed the StepsPerRev to 400 and it worked pretty good on the upper half of the drawing surface. But when it comes to the second half the beaded cord on the right side jumps a lot. I tried to raise the conter weights to 150g but there was no change. So I guess the beads are not big enough and the space between them is to large.
The motors do lock and they held but not that firmly. When pulling down the gondola the sprockets move but there are jumps sometimes.

The beaded cords at the polargraph shop will fit to your sprockets design, right?

(Thanks again for your help and patience!)

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: trouble uploading firmware
on: November 17, 2015, 08:27
Quote

No problem Ria, happy to help. All of the beaded cord I've ever seen is pretty much the same. There is some that has twice as many beads, but the bead size is regular, about 4.5mm diameter.

What I'm saying is that I'd be surprised if the cord I have is any different to the cord you have. Are you using the 3d printable sprockets?

If you look at the sprockets, with the beaded cord in them, it should be obvious if they are mismatched. You should be able to wrap a length of beaded cord right around the sprocket and have the beads line up at the overlap.

If, when you pull the gondola, the sprockets move (rather than the cord skipping over the teeth), then I think the fit is ok. Remember it is possible to add weight to the gondola too, if you need to. And if you get skipping, reduce the speed & acceleration - though you might already have it low (less than 1000).

Remember that you can use "draw outline selected" to quickly sketch the outline of the area you have selected, rather than wait for pixel shading to finish.

sn

Ria
Newbie
Posts: 7
Permalink
Post Re: trouble uploading firmware
on: November 17, 2015, 09:11
Quote

I just ordered some cord on the polargraph shop and will try it with that because my beads just have a diameter of 3.8mm and they do mismatch with the 3D printed sprockets as I take a closer look. I’ll give it a try and if that wasn’t the reason I’ll come back to the solutions you suggested.

Thanks again!

Edit:
But maybe there is still something wrong with my motors? Or the configuration?
Because this is the result of my latest test where the cords weren’t skipping that much:
Image

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: trouble uploading firmware
on: November 17, 2015, 20:37
Quote

Got your pen sticking out too far, I reckon.

Try the "draw outline selected" to experiment.

Ria
Newbie
Posts: 7
Permalink
Post Re: trouble uploading firmware
on: November 24, 2015, 11:11
Quote

Hi!

I got the new cords and was finally able to try it. It works perfectly! The space between the beads of the old cords wasn’t too large but too small. Now everything fits where it should. I added some weights to the gondola, too.

I still have some trouble loading vectors, but I think I’ll figure that out soon.

So thank you very much. Your support is awesome!

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: trouble uploading firmware
on: November 24, 2015, 21:45
Quote

Ah that's great to hear Ria, happy scribbling 🙂

blownupp
Newbie
Posts: 2
Permalink
Post Re: trouble uploading firmware
on: December 2, 2015, 20:21
Quote

Hey there Sandy, I have a feeling there is a problem with the precompiled hex you provide.

I'm attempting to use the version for MEGA2560 with Adafruit Motor Shield v2 on a Windows machine. After uploading, I continuously get the message "Estimated pre-sc[] []8888888888888888[]" every 2 seconds instead of the "READY-200" message that I'm supposed to be seeing in the serial monitor. I'm downloading the Arduino IDE 1.6.5 now to compile and upload myself, but the fact remains the same: there seems to be a problem with the provided hex file for this version.

I will update with any success or failure.

UPDATE: So I downloaded the 1.6.5 IDE to run alongside the 1.6.6 so that I could compile and upload the hex myself and it seems to be working, yay!

Again, the fact remains the same - there seems to be something wrong with either: the provided hex, the app to upload to a MEGA2560 or the entire process on Windows 10. Doing it from scratch seems to be no problem, it's just that precompiled bit that seems to be an issue.

With that out of the way, any suggestions for changing the servo control into a simple ON/OFF pin change? I'd like to try this with my laser 😮

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: trouble uploading firmware
on: December 2, 2015, 20:39
Quote

There isn't a hex file for the MEGA2560, the ones in the pack are for the UNO only. I'll change their names for the next version, because that's not clear at all! (The _a1 branch has only recently been compatible with the MEGA.)

sn

blownupp
Newbie
Posts: 2
Permalink
Post Re: trouble uploading firmware
on: December 2, 2015, 23:41
Quote

Aha! That would make sense then haha. I went ahead and got it working using the IDE with 1.6.5 so all is good.

Any suggestions for changing the servo control into a simple ON/OFF pin change so that I can try this with my laser?

Thanks Sandy, this is a great project!

EDIT: So I'm poking around in the code and I found the penlift.h and corresponding functions. Would I be better off adding a one liner to the main loop() that tests whether isPenUp is true or false and turns a pin high if isPenUp == false to lase when it should be and turn it off when it should not be lasing, since as I understand the pen being up or down determines where lines start and end.

I'll be playing around with it a bit, I was just wondering what your expert opinion was :p

Thanks again!

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: trouble uploading firmware
on: December 3, 2015, 08:24
Quote

Glad you're enjoying it 🙂

I think I would put your laser control stuff into penlift.ino, changing the two functions penlift_penUp() and penlift_penDown() (https://github.com/euphy/polargraph_server_a1/blob/master/penlift.ino#L57-L96) so they look just like

void penlift_penUp()
{
  digitalWrite(laserPin, LOW); // laser turned off
  isPenUp = true;
}

void penlift_penDown()
{
  digitalWrite(laserPin, HIGH); // if HIGH is on
  isPenUp = false;
}

Most other functions in the firmware use those two functions to access the penlift, so that should cover the interface.

There is a function called penlift_movePen, which is the thing which usually actually does the call to the servo, setting it's position etc. The only place this is used directly is in exec.ino, in exec_setPenLiftRange(), but since it's used to set the height of the pen lift servo (which you won't need if it's a binary choice), then you'll not miss it.

sn

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.029 seconds.