Need help in generating gcode from arduino

Shop Forum Everything Else Need help in generating gcode from arduino

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12384
    Anonymous
    Inactive

    Hello, I am student working on my engineering project which involves plotting of electrical field lines and equipotential curves using an electrolytic tank.
    The project would require an XY plotter which scans the complete area of the electrolytic tank with a voltage sensor probe hooked to an arduino.
    I want to generate and store a gcode of all the coordinates where the voltage sensing probs matches the reference voltage levels. This g code can then be used to plot the equipotential curves on a sheet of paper.

    Does anyone know how I could initiate the scanning and generate the gcode?

    Thanks in advance

    #12541
    Dan
    Keymaster

    I can’t help with “initiate the scanning”.

    If you know the limits of your machine x=[0…a] y=[0…b] then you can do two loops

    for(int x=0;x<a;x+=step_size_x) {
      for(int y=0;y<b;y+=step_size_y) {
        send("G01 X"+x+" Y"+y);
        readField(x,y);
      }
    }

    which should move the machine through all possible coordinates at the step_size that you want (the resolution).

    I would then plot circles on the paper where the diameter of the circle is the field strength in that location, with possibly a cutoff value (so that you don’t draw lots of tiny dots in weak areas)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.