# Processing.py and Arduino connection

**URL:** https://discourse.processing.org/t/processing-py-and-arduino-connection/20026
**Category:** Processing.py
**Created:** [April 22, 2020, 9:40am UTC](https://discourse.processing.org/t/processing-py-and-arduino-connection/20026 "2020-04-22T09:40:44Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Bodo29](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@Bodo29](https://discourse.processing.org/u/Bodo29)
#### Post date: [April 22, 2020, 9:40am UTC](https://discourse.processing.org/t/processing-py-and-arduino-connection/20026/1 "2020-04-22T09:40:44Z")

</div>

Hi,  
I’m brand new here in this forum and also in using processing.  
So first: English is not my first language. Sorry for any mistakes or misunderstandings.

I’ve got the following problem while trying to use an Arduino Uno with processing:  
My OS is Windows 10, the Arduino is connected via USB to COM1 and running the Standard Firmata, I#M using the processing IDE in Python mode.  
I am not able to connect to the Arduino in Python mode. An example:

**in Java mode:**

```auto
   import processing.serial.*;

   Serial myPort; // Create object from Serial class
   int val; // Data received from the serial port

   void setup()
   {
     size(200, 200);
     myPort = new Serial(this, "COM1", 57600);
   }

   void draw()
   {
   }

```

**that works fine.**

**Now in Python mode:**

```auto
   add_library('serial')
   add_library('arduino')

   def setup():
       a = Arduino(this, "COM1", 57600)

   def draw():
       pass

```

**ends with a mistake:**

> UnsatisfiedLinkError: jssc.SerialNativeInterface.openPort(Ljava/lang/String;Z)J  
> at jssc.SerialNativeInterface.openPort(Native Method)  
> at jssc.SerialPort.openPort(SerialPort.java:158)  
> at processing.serial.Serial.(Unknown Source)  
> at processing.serial.Serial.(Unknown Source)  
> at cc.arduino.Arduino.(Arduino.java:159)

**and so on.**

What is wrong here? I think it is a problem with the serial library in Python mode.  
Can anybody help me?

---

<div class="post-metadata">

### Author: ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)
#### Post date: [April 22, 2020, 9:52am UTC](https://discourse.processing.org/t/processing-py-and-arduino-connection/20026/2 "2020-04-22T09:52:17Z")

</div>

“… Deleting windows32\jSSC-2.8.dll works perfectly …”

> <https://github.com/jdf/Processing.py-Bugs/issues/227>
>
> It looks like processing is using incorrect dll search path on a 64bit architecture.
> Following code fails.
> add\_library('serial')
> from java.lang import System
> System.loadLibrary("jSSC-2.8") #the native...

---

<div class="post-metadata">

### Author: ![Bodo29](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@Bodo29](https://discourse.processing.org/u/Bodo29)
#### Post date: [April 23, 2020, 8:38am UTC](https://discourse.processing.org/t/processing-py-and-arduino-connection/20026/3 "2020-04-23T08:38:52Z")

</div>

Thank you very much, **tabreturn**.  
Great, it works.  
It was a little bit tricky because I didn’t know exactly what was meant and what I should do.  
The path to find the .dll was **c:\programs (x86)\processing-3.5.4\modes\java\libraries\serial\library\windows32** and it was difficult for a beginner to find that. 😇 😇  
After deleting the .dll everything works fine.

---

<div class="post-metadata">

### Author: ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)
#### Post date: [April 25, 2020, 4:05pm UTC](https://discourse.processing.org/t/processing-py-and-arduino-connection/20026/4 "2020-04-25T16:05:52Z")

</div>

Yeah! This is terrible for beginners, It bothers me so much!  
From time to time I try to find someone with skills to fix this 😕

I’m glad you made it work! Now see if you can [play with some potentiometers](https://github.com/villares/lousa-magica/)!

---

<div class="post-metadata">

### Author: ![mpsftw](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mpsftw/32/8912_2.png) [@mpsftw](https://discourse.processing.org/u/mpsftw)
#### Post date: [April 27, 2020, 1:00pm UTC](https://discourse.processing.org/t/processing-py-and-arduino-connection/20026/5 "2020-04-27T13:00:19Z")

</div>

I have a fix in for this. I believe it’s in build 3058. I can only test Windows in a VM, so please let me know if you continue to see it.

---

<div class="post-metadata">

### Author: ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)
#### Post date: [April 27, 2020, 2:41pm UTC](https://discourse.processing.org/t/processing-py-and-arduino-connection/20026/6 "2020-04-27T14:41:58Z")

</div>

Wow! That is **great news** I don’t have access to Windows right now, but I’ll have a look ASAP!

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [May 3, 2020, 5:25pm UTC](https://discourse.processing.org/t/processing-py-and-arduino-connection/20026/7 "2020-05-03T17:25:35Z")

</div>

> [@mpsftw](#):
>
> I believe it’s in build 3058

Thank you so much, @mpsftw !

That’s correct – currently if you install Python mode from Processing PDE you will see a 3058+ build including [that Windows fix](https://github.com/jdf/processing.py/commit/3267891a64e3393aec9c13c5c35756dddc1b7adf). I just tried, and PDE installed [3059](https://github.com/jdf/processing.py/releases/tag/3059).
