Code Monkey home page Code Monkey logo

jarduino's People

Contributors

bitdeli-chef avatar brice-morin avatar derekisbusy avatar dosjos avatar dukeboard avatar ffleurey avatar hnn avatar jaba17 avatar jnain avatar jsutaria avatar lobsteroh avatar mcmoor avatar meedeepak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jarduino's Issues

dependencies broken

this setup is not working well ...

JArduino/pom.xml has broken bits

    <repository>
        <id>kevoree-libs-release-local</id>
        <url>http://maven.kevoree.org/release</url>
    </repository>

where http://maven.kevoree.org/release is "404 not found"

JArduino/jarduino.samples/pom.xml has also

    <dependency>
        <groupId>org.kevoree.extra</groupId>
        <artifactId>org.kevoree.extra.osgi.rxtx</artifactId>
        <version>2.2.0</version>
    </dependency>

results in

[INFO] ------------------------------------------------------------------------
[INFO] Building org.sintef.jarduino.serial 0.1.7-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.kevoree.extra:org.kevoree.extra.osgi.rxtx:jar:2.2.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

and in eclipse the ping example gives

Load RxTx
WARNING:  RXTX Version mismatch
Jar version = RXTX-2.2
native lib Version = RXTX-2.2pre3
Request timed out (after 1010ms)
Request timed out (after 1000ms)
Request timed out (after 1001ms)

all a bit of a mess, and not functional in mac osx. oh well ...

fatal error: WConstants.h: No such file or directory

Hello
I have got some problems with upload the firmware to my Arduino

I have downloadet the JArduino-0.1.7 zip file and copy the arduino folder to the libery by the Arduino on my Computer.

Then i oppened the Arduino ide 1.6.6 (windows 64 bit)

I connected the Arduino UNO and launch the ide.

on File> Examples> Jarduino> JArduino Firmware.

the programm started... but if i compile and want to upload this error will be shown:

Arduino: 1.6.6 (Windows 8.1), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\libraries\JArduino/JArduino.h:24:24: fatal error: WConstants.h: No such file or directory

#include "WConstants.h"

                    ^

compilation terminated.

Bibliothek JArduino im Ordner: C:\Program Files (x86)\Arduino\libraries\JArduino (legacy) wird verwendet
Bibliothek EEPROM in Version 2.0 im Ordner: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM wird verwendet
exit status 1
Fehler beim Kompilieren.

Using JArduino over multiple arduinos trouble

Hello,

I am currently having problems using multiple arduinos at the same time using JArduino.

What I have done is copy the blink example, changed the actions and class name, then made the main method a regular method and just ran it from an external main method passing args to it. I do this twice.

My arduinos are on COM4 and COM5.

When I launch my program I enter COM4 but the second window that pops up for the next one only has the emulator as an option.

I have tried to just replace the choosing port window and just directly pass the com port as a string "COM4". However this tries to run the COM4 code on both of the arduinos, ignoring the other code I wrote for the other arduino.

Is there a work around for working with multiple arduinos or a proper way to use multiple arduinos?

UPDATE:
Working with the normal arduino rxtx library from the arduino playground, allows me to communicate to the second arduino at the same time but not through the JArduino. But the main thing is, is that I got an error if I tried to initialize it after doing the JArduino "start" method. (It could connect, but not write to data to the port, it would return that all ports are null)

I think the port is being turned off, cloned or somehow disabled when "starting the first JArduino"

JArduino firmware not compatible with last version of Arduino

Hello,

The last version of JArduino firmware is not compatible with the last version of Arduino IDE.
A simple patch can be the replacement of

include "WProgram.h"

by

include <Arduino.h>

In JArduino.cpp and JArduino.h files.

Best Regards,
Fouquet François

installing JArduino firmware problem

folks, i am missing something basic during the firmware install. the 2 min tutorial does not match anything i see on my computer. it says ...

Copy the JArduino folder (located in the distribution in org.sintef.jarduino.samples/arduino) into /libraries/

i git cloned the SINTEF-9012/JArduino repository, got build success with mvn clean install. for the life of me, i cannot find the mentioned "JArduino folder". i find a file called 'JArduinoFirmware.pde' at path ~/Documents/GitHub/JArduino/jarduino.core/src/main/arduino/JArduino/examples/JArduinoFirmware/JArduinoFirmware.pde

but nothing matches with the tutorial. has the important stuff been moved around since the tutorial was written? any solution greatly appreciated. setup is for Mega2560, mac osx 10.11.3, newest Arduino nightly, newest jArduino, Eclipse, thanks,

