No tension with JArduino

Hello,

I can use JArduino to control my Arduino card.

The problem is when I compile the program is that I run it, no led will turn on.

It looks like the "PIN_13" is not receiving voltage, it is inactive.

However, the LED "RX" lights well so my code should work.

Here is the code:

import java.util.Scanner;

import org.sintef.jarduino.DigitalPin;
import org.sintef.jarduino.DigitalState;
import org.sintef.jarduino.JArduino;
import org.sintef.jarduino.PinMode;
import org.sintef.jarduino.comm.Serial4JArduino;

public class Main extends JArduino {

	public Main(String port) {
	    super(port);
	}

	@Override
	protected void setup() {
	  
	    pinMode(DigitalPin.PIN_13, PinMode.OUTPUT);
 
	}

	@Override
	protected void loop() {
	    
		digitalWrite(DigitalPin.PIN_13, DigitalState.HIGH);
	    
	}

	public static void main(String[] args) {
		
	    String serialPort;
	    if (args.length == 1) {
	        serialPort = args[0];
	    } else {
	        serialPort = Serial4JArduino.selectSerialPort();
	    }
	    
	    JArduino arduino = new Main(serialPort);
	    arduino.runArduinoProcess();

	}
}

Can you tell me why my led on pin 13 does not turn on?

Thank you.

@UnMecRandom

There is a lot of information missing before anybody can help out. 1) What are you running on the Arduino board? The JArduino Firmware sketch? 2) What board? Arduino Uno? 3) What versions of everything; IDE, JArduino, etc? 4) Does the java program have access rights to the com port? 5) Anything else that can help understand your environment, setup, etc, and what you are trying to achieve.

Cheers!

  1. What are you running on the Arduino board? The JArduino Firmware sketch?

I already put the JArduino Firmware on the board.

  1. What board? Arduino Uno?

Arduino Uno.

  1. What versions of everything; IDE, JArduino, etc?

IDE: 1.6.12; JArduino: 0.1.7; JRE: 1.8.0_111; JDK: 1.8.0_92 .

  1. Does the java program have access rights to the com port?

Yes, the JAVA program has COM port access rights.

  1. Anything else that can help understand your environment, setup, etc, and what you are trying to achieve.

I try to turn on the led located on pine 13 of the Arduino. I have installed the JArduino and RXTX libraries

Thank you.

Try the tutorial first so that you get all the steps up and running first. Then go to the right forum :slight_smile:

Cheers!