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.