pulseIn() method

ok so i would like to read from an ultrasonic sensor and then extract how far it is for an obstacle avoidance my problem is that inJArduino there is not a pulsein method so how can i actually do this?

this is my arduino code

//code

int pingCenterF()
{
long duration; //Holds duration
long inches; //Holds the distance to an obctacle in inches
long cm; //Holds the distance to an obctacle in centimeters

  //Send Pulse
  pinMode(pingCenter, PinMode.OUTPUT);
  digitalWrite(pingCenter, DigitalState.LOW);
  delay(2);
  digitalWrite(pingCenter, DigitalState.HIGH);
  delay(5);
  digitalWrite(pingCenter, DigitalState.LOW);

  //Read Echo
  pinMode(pingCenter, PinMode.INPUT);
  duration = pulseIn(pingCenter, DigitalState.HIGH);



  // convert the time into a distance
  inches = microsecondsToInches(duration);
  cm = microsecondsToCentimeters(duration);
  //Prints the ping to the serial port
  Serial.print("Ping:  ");
  Serial.println(inches);

  return round(inches);

}

Modernize JArduino

We should make sure JArduino runs on the latest version of the Arduino IDE and nodes. See Issue #29 and #28, which can probably be solved by this modernization.

java.lang.ClassNotFoundException: org.sintef.jarduino.comm.Serial4JArduino

I am tring to run the Blink example:

import org.sintef.jarduino.*;

public class Blink extends JArduino 
{

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

    @Override
    protected void setup() 
    {
        // initialize the digital pin as an output.
        // Pin 13 has an LED connected on most Arduino boards:
        pinMode(DigitalPin.PIN_12, PinMode.OUTPUT);
    }

    @Override
    protected void loop() 
    {

        // set the LED on
        digitalWrite(DigitalPin.PIN_12, DigitalState.HIGH);
        delay(1000); // wait for a second
        // set the LED off
        digitalWrite(DigitalPin.PIN_12, DigitalState.LOW);
        delay(1000); // wait for a second
    }

    public static void main(String[] args) 
    {
        String serialPort = "/dev/cu.wchusbserial1410";
        JArduino arduino = new Blink(serialPort);
        arduino.runArduinoProcess();
    }
}

And I am getting the following error:

java.lang.ClassNotFoundException: org.sintef.jarduino.comm.Serial4JArduino
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.sintef.jarduino.AbstractJArduino.<init>(AbstractJArduino.java:41)
    at org.sintef.jarduino.JArduino.<init>(JArduino.java:48)
    at Blink.<init>(Blink.java:8)
    at Blink.main(Blink.java:34)
Exception in thread "Thread-0" java.lang.NullPointerException
    at org.sintef.jarduino.AbstractJArduino.pinMode(AbstractJArduino.java:64)
    at Blink.setup(Blink.java:16)
    at org.sintef.jarduino.JArduino$RemoteArduinoProcess.run(JArduino.java:128)

I am new to GitHub and don't know what I am doing wrong, any help is greatly appreciated :)
-Sky

Jarduino blink loop start with an button

Hi
i have got some problems..

i downloaded the JArduino file and installed all.
the blink example and the others work.

My problem is
I want to connect the blink example with an Java -GUI

I build the gui and a button. with this button i want to start the loop methode in the blink example (in my projekt calls Auto_Test_Folge)

but an error : change Auto_Test_Folge.loop() to an static methode.
if i change this it dont works

heare the Source code

GUI

         btnAutotest.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent arg0) {


                Auto_Test_Folge.loop();
                }
            });

Auto_test_Folge

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;
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.

This example code is in the public domain.
*/

