
jzhao
USA
Asked
— Edited
Hi , I am programming roli in c#. I want roli speak specified words through the EZB4 soundboard. How can I do that? I used EZ_B.Speakjet.SpeakString(EZ_B.Digital.DigitalPortEnum, System.String), but no sound.
Code:
Hello dear eng ,
I use this part of code to make my jd robot speak but it gave me that exception
would you help me plz?
all i need is to make my jd speak a string I gave to it in vs
thanks for the fast replaying here is the complete snapshot of my error
I've made a plugin with one button say , when I click on that button , the jd robot will say what i right in the string but it gave me that exception
Make sure that ARC and EZ_B are both referenced. It looks like you are trying to build a plugin using the SDK but I might be wrong. I promise that I will try this out and let you know the results if nobody else gets back to you.
my references was given below & I'm sure they are right
also my ARC version is 30.5 which is the latest version & to check that I'm right if u have the sdk tutorial open c# then choose tutorial 61
& run it it will run but if u put this line of code the program will not work .
Code:
NullReference Exception is very clear, basically you have a NULL object e.g. instance and you try to call or reference a method on it.
looking to the picture:
the class field ezb is not created neither is pointing to a valid reference.
you have two options:
1) Do it like David mention in the above post, basically you create an EZB instance, connect and you hold it like in a standalone application (remember the other example)
2) You are building an ARC.plugin, you have access to the ARC.singleton class EZBManager inside this class you have an array of 5 EZBs representing the same 5 EZBs available in the ARC.Connection Control.
the 5 ezbs exists even if they are not connected.
Code:
if you prefer you can keep a reference and use the reference:
Code:
you can also connect the ezb instance, although i think is not possible to obtain the IP/Address specified in the Connection Box's TextBox
but if you are successful the ARC.Connection Box's Button will turn blue.
if you are building a ARC.plugin you should use the ARC.EZManager to keep the actions in sync with ARC.
Otherwise you will have 2 or more TCP connections to the EZB Controller.
"There's more than one way to skin a cat.", your code works plugin or not.
To be honest i had the idea that only one EZB could be connected (TCP) to the controller, but, it's possible to have 2 or more TCP connections and sending commands.
Although is not possible the EZB use the same TCP channel to initiate a communication and send data (async results), i'm making this deduction based in the WIFI firmare code.
ASFAIK all the EZB controller commands are (sync) initiated from the Host to the controller.
Original poster, please follow the tutorial that was created to avoid these circumstances.
If you want access to speaker, use the EZBManager.EZBs[0].....
The original poster wasn't the same person who asked the question today.
It would probably be best to start a new thread with the correct category so that it doesn't confuse those who are trying to help.
All good...
thanks for ur help
nw I could here my jd <3 thanks alot
thanks for being always here , replying on my questions