Back to: All Forums  Arduino  Port sharing
15 Aug 2012, 19:31
Generic-user-small

Ade Oduye (10 posts)

I have my Processing InvertedSonar sketch working successfully - I.E it is showing the concentric circles.

However, when I run my Arduino on port tty/ACM0, processing no longer has access to that port and I get an ArrayIndexOutOfBoundsException

Can you think of anything I am not doing or doing wrong to get both sides communicating?

ps: Apologies if I am not being descriptive enough. The fact is I am not very sure about anything processing and/or Arduino related

16 Aug 2012, 15:13
Maik_schmidt_avatar2_pragsmall

Maik Schmidt (113 posts)

When Processing starts the InvertedSonar sketch it prints a list of all serial ports to the console. Can you post this output, please?

17 Aug 2012, 02:31
Generic-user-small

Ade Oduye (10 posts)

Hi Maik,

Thank you for your response. I have made some progress since my original posting.

I am getting the following output:

*Stable Library

Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyACM0 [0] “/dev/ttyACM0” Temperature: 0.0 Distance: 0.0*

As you can see can I am getting some output but my Adruino code is outputing the following:

40.71, -24.611

I am working on things but I would appreciate any suggestions.

ps: I should mention I could not procure a Ping))) sensor and I am using an HC-SR04 sensor instead. This means the code in the text was imcompatible and I had to find alternative code. So, whilst your code prints long value types, my prints floats for the temperature and distance values.

17 Aug 2012, 03:44
Generic-user-small

Ade Oduye (10 posts)

Hey Maik,

I got it working.

Thanks!

  You must be logged in to comment