# Having two different thick lines in one sketch

**URL:** <https://discourse.processing.org/t/having-two-different-thick-lines-in-one-sketch/29216>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [April 8, 2021, 12:01pm UTC](https://discourse.processing.org/t/having-two-different-thick-lines-in-one-sketch/29216 "2021-04-08T12:01:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Estefania](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Estefania](https://discourse.processing.org/u/Estefania)\
**Post date:** [April 8, 2021, 12:01pm UTC](https://discourse.processing.org/t/having-two-different-thick-lines-in-one-sketch/29216/1 "2021-04-08T12:01:03Z")

</div>

I have a question concerning drawing different thick lines in my sketch. If I want to draw two lines and each of them should use a different stroke weight - how would I do this in Processing?

My code:

````auto
import processing.serial.*;
Serial myPort;

int value;
int padding = 100;
float m;

void setup() {
  size(1440, 900);
  myPort = new Serial(this, Serial.list()[4], 9600);
  smooth();
  strokeWeight(3);
  stroke(100);
}

void draw() {
  background(#FFFFF0);
  if (myPort.available() > 0) {
    value = myPort.read();
    println(value); 
    m = map(value, 255, 0, padding, width-padding);
  } 
  line(padding, height/2, width-padding, height/2);
  noStroke();
  fill(#FFDE14);
  stroke (0,255,0);
  strokeWeight(5);
  line (m, height/2, m, 100); 
  stroke(100);
}```

Many thanks for your help.
````

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [April 8, 2021, 1:31pm UTC](https://discourse.processing.org/t/having-two-different-thick-lines-in-one-sketch/29216/2 "2021-04-08T13:31:01Z")

</div>

> [@Estefania](#):
>
> `strokeWeight`

Use this directly before the line command
