# Processing - Part Tracer (3D digitizer)

**URL:** https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020
**Category:** Electronics (Arduino, etc.)
**Created:** [May 16, 2023, 9:49pm UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020 "2023-05-16T21:49:48Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![AussieBoy](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@AussieBoy](https://discourse.processing.org/u/AussieBoy)
#### Post date: [May 16, 2023, 9:49pm UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/1 "2023-05-16T21:49:48Z")

</div>

Hi, I haven’t used an Arduino in a number of years.  
Tied up with life. Starting again from scratch to be honest.  
But hoping to fast track. Building the project is my aim not to reinvent the entire wheel.  
Never used process before.  
If I can get some help, it would be appreciated.

I am looking at [DIY Digitizer (ruc.dk)](https://fablab.ruc.dk/diy-digitizer/)

with this repository

[GitHub - dzlonline/3D\_digitizer2: 3D digitizer using quadrature encoders](https://github.com/dzlonline/3D_digitizer2)

When I attempt to run the processing project I get  
java.lang.reflect.InvocationTargetException

If I add  
mode.id=processing.mode.java.JavaMode  
mode=Java

then I get  
Syntax Error - Error on “mode”

Any help please.

---

<div class="post-metadata">

### Author: ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)
#### Post date: [May 16, 2023, 10:41pm UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/2 "2023-05-16T22:41:58Z")

</div>

> [@AussieBoy](#):
>
> Never used process before.

Hi

Good place to start learning processing

https://www.youtube.com/embed/videoseries?list=PLzJbM9-DyOZyMZzVda3HaWviHqfPiYN7e&wmode=transparent&rel=0&autohide=1&showinfo=1&enablejsapi=1

And you can see examples provided with processing IDE

When you try to do project you need to haven minimum knowledge about the language that you going to use

---

<div class="post-metadata">

### Author: ![AussieBoy](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@AussieBoy](https://discourse.processing.org/u/AussieBoy)
#### Post date: [May 17, 2023, 7:40am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/3 "2023-05-17T07:40:28Z")

</div>

I have been told that the code has worked for someone else. They had a Mac though. I have windows.

---

<div class="post-metadata">

### Author: ![AussieBoy](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@AussieBoy](https://discourse.processing.org/u/AussieBoy)
#### Post date: [May 17, 2023, 8:39am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/4 "2023-05-17T08:39:52Z")

</div>

Looks like this topic is now dead in the water.

---

<div class="post-metadata">

### Author: ![RichardDL](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@RichardDL](https://discourse.processing.org/u/RichardDL)
#### Post date: [May 17, 2023, 10:27am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/5 "2023-05-17T10:27:35Z")

</div>

I don’t see the reason for your defeat. Processing works well on Windows/Mac/RPi. Arduino is communicating to PC with serial. That’s the same for Windows/Mac/RPi but with different port names.

I’ve copied working Processing sketches from Windows to RPi and only changed the port name.

---

<div class="post-metadata">

### Author: ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)
#### Post date: [May 17, 2023, 6:55pm UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/6 "2023-05-17T18:55:38Z")

</div>

> [@AussieBoy](#):
>
> Looks like this topic is now dead in the water.

Hi as @RichardDL said

Processing works well on Windows/Mac/RPi. Arduino is communicating to PC with serial. That’s the same for Windows/Mac/RPi but with different port names.

How any one could help you if you don’t know how to use processing at first place??

Start first in how to connect Arduino to processing then it’s going to be more easier to solve your issue

[![](https://img.youtube.com/vi/NhyB00J6PiM/maxresdefault.jpg "Arduino - Processing: serial data") ](https://www.youtube.com/watch?v=NhyB00J6PiM)

Try to make connection from Arduino to processing

---

<div class="post-metadata">

### Author: ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)
#### Post date: [May 18, 2023, 1:10am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/7 "2023-05-18T01:10:41Z")

</div>

If you feed this line of code  
`myPort = new Serial(p, Serial.list()[3], 19200);`  
an integer to a functional usb port you should not get an error and see the following:

 ![tracer](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/7/6/769f662ebee65155fa981047c68ac34894e88b61.png)

---

<div class="post-metadata">

### Author: ![AussieBoy](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@AussieBoy](https://discourse.processing.org/u/AussieBoy)
#### Post date: [May 19, 2023, 9:54am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/8 "2023-05-19T09:54:05Z")

</div>

Sorry, where do I add this code?

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [May 19, 2023, 11:24am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/9 "2023-05-19T11:24:46Z")

</div>

> [@AussieBoy](#):
>
> where do I add this code?

It is already in the project code.  
Seek and you shall find.

The code below from the project does NOT pass the index of `0` correctly to the method in the class and it is hardcoded as`[0]` in the class:

```auto
pointer digitizer = new pointer(this, 0);

```

```auto
pointer(PApplet p,int index)
  {
  myPort =new Serial(p, Serial.list()[0], 19200);
  active=true;
  }

```

You have to modify the code to connect to the Arduino COM port that you intend to use.

Resources:

> **[Serial / Libraries](https://processing.org/reference/libraries/serial/index.html)**
>
> Send data between Processing and external hardware through serial communication (RS-232).

`list()` may be of interest to you in the resource above.

`:)`

---

<div class="post-metadata">

### Author: ![RichardDL](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@RichardDL](https://discourse.processing.org/u/RichardDL)
#### Post date: [May 19, 2023, 1:37pm UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/10 "2023-05-19T13:37:59Z")

</div>

That ‘Serial.list()[0]’ parameter in the example frequently causes confusion. IMO we need a single post that explains it all properly. For now, easier to say: see what port you used to load the Arduino e.g. COM12, instead of ‘Serial.list()[0]’ put “COM12” (with quotes).

---

<div class="post-metadata">

### Author: ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)
#### Post date: [May 19, 2023, 6:55pm UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/11 "2023-05-19T18:55:02Z")

</div>

When selecting a serial port (as well as other things in life), it’s always nice to know your options. Adding the following code up near the front of your project can help you make an informed decision:  
`printArray(Serial.list());`

---

<div class="post-metadata">

### Author: ![AussieBoy](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@AussieBoy](https://discourse.processing.org/u/AussieBoy)
#### Post date: [May 22, 2023, 11:01am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/12 "2023-05-22T11:01:55Z")

</div>

I am not physically connected to an Arduino.

Hi, I posted this the other day on the Arduino forum as a question.  
Does processing need to be connected to the Arduino?

(By Commenting out lines of code in the processing project I was able to get the GUI to display. Without any keys displaying).

---

<div class="post-metadata">

### Author: ![AussieBoy](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@AussieBoy](https://discourse.processing.org/u/AussieBoy)
#### Post date: [May 22, 2023, 11:21am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/13 "2023-05-22T11:21:50Z")

</div>

> [@svan](#):
>
> printArray(Serial.list());

Hi, this doesn’t work for me. It’s been quite some time since I have worked with USB’s and RS232.  
I don’t have an Arduino to hand at the moment. Wnen I do connect an Arduino to my PC will it show up in my Device Manager automatically. With an RS232 address?

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/0/e0a416b127fec3c00ea11d67f4fd6010aa7398d2.png)

---

<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: [May 22, 2023, 11:35am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/14 "2023-05-22T11:35:28Z")

</div>

> [@AussieBoy](#):
>
> I am not physically connected to an Arduino.

What is your goal? Do you want to build a digitizer  
or just test the program beforehand? Do you already own the Arduino  
and the digitizer?

---

<div class="post-metadata">

### Author: ![RichardDL](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@RichardDL](https://discourse.processing.org/u/RichardDL)
#### Post date: [May 22, 2023, 1:02pm UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/15 "2023-05-22T13:02:34Z")

</div>

> [@AussieBoy](#):
>
> Wnen I do connect an Arduino to my PC will it show up in my Device Manager automatically.

Yes, probably. It depends on what Arduino you get, and whether the driver is already on your PC. Finding (Google etc.) the driver usually takes \< 5 mins. After that it works every time, straight away. (If difficult please ask, with type of Arduino or url where you bought it.)

---

<div class="post-metadata">

### Author: ![AussieBoy](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@AussieBoy](https://discourse.processing.org/u/AussieBoy)
#### Post date: [May 23, 2023, 7:28am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/16 "2023-05-23T07:28:55Z")

</div>

Initially test the program

---

<div class="post-metadata">

### Author: ![AussieBoy](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@AussieBoy](https://discourse.processing.org/u/AussieBoy)
#### Post date: [June 1, 2023, 10:26am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/17 "2023-06-01T10:26:05Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/b/d/bd6e2625a07583c4a1bcbde8a9799017815e013d.png)

---

<div class="post-metadata">

### Author: ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)
#### Post date: [June 1, 2023, 10:34am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/18 "2023-06-01T10:34:10Z")

</div>

Is there supposed to be a semi-colon following JavaMode? Do you really need that line of code anyway? The mode is set in the upper right hand corner of the editor.

---

<div class="post-metadata">

### Author: ![AussieBoy](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@AussieBoy](https://discourse.processing.org/u/AussieBoy)
#### Post date: [June 1, 2023, 10:52am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/19 "2023-06-01T10:52:17Z")

</div>

is the issue not with PeasyCam

---

<div class="post-metadata">

### Author: ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)
#### Post date: [June 1, 2023, 10:53am UTC](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020/20 "2023-06-01T10:53:11Z")

</div>

The issue may be the line above it.

[Next page](https://discourse.processing.org/t/processing-part-tracer-3d-digitizer/42020.md?page=2)
