kurbatov / firmata4j

Firmata client written in Java.
MIT License
87 stars 45 forks source link

Onewire function is needed #16

Open firefly917 opened 7 years ago

firefly917 commented 7 years ago

Thanks for your contribution of so great project. Most functions of the project is enough to control the Arduino device, and it work well. Now, I need use the temperature sensor of DS18B20 which is working on the protocol of Onewire. How can I implements this function? Would you add this function into this project?

kurbatov commented 7 years ago

I have doubts on whether it is feasible to support Onewire in firmata4j level at all.

Onwire's timings are too short for serial communication. Maybe newest Firmata offers something to make it possible but I guess that Onewire should be supported on firmware level i.e. if you tinker on standart Firmata implementation before uploading it to your device.

However if you can find such Onewire support in other Firmata client libraries in other languages, we could probably translate it to Java and have the same functionality in firmata4j.

Ср, 15 февр. 2017 г. в 2:42, firefly917 notifications@github.com:

Thanks for your contribution of so great project. Most functions of the project is enough to control the Arduino device, and it work well. Now, I need use the temperature sensor of DS18B20 which is working on the protocol of Onewire. How can I implements this function? Would you add this function into this project?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kurbatov/firmata4j/issues/16, or mute the thread https://github.com/notifications/unsubscribe-auth/AIaXWaGC7h76Fhq1KbgR2QCDKtm0QqEsks5rclgTgaJpZM4MBNjV .

firefly917 commented 7 years ago

Thanks for your attention. There is an implementation of Onewire at "http://npm.taobao.org/package/firmata-electron". It is implemented by Node.js. But I didn't try the library.

kurbatov commented 7 years ago

I'll take a look at this when I have some spare time for firmata4j.

If you want this feature rather sooner, you can try implementing it on your own. Firmata supports Onewire via sysex messages which are supported by firmata4j. You can see the format of Onewire messages as Firmata defines those here: https://github.com/firmata/protocol/blob/master/onewire.md

Ср, 15 февр. 2017 г. в 11:04, firefly917 notifications@github.com:

Thanks for your attention. There is an implementation of Onewire at " http://npm.taobao.org/package/firmata-electron". It is implemented by Node.js. But I didn't try the library.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/kurbatov/firmata4j/issues/16#issuecomment-279968365, or mute the thread https://github.com/notifications/unsubscribe-auth/AIaXWVyf0aPXz-f5ldNgrW2f9yG5N6wzks5rcs2cgaJpZM4MBNjV .

firefly917 commented 7 years ago

Thanks!

mchandia commented 6 years ago

Hello, first of all many thanks for your contribution. Really appreciated :) I'm implementing a onewire library (at least trying) but when I first set the mode for a pin as ONEWIRE in the firmata client application it says "Pin 6 doesn't support mode ONWIRE". Why could I be doing wrong?, does the standard Firmata (loaded in arduino) support onewire ?

kurbatov commented 6 years ago

Hi Mario,

I have read the documentation on OneWire and it sais that ConfigurableFirmata got OneWire enabled by default. So it may be worth trying it with ConfigurableFirmata.

As for StandardFirmata I'm not sure whether it supports OneWire by default because I cannot find it in the file that describes capabilities of different boards.

mchandia commented 6 years ago

Hello Oleg,

Thank you very much, I loaded ConfigurableFirmata into Arduino and it supports OneWire, so it works now :).

Mario

firefly917 commented 6 years ago

@kurbatov Thanks very much!

willishf commented 1 year ago

Looking to see if anyone put Java client code together to support OneWire?