# How to print serial values above rect and not blur

**URL:** https://discourse.processing.org/t/how-to-print-serial-values-above-rect-and-not-blur/33530
**Category:** Electronics (Arduino, etc.)
**Tags:** homework
**Created:** [November 15, 2021, 3:04pm UTC](https://discourse.processing.org/t/how-to-print-serial-values-above-rect-and-not-blur/33530 "2021-11-15T15:04:40Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![anwar05](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@anwar05](https://discourse.processing.org/u/anwar05)
#### Post date: [November 17, 2021, 3:27am UTC](https://discourse.processing.org/t/how-to-print-serial-values-above-rect-and-not-blur/33530/7 "2021-11-17T03:27:16Z")

</div>

hello @glv , i 've learned what u sent for me. i’ve just tried on my own program, and it’s working bro.  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/52062fc73e0fa17c423e11894a40ed5c9fb78f9f.png)

```auto
// test print data on top of rect and ellips

import processing.serial.*;

float temp;
float hum;
float load;

Serial port;

void setup() {

  size(400, 400);
  port = new Serial(this, "COM5", 9600);

}

void draw() {
  background(0);

  if (port.available() > 0) {
    String val = port.readString();
    String [] list = split(val, ',');
    temp = float(list[0]);
    hum = float(list[1]);
    load = float(list[2]);

   }
  stroke(255);
  fill(255);
  rect(80, 80, 60, 60, 12);
  rect(220, 80, 60, 60, 12);
  ellipse(180, 200, 100, 100);

  //fill(0, 120, 255);
  PFont f = createFont("Georgia", 70);
  textFont(f);
  textSize(15);
  text("Ambient Temp(°C)", 60, 70);
  text("Humidity(%)", 210, 70);
  text("Load (Kg)", 150, 270);

  //fill(255, 1, 2);
  textSize(15);
  fill(0, 0, 255);
  text(temp, 90, 115);
  fill(255, 0, 0);
  text(hum, 225, 115);
  fill(0, 255, 0);
  text(load, 150, 205);

}

```

---

_[View the full topic](https://discourse.processing.org/t/how-to-print-serial-values-above-rect-and-not-blur/33530)._
