
Hi everyone.
I have a couple of questions regarding the start up of my EZ-B v4 that I have installed in to my bot today, and hope someone may be able to help answer.
Q1.) Is there a way to have the EZ-B4 auto connect to my computer when the v4 starts up? E.g, the computer is already on and ARC already running. I power up the EZ-B4 and it automatically connects to ARC without having to manually "scan" and "connect". (Via client mode).
Reason: I hooked up a remote control power switch to my v4 (like a cars remote central locking relay) which works great, and to have the v4 auto connect to ARC and control my bot straight away I thought would be a nice touch.
Q2.) Is it possible to have a custom verbal message, either using speech synthesis script, pandorabots control or prerecorded MP3 file, to automatically say something like, "Hello. How are you today?" or "My systems are now online. Welcome." ect, after the default "I am now connected to your network" phrase when I power up the v4?
Reason: Just because I think it would be a cool feature.
Cheers,
Steve.
If you set up your router to always give your EZ-B the same IP address, you won't need to scan, just connect, which ARC can do at start-up.
I am answering from my phone, so I'll need to look later if no one else verifies first, but I am pretty sure that connect is a script action, so you could set up a script that keeps trying to connect and sleeps for a while if it fails, theb tries again. Would also need to stop trying once successful and detect the disconnect to start trying again.
Answer to the second answer is yes. Either sayezb script or mp3 could be scripted to run on connect, so you start your ez-b, ARC running the connect script detects it, and executes your startup scriot.
If I am wrong and conect is not a scriptable command, then you could use auto-hotkey scripts to do something similar.
Alan
Q2 - Yes. There is a gear icon on the connect dialog box. Click it and you can enter a script. I did something like this... sleep(1000) say ezb(" welcome, please wait calibrations in process" code code code code say ezb("Calibrations complete, how may I assist you")
I am out of town and not on my computer so this is a very basic example and may not be completely correct. Where I have written "code" is where I essentially sent serial commands to my 3 hbridges. Hope this helps somewhat.
Q1- I would also like to know the answer to this and how it would work. I suspect it would be in the same init scripting area.
Alan have you received your ezb4? Any update to router options?
I haven't received it yet. I am expecting Roli's to start shipping next week so it should be soon (I have a Roli and a dev kit coming in one order).
So, back on topic, I got curious about this and booted up the laptop.
You can check if you are connected using script function:
IsConnected( boardIndex ) Returns TRUE or FALSE if the specified EZ-B board index is connected Example: $status = IsConnected(0)
You can connect with ControlCommand using one of the Connect parameters (you can connect individual boards or all at once).
You can use WaitForChange for IsConnected to change to false, and then starts looping through ControlCommand connect with a sleep before trying again, and stops executing when IsConnected returns true.
Then you use the gear icon next to the connection that Chris described above to execute whatever script you want on startup of the robot (or just execute the commands in the same script that is detecting your connection and execute them when IsConnected changes from false to true).
So, yes, you can absolutely do both things you asked.
Alan
@thetechguru.
Thanks for your reply. Very helpful. That's great to hear that I can do what I asked. I'm coming to the end of the build part of my bot, and will give the start up commands a try soon. I'm pretty new to using the EZ-B and still have a lot of learning to do, but hopefully I will be able to work out what I need to do to get the functions I would like my bot to have working. Thanks again.
@kamaroman68.
Thank you for your reply also. It's good to hear that someone else has done something similar to what I asked, and your post was helpful too. Thanks.
Steve.
You will need a connection script (here's an old one for connecting all 5 EZ-Bs, it may use old syntax as it's an old script);
This must be an EZ-Script control not part of script manager. Name it "Auto Connect".
Now, use the shortcut creator in ARC to create a shortcut for the project. The creator will ask if you want to run a script on load, use the above "Auto Connect" script.
Now when you open the shortcut it will load ARC, load your project and run the specified script.
You can use the shortcut in your PCs startup so when booted it will open ARC and connect. If the EZ-B is in AP mode set the wifi to auto connect to the EZ-B WiFi. If client mode make sure you have a fixed IP.
You could go one step further. Set up EventGhost. Add a macro which pings the EZ-B IP. If it's "alive" have it run the shortcut. This will automate the entire process so all you need to do is hit the switch on the EZ-B.
@Rich.
Thanks for the reply. Your instructions for the set up will come in very useful indeed. Much appreciated.
Only me. I'm just getting back in to the swing of things with my build after unexpectedly spending a few days in hospital.
Anyway, I have been having a good play around with my EZ-B today and pleased to say that I got the verbal start up script working just the way I wanted, so I just wanted to say thanks again to Alan and Chris.
But I am still having a little trouble with the auto connect. I am using Virgin media's superhub 2 router and I can't figure out how to give my EZ-B a fixed IP address. I will be the first to admit that I'm really not that good with networking, so any more help anyone can offer regarding this would be a great help.
Thanks, Steve.