Jump to content
THIS IS THE TEST SITE OF EUROBRICKS! ×
THIS IS THE TEST SITE OF EUROBRICKS!

Recommended Posts

  • Replies 63
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 4 months later...
Posted

hello I built my own lego technic plotter but ı dont now how to code can someon help

I am using the technic hub and 3 large motor 

ı finished the design but ı dont now the codes what should I do?

  • 2 weeks later...
Posted

@lego aram I suggest that you install Pybricks on your technic hub (https://pybricks.com/learn/) and code it from a computer.

By writing a sequence of run_target commands for your motors you can create steps for your plotter to move to.

Posted
On 7/14/2024 at 7:03 AM, ord said:

@lego aram I suggest that you install Pybricks on your technic hub (https://pybricks.com/learn/) and code it from a computer.

 By writing a sequence of run_target commands for your motors you can create steps for your plotter to move to.

I know but it is so complicated

if you want ı can send my design on instagram to you

and I will write to technic hub not ınventor hub

Can you also put a video about this on YouTube, what I mean is that some people cannot understand this kind of code very well  like me

What I mean is, I finished the design, only the code work remains 

Posted
4 hours ago, ord said:

@lego aram it might look complicated but it's actually quite simple. 

If you copy some of the examples from the bottom of this page onto your hub you should have a moving plotter, and from there it's just a matter of changing/adding lines of code. 

https://docs.pybricks.com/en/latest/pupdevices/motor.html

Feel free to direct message me on Eurobricks if you get stuck :).

Thank you for the link, but what I mean is, this just makes the motors move back and forth, for example, I'm going to draw a rabbit, but I don't know how to do this.

There's also something I want to ask, how did you write these codes because it's a difficult task, or are you planning to put a video about it?

if you want I can send the photo of my plotter

Posted

Ah, I misunderstood. Please see the first page of this thread for where I got my source images from and how I converted them to machine code.

Basically, for a line-drawing, a vector file is usually needed that contains the lines to be drawn (I have been using the .svg file type). That file needs to be converted to code, which I do using software called vpype (and a plugin for it called vpype-gcode).

This is all detailed on the first page of this thread, including the custom profile I used in vpype-gcode to output code that is readable by Pybricks :). 

Posted
47 minutes ago, ord said:

Ah, I misunderstood. Please see the first page of this thread for where I got my source images from and how I converted them to machine code.

Basically, for a line-drawing, a vector file is usually needed that contains the lines to be drawn (I have been using the .svg file type). That file needs to be converted to code, which I do using software called vpype (and a plugin for it called vpype-gcode).

This is all detailed on the first page of this thread, including the custom profile I used in vpype-gcode to output code that is readable by Pybricks :). 

Thank you for the information you provided, I looked at all the details of your work and it is simply perfect.

As I said, I read all the articles you wrote, the answers, the questions and even downloaded them from github by clicking on the links, but downloading is not enough.

Someone needs to show it because I downloaded the files but I don't know how to use it, I need help with that.

And maybe it will be funny, but after downloading the files, I tried to do something myself, but I couldn't, so I deleted the files :)

I don't want you to misunderstand, but you are only explaining it in writing, and I need to understand it by seeing someone do it.

If you want, I can give you the photo, dimensions and information of my plotter.

Posted (edited)
On 9/26/2021 at 12:18 AM, ord said:

I use a handy tool called vpype (that's specifically made for plotters) and a plugin for it called vpype-gcode to convert the .svg file into the code that you see under program(). That art in the first plot was just an .svg file that I downloaded.

Vpype sorts and scales the line segments of the .svg...


vpype read C:\input.svg layout --fit-to-margins 20cm --landscape 297x210cm show linesort gwrite --profile pybricks C:\output.txt

...while vpype-gcode (referenced by gwrite above) turns it into the code that I paste into Pybricks, by referencing this custom profile...


[gwrite.pybricks]
document_start = "def program():\n"
segment_first = "	move({x:.0f},{y:.0f})\n	head_down()\n"
segment = 	"	move({x:.0f},{y:.0f})\n"
segment_last = 	"	move({x:.0f},{y:.0f})\n	head_up()\n"

 

Once you have vpype and vpype-gcode installed (you will need Python installed first to install them), copy the custom profile above into ~/.vpype.toml (open this file in a text editor and paste the custom profile at the bottom).

From there it's just a matter of saving your svg file as input.svg in the C:\ drive and running the "vpype read..." code above in vpype.

Feel free to share photos/dimensions of your plotter. The only thing that might change for your plotter should be the size of the paper (mine is 297x210cm).

Edited by ord
Posted
8 hours ago, ord said:

Once you have vpype and vpype-gcode installed (you will need Python installed first to install them), copy the custom profile above into ~/.vpype.toml (open this file in a text editor and paste the custom profile at the bottom).

From there it's just a matter of saving your svg file as input.svg in the C:\ drive and running the "vpype read..." code above in vpype.

Feel free to share photos/dimensions of your plotter. The only thing that might change for your plotter should be the size of the paper (mine is 297x210cm).

Thanks for the explanation and links.

What I want to tell you is that writing this code is very complicated and you can only explain it by writing it, don't get me wrong, but I didn't understand it that way, you said download it to PC etc. After that, could you please post it in the form of a video, because this subject is a bit complicated and I don't think I can understand it in words.

My plotter is for A4, like yours

The only difference between mine and yours is that mine is very simple and understandable, while yours is a bit like a complex system.

Posted

Making a video is too much work so I don't plan to do that. Yes the subject is complicated but all of the information is available if you follow the installation instructions on the vpype github - this is how I learnt how to do it.

The mechanics of my plotter are fundamentally pretty simple. It's the coding of complex plots, I would say, that make it a complex system.

Posted
10 minutes ago, ord said:

Making a video is too much work so I don't plan to do that. Yes the subject is complicated but all of the information is available if you follow the installation instructions on the vpype github - this is how I learnt how to do it.

The mechanics of my plotter are fundamentally pretty simple. It's the coding of complex plots, I would say, that make it a complex system.

As I said, I looked on github but couldn't find it again.

I need to watch while someone does this coding.

And then I can learn this too

I click on the links and look at the pages, but I still know how to do it. If I send you a photo of my plotter, would you help me write?

If I ask you something, I think it would be better if you make a small video about how to download and use the links you sent.

Because I didn't understand anything on my own

 

Posted

Hello, can you help me write the code?

And I can send you photos of the plotter from several angles.

As I said, I just don't know how to use the links you showed me.

and I will use technic hub and 3 motors

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

Announcements

  • THIS IS THE TEST SITE OF EUROBRICKS!

×
×
  • Create New...