public class Auto_Test_Folge extends JArduino {

public Auto_Test_Folge(String port) {
    super(port);
    loop();
}


public void setup() {
    // initialize the digital pin as an output.
    // Pin 13 has an LED connected on most Arduino boards:
    pinMode(DigitalPin.PIN_10, PinMode.OUTPUT);
    pinMode(DigitalPin.PIN_9, PinMode.OUTPUT);
    pinMode(DigitalPin.PIN_8, PinMode.OUTPUT);
    pinMode(DigitalPin.PIN_7, PinMode.OUTPUT);
    pinMode(DigitalPin.PIN_6, PinMode.OUTPUT);
    pinMode(DigitalPin.PIN_5, PinMode.OUTPUT);
    pinMode(DigitalPin.PIN_4, PinMode.OUTPUT);
    pinMode(DigitalPin.PIN_3, PinMode.OUTPUT);
    pinMode(DigitalPin.PIN_2, PinMode.OUTPUT);


}

public void loop() {
       // Schaltet nach der reihe die LEDs auf den Pins an
    digitalWrite(DigitalPin.PIN_10, DigitalState.HIGH);
    delay(1000); // Zeit Einstellung

    digitalWrite(DigitalPin.PIN_9, DigitalState.HIGH);
    delay(1000); // Zeit Einstellung

    digitalWrite(DigitalPin.PIN_8, DigitalState.HIGH);
    delay(1000); //Zeit Einstellung

    digitalWrite(DigitalPin.PIN_7, DigitalState.HIGH);
    delay(1000); //Zeit Einstellung

    digitalWrite(DigitalPin.PIN_6, DigitalState.HIGH);
    delay(1000); // Zeit Einstellung

    digitalWrite(DigitalPin.PIN_5, DigitalState.HIGH);
    delay(1000); // Zeit Einstellung

    digitalWrite(DigitalPin.PIN_4, DigitalState.HIGH);
    delay(1000); //Zeit Einstellung

    digitalWrite(DigitalPin.PIN_3, DigitalState.HIGH);
    delay(1000); // Zeit Einstellung

    digitalWrite(DigitalPin.PIN_2, DigitalState.HIGH);
    delay(1000); // Zeit Einstellung


    // Schalet LEDs wieder AUS 
    digitalWrite(DigitalPin.PIN_10, DigitalState.LOW);
    delay(1000); // Zeit Einstellung

    digitalWrite(DigitalPin.PIN_9, DigitalState.LOW);
    delay(1000); //Zeit Einstellung

    digitalWrite(DigitalPin.PIN_8, DigitalState.LOW);
    delay(1000); // Zeit Einstellung

    digitalWrite(DigitalPin.PIN_7, DigitalState.LOW);
    delay(1000); //Zeit Einstellung

    digitalWrite(DigitalPin.PIN_6, DigitalState.LOW);
    delay(1000); // Zeit Einstellung

    digitalWrite(DigitalPin.PIN_5, DigitalState.LOW);
    delay(1000); // Zeit Einstellung

    digitalWrite(DigitalPin.PIN_4, DigitalState.LOW);
    delay(1000); // Zeit Einstellung

    digitalWrite(DigitalPin.PIN_3, DigitalState.LOW);
    delay(1000); //Zeit Einstellung

    digitalWrite(DigitalPin.PIN_2, DigitalState.LOW);
    delay(1000); // Zeit Einstellung


    System.exit(0); //Beendet die Schleife und das Programm
}

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



}

initialize jArduino in firmware with specific baud - not supported

recommendation for supporting higher baud rate in firmware is via ...

void setup() {
_JArduino.init_JArduino(115200);
}

unfortunately uploading this to arduino produces with compile from source gives ...

exit status 1
no matching function for call to 'JArduino::init_JArduino(long int)'

Change com port

If you try to change the com port while running the advanced gui you only get the port that you are currently using in the list of available ports.

Error adding to eclipse project

I have added the library to my eclipse session but when I use code form the examples it says that there is nothing to import. no extra imports to resolve the errors. any help would be appreciated because I need this project finished at the end of the week.
Cole

Better GUI

The current GUI cant be displayed on my screen, my screen resolution width is 1366 and I can't see the whole GUI. It's not possible to drag the window larger then the full screen size in windows.

Android front end

Now that we have ethernet communication for JArduino, it would be nice to be able to remotely interact with the Arduino board from an Android device.

Provide feedback on GUI

The new GUI is definitely better than the old one :-) I think it would be nice to visualize some feeback. For example, if I execute a command which is supposed to set a pin to the HIGH value, this pin should be highlighted in a specific color to show that it is actually HIGH. This way we could use the advance GUI as a simulator and see what happens, even if no Arduino board is actually connected.

Freezing GUI

If you open the select com port dialog, or the change board dialog and the press the x in the corner the GUI freezes

Example: Compiling and Running general JArduino class

I'm trying to get JArduino to work but I'm having trouble running the examples. I apologize for not being able to figure this out on my own.

/*background:
--I have confirmed that my board is in good working order and serial communication using the native Arduino language works.
--I've never used Maven, so I don't understand how to create and run a Java class file from it.
--I'm using Ubuntu 14.04 and an UNO R3
*/

I successfully compiled and uploaded the JArduino firmware sketch to my board.

