-
Notifications
You must be signed in to change notification settings - Fork 0
Any sample client side code? #2
Comments
I don't know of any. The initialisation code is not part of RCSwitchFirmata but ConfigurableFirmata; so to track down your problem, you could start using ConfigurableFirmata and update to RCSwitchFirmata when communication works. Testing was done with the perl-firmata client, so whatever needs to be done on initialization should be available there. |
The perl-firmata is for connec to firmata. Can we have a simple code to show how to pass message to RCSwitchFirmata? For example, in the document you describe what need send to firmataAll values described here are 8-bit-based (i.e., after unpacking from 7-bit sysex transfer format). A common pattern of all queries is that they echo the query message as response. This pattern allows for detection of unsupported or wrong messages. Message format
|
Could you point out how do I link to the result from the report in RCInputFirmata? void RCInputFirmata::report() |
As explained in #3, received rf signals will be reported automatically to your host whenever they arrive. |
Please consider that only a few Firmata client libraries currently support ConfigurableFirmata. It seems to me that you try to use ConfigurableFirmata without such a client, which means you're about to develop such a client by yourself. I cannot give you detailed information on this because I never created a firmata client; I used FHEM instead. FHEM is a perl-based smart home application that integrates perl-firmata. Most of the initialization and configuration code is part of perl-firmata and FHEM. In FHEM, the following configuration represents your code above:
|
Maybe this trace log is helpful for you, it shows all messages between FHEM and the arduino at initialization time:
|
@wyx2000 Did you work it out? If you've been successful, I'd appreciate if you could post some sample code so that other users may participate from your work. |
Yes, I can post what I found out, will do that tomorrow |
Ok, here is the code I am using now.
To receive message from arduino side,
|
Thanks for sharing, @wyx2000. Is it OK for you when I copy this into the documentation? One remark on your markdown syntax: single words may formatted as code using a single backtick (`), code blocks need three backticks (```) before and after or an indentation of at least four spaces. Please close this issue when you think that your problem is solved. |
Sure, you can copy to document |
I have a question on the following code of
Is it correct that the array |
Yes. The code is from my working application.
That is one of the thing that caught me, I thought the firmata.js should handle that.
So it is the firmata protocal, all bytes big than 0x80 are commands, dynamic data bytes need be in 7 bits.
|
Yes, looks good |
I started with RCSwitchFirmata, could not get it work. I use a client code with firmata lib like below:
neither ready above fires. But if I try it with the StandardFirmata code, it works fine.
Any idea? Is there special client side code for RCSwitchFirmata?
Thanks
The text was updated successfully, but these errors were encountered: