Jump to content


Photo

How to read 1Wire with Java?


  • Please log in to reply
2 replies to this topic

#1 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 03:11 AM

Hi Guys,

I am trying to port my Code in C++/Arduino to Java/Pcduino and I am struggling to read from the serial port.

On my previous Arduino code I was using the OneWire library and two Dallas Temperature Sensors (DS18B20) connected to Digital Pin 9. 
In addition, I got the OneWire java library working with RXTX. (http://www.maximinte...e/1wire_api.cfm)


The first problem is that the OneWire library expects a serial port, not a digital Pin as I was using in the Arduino. 
Is it possible to map digital pin to a serial port in such a way it would be available in the /dev/tty* in Linux?

If not, do you recommend any other way of reading the temperature with the OneWire protocol in Java?

Thanks,
Franklin



#2 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 03:11 AM

It should be similar to: http://learn.linkspr...t11-on-pcduino/
modify_inline.gif
 
 


#3 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 03:11 AM

Not quite there...






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users