I have taken the following steps in order to compile and run the blink example:

  1. Sudo apt-get install maven2
  2. cd JArduino-0.1.7/jarduino.samples/
    (The readme says to do step 3 under JArduino, but the POM file is in this jarduino.samples directory so I'm guessing that's where it needed to be done)
  3. mvn clean install
  4. mvn exec:java -Dexec.mainClass="org.sintef.jarduino.examples.basic.Blink"

Considering that I can't even get the example to function I was wondering if someone could detail the steps to getting a general JArduino class to compile and run.

Thanks!

Always PIN 13 is set to High

Hi,

I have a peculiar problem in using JArduino to blink an LED. Below is the detailed description.

I downloaded the JArduino-0.1.7 distribution, copied the JArduino folder (located in the distribution in jarduino.samples/arduino) into /libraries/ folder of the Arduino IDE 0023

Opened Arduino IDE 0023 - >File -> Examples -> JArduino -> JArduino firmware and uploaded to the board using the normal Arduino procedure.(

Opened the sample programs in Eclipse IDE and ran Blink.java in org.sintef.jarduino.examples.basic package (i changed the DigitalPin.PIN_13 to DigitalPin.PIN_12 at all the places)

Program started and it asked to select the serial port to which Arduino was connected. It was COM7 and i selected it. The output printed in console was as below 👍
Load RxTx
Stable Library

Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7

BUT THE RESULT at ARDUINO END IS: (HERE IS WHERE THE PROBLEM)
Now the RX LED started blinking and the LED connected to PIN 13 was set to ON continuously and the LED connected to PIN 12 doesn't burn.

Note : My OS is windows 7 Home Premium 32 bit and i have the 32 bit rxtxSerial.dll in the bin folder of jre and RXTXcomm.jar in lib folder of jre
Arduino Board - Mega 2560

When im loading the arduino blink program to Arduino board with some modifications to to accept the serial input from Java thru the COM7 port, validate it and then blink, the LED connected to PIN 12 is blinking / burning properly.

Can you help to check out this?

Record actions on the Arduino side

It would be great to be able to record a sequence of actions (basic imperative programs, somehow) directly on the Arduino board. Then, we would have an autonomous, yet remotely reconfigurable, Arduino-based solution. The Java side would only send instructions once in a while to start/stop these composite actions and/or upload new "programs". These "programs" could run on demand (e.g. start(x) to explicitely start program x) or periodically every n seconds.

Using Servo

How can i control a servo attached with arduino using jarduino API ??

SAME PIN IS HIGH

hi im trying to turn different pins to high using the jArduino but every time its the PIN_0 that is Rx which is high or low, im using Arduino uno

Serial port selection

I would be nice to specify the serial port in the main of the samples, so that we do not have to modify the source code to run the samples. If no serial port is provided as argument for the main, it would be nice to open a GUI which lists all the available serial port, so that we can easily select the one which is connected to the Arduino board.

Byte Bug

The byte messages range from -127 to 127 and should be 0 - 255.
Fix fix fix

GUI Startup

The advanced GUI can't start up without an Arduino connected

timing an analog read ...

reading analog pins in jArduino appears, well, glacial ....
when i time 1000 reads with this

int counter = 0;
int startT = millis();
while (counter<1000) {
    sensorValue = analogRead(sensorPin);
    counter++;
}
int durT = millis() - startT;

Arduino via IDE reports 112ms
JArduino does it in, wait for it, ... 40970ms :-(

  • 41ms per read? WTF?

am i missing something? if true, this would relegate jArduino to a niche market, at best ...

Error uploading firmware: JArduino does not name a type

I'm trying to upload the firmware but I get always an error.
First time it told me "WConstants.h: no such file or directory", now I re-downloaded all the library and the error is this:

JArduinoFirmware:21: error: 'JArduino' does not name a type JArduinoFirmware.pde: In function 'void interrupt0()': JArduinoFirmware:24: error: '_JArduino' was not declared in this scope JArduinoFirmware.pde: In function 'void interrupt1()': JArduinoFirmware:28: error: '_JArduino' was not declared in this scope JArduinoFirmware.pde: In function 'void receivedigitalRead(uint8_t)': JArduinoFirmware:36: error: '_JArduino' was not declared in this scope JArduinoFirmware.pde: In function 'void receiveanalogRead(uint8_t)': JArduinoFirmware:46: error: '_JArduino' was not declared in this scope JArduinoFirmware.pde: In function 'void receiveping()': JArduinoFirmware:52: error: '_JArduino' was not declared in this scope JArduinoFirmware.pde: In function 'void receiveeeprom_read(uint16_t)': JArduinoFirmware:70: error: '_JArduino' was not declared in this scope JArduinoFirmware.pde: In function 'void receiveeeprom_sync_write(uint16_t, uint8_t)': JArduinoFirmware:74: error: '_JArduino' was not declared in this scope JArduinoFirmware.pde: In function 'void setup()': JArduinoFirmware:83: error: '_JArduino' was not declared in this scope JArduinoFirmware.pde: In function 'void loop()': JArduinoFirmware:89: error: '_JArduino' was not declared in this scope

I can't understand what's wrong..

I2C support?

I am planning to have my arduino in a great electronic powow with some analog devices over I2C or SPI. Has anyone taken a stab at doing this from JArduino. If not, what is the preferred I2C implementation for arduino, what about SPI? If I can get or make a shared library from them, I can build a java bridge using JNAerator. Has anyone taken a stab at this? Thanks,

firmware not functional when compiled from source

took me a while to tack down this issue ... osx 10.11.4

JArduino firmware upload fails with

/Users/lobsterman/Documents/C_Arduino/Arduino/libraries/JArduino/examples/JArduinoFirmware/JArduinoFirmware.pde: In function 'void setup()':
JArduinoFirmware:87: error: no matching function for call to 'JArduino::init_JArduino()'

this only happens if i clone

https://github.com/SINTEF-9012/JArduino.git

then cd into it and mvn clean install, then copy

~/Documents/workspace/JArduino/jarduino.core/src/main/arduino into my Arduino libraries folder

however, if i use the JArduinoFirmware that comes with the binary distribution JArduino-0.1.7b.zip, then it works just fine.

Own RXTX chooser implementation

I think that we should have our own JArduino Com port chooser panel.
Because then we could choose "Emulator" as one option in the dropdown list and start the advanced GUI as an emulator application wich can run without a connected arduino board.

Also, if the user press cancel the application should exit and move on to the next dialog.

Blink test doesn't seem to be working

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

Com port assignment error

If you open a instance of the Advanced GUI and select Emulator from the com port list, and after that goes into the menu to change the com port again, it dosn't list the available com ports. But if you open another instance of the GUI the available com ports are listed there.

It seems like com ports that have been listed inside the application can't be listed a second time inside the same application instance. Like they are opened and not closed somwhere.

define PIN schematics for different arduino models

I was wondering whether and, if so, how, JArduino handles the different pinouts for different arduino models. answers on this in past issues didn't seem conclusive. the rather rigid definition of pins in JArduino is great when it prevents us from using digital pins for analog writes, however, it also really limits our ability to use boards that have different pin characteristics. as far as i can tell only the uno is defined. the mega is the more useful board because it controls so many pins at a great price. i can change the pin definitions and recompile with maven but that will get mega working while it breaks the uno. i suspect separate pinout schematics for different models are the way to go but i dont see whether that has been tackled. any suggestions or advice on preferred design?

java.lang.IllegalArgumentException in line 42 in AbstractJArduino.java

line 42 in AbstractJArduino.java

serial = (JArduinoClientObserver) clazz.getConstructor(String.class).newInstance(ID,conf);

throws ...

java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.sintef.jarduino.AbstractJArduino.<init>(AbstractJArduino.java:42)
at org.sintef.jarduino.JArduino.<init>(JArduino.java:48)
at Blink_RH.<init>(Blink_RH.java:37)
at Blink_RH.main(Blink_RH.java:65)
Exception in thread "Thread-4" java.lang.NullPointerException
at org.sintef.jarduino.AbstractJArduino.pinMode(AbstractJArduino.java:64)
at Blink_RH.setup(Blink_RH.java:41)
at org.sintef.jarduino.JArduino$RemoteArduinoProcess.run(JArduino.java:132)

when i 'mvn clean install' Arduino/jarduino.core/pom.xml to recompile org.sintef.jarduino.core-0.1.7-SNAPSHOT,jar and replace the copy that is in the distribution for examples 0.1.7b, then run Blink.java or any other example.

Arduino Leonardo not supported

It seems JArduino does not support the Arduino Leonardo (which deals with serial connection in a slightly different way than the good old Arduino Uno).

Half of the output tension

When I run the blink example I get 2.5V output, but when I run the Arduino blink (not using JArduino) I get 5V output.

I tried using IDE versions 1.0 and 1.6.7

Jarduino witht Arduino Mega

Hey there
I want to use Jarduino with an Arduino Mega
because i need more digital output pin

but if i enter PIN_33 Output for example there is an error
because they dont know the variable PIN_33

Can i extends the source code and how can i do this

DigitalState.HIGH is not outputting correct value equivalent of (byte)127

creating a DigitalWriteMsg(DigitalPin pin, DigitalState value) with

digitalWrite(DigitalPin.PIN_11,DigitalState.HIGH);

is not turning on 5V - powering an led makes it only blink very dimly

in contrast using writing analog to PWM with

analogWrite(PWMPin.PWM_PIN_11,(byte)127)

makes it light up like a daemon. actually powering the PWMPin with (byte)1 gives the same brightness as DigitalState.HIGH.

i am thinking that writing DigitalState.HIGH to the DigitalPin ought to send (byte)127. several ways I can think of doing this ...

  1. obvious fix - defining DigitalState.HIGH with 127 (or 255 for that matter works as well although it runs into the signed/unsigned byte issue) instead of 1 in DigitalState.java
  2. creating a DigitalWriteMsg with value 127 when DigitalState.HIGH is provided

any prefs? obvious fix until then ... use PMWpins and output the (byte)127 to analogWrtite if you want the whole level of voltage on the pin

unable to run blink example

I've run the firmware example in Arduino on my uno board.
I've created the default project with the jars and libraries preconfigured in eclipse
I edited the blink example to output on pin 13.

when I run the example i get the following message on the console
"Load RxTx"
And I'm prompted to select the comport of my Arduino which for me is 10.
After selecting the comport, the Rx light blinks continuously and the LED on pin 13 remains lit indefinitely.

Please advise.
Thank you.

analogRead in JArduino reports incorrect range of values

same hardware setup (4 channel capacitance sensor OSEPP 4DTOUCH-01. channel 1 into analog pin A0) reports very different values and ranges when running AnalogInOutSerial.java or built-in example AnalogInOutSerial

Arduino example gives background values around 350, increasing to 900 when I touch sensor
JArduino example gives background values around 350, increasing to 385 when i touch sensor

i suspect another error related to unsigned byte vs java byte (8-bit signed) issue i had flagged earlier

in java
(byte)128 = (numeric) -128
(byte)255 = (numeric)-1
while (byte)0 - (byte)127 give numeric 0-127

No data source available

If you do several analogReads, there are no way to distinguish wich analog port the reading came from.
This should be possible to distinguish, because then it would be possible to provide vissual feedback in the advanced gui easily.

I want to be able to read source pin in this data object:

public final void receiveMessage(byte[] packet){
FixedSizePacket data = JArduinoProtocol.createMessageFromPacket(packet);
....
}

English should be the prefered (and only) language when writing messages on the console

When I am running the advanced GUI, I get some messages in the console, which are obviously written in Norwegian:
"Skal ha digital pin DigitalPin 13".

Even though this is no problem for me to understand, we should think about average users like Franck ;-)

This should be written in English. In addition, I would suggest using a proper log system.

Fatal Error, SIGSEGV

When I run anything, I get:

A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x0000000122dc412f, pid=85490, tid=6915

JRE version: Java(TM) SE Runtime Environment (8.0_65-b17) (build 1.8.0_65-b17)
Java VM: Java HotSpot(TM) 64-Bit Server VM (25.65-b01 mixed mode bsd-amd64 compressed oops)
Problematic frame:
C [librxtxSerial.jnilib+0x312f] Java_gnu_io_RXTXPort_interruptEventLoop+0x6b

Any ideas as to how to resolve this?

Bad RXTX library support

The bundled RXTX library gives thiss warning

Stable Library

Native lib Version = RXTX-2.2pre2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2pre2

Wrong pin mapping

DigitalPin.PIN_13 maps to DigitalPin.PIN_12 for some reason.
This means that you can not use the onboard LED to to test your applications.

Ubuntu 14.04/Uno R3 NoClassDefFoundError: gnu/io/PortInUseException

Hi, I am trying to incorporate JArduino into Eclipse on Ubuntu 14.04. I have successfully compiled and uploaded JArduino firmware onto my board. However upload running the Blink.java example I get this run-time error:
Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/PortInUseException
at Blink.main(Blink.java:42)
Caused by: java.lang.ClassNotFoundException: gnu.io.PortInUseException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
I have confirmed my board working using the native Arduino IDE. I have heard issues about Ubuntu 14.04 with the RXTX libraries of new port mappings and what not. Does anyone know to to fix the ports for JArduino? I have been stuck on this issue for several days now. Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.