SINTEF-9012 / JArduino

Program your Arduino in Java
https://github.com/SINTEF-9012/JArduino/wiki
177 stars 63 forks source link

Blink test doesn't seem to be working #14

Closed ColF closed 13 years ago

ColF commented 13 years ago

First of all, well done on a great library. Secondly, apologies if this is not the right place for this.

Ok, I download the library and have tried to run Blink.java from the examples as a test. When I run the code the RX LED flashes but the pin 13 LED doesn't blink. When I run a similar script through arduino's gui everything works as it should. Debugging shows I had to change this line from Serial4JArdiono.java:

if (osName.equals("Linux") && osProc.equals("x86")) { to this: if (osName.equals("Linux") && (osProc.equals("x86") || osProc.matches("i\d86"))) { as my os.arch returns i386. This should also cater for PCs returning i586, i686, etc However even after this change it still didn't work. What can can I do from here to further debug?

My setup: Mandriva 2010 Eclipse Galileo (I'm not using JArduino's gui) rxtx: org.kevoree.extra.osgi.rxtx-2.2.0.jar

Thanks for any advice. Col

ffleurey commented 13 years ago

Hello,

Thanks for your message, here are some potential problems:

1) Have you installed the JArduino Firmware on your arduino board? I am not sure it is very clear in our documentation but you need to upload the JArduino firmware on your arduino for JArduino to work.

2) By default the Blink example actually uses pin 12 instead of 13, did you change it to 13 in the java code?

Let us know if that heps!

Cheers,

Franck

ColF commented 13 years ago

Hi Franck,

Thanks for the quick reply. I had changed the pin to pin 13 but hadn't installed the JArduino Firmware. Have done so now and that fixed my problem.

For any one browsing this forum with the same problem, Step 0 of the Two Minute Tutorial (https://github.com/ffleurey/JArduino/wiki/2-Minute-Tutorial) is very important. :)

Thanks for your help. Col