United Kingdom
Asked — Edited

Additional ARC Requests

Hi.

I have a couple of ideas for the EZ-Robot team to consider that I think would be a nice addition to ARC.

  1. When adjusting the volume slider from 100 on an EZ-B soundboard, say to about 60 for example, when a project is saved, closed, and reopened the volume goes back to the default 100. Would it be possable to add the ability to save the the changed volume level when a project is saved, so when it reopens the volume will still be set at 60 (or whatever value it was last set at when saved)?

  2. Would you consider adding a "When button is released" script command to the mobile interface control?

Many thanks.

Steve G. :)


ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

PRO
Synthiam
#2  
  1. The sound volume will not be saved with the project. Use the SetVolume() in the Connection control to set the volume. This is due to logistics behind each audio control having a volume setting of it's own.

  2. I can add a button released

#3  

For saving the volume, there are some options now, that will be better when DJ finishes cloud variable storage.

To save the volume, you would have a script like this running:


:loop
waitforchange(getvolume())
$volume = getvolume()
:do something to save your volume somewhere
goto(loop)

Your init script would have a section like this :


:do something to get the volume into the $volume variable
setvolume($volume)

When EZ Cloud Variables are implemented, the "do something" lines would be replaced with pushvar() and pullvar() statements.

You can do something locally with the filewrite and fileread and other file manipulation commands, but they are really designed for adding lines to a file, not a single data element so the scripting would be fairly complex to keep the file from growing too large and to make sure you are reading the latest.

If you are handy with SQL Server, @d.cochran wrote EZ-DB to push data into and retreive data from a database: https://synthiam.com/Community/Questions/5867

@Luis Vazquez is also working on a cloud variable storage app: https://synthiam.com/Community/Questions/6834

@rich also has something (I think running Python) that manages saving variables.

There are probably other ways I haven't seen or thought of, but this can get you started. (clearly, when pullvar and pushvar work, they will be the easiest, but you will need Internet access from your ARC).

Alan

United Kingdom
#4  

I use a overly complicated PHP and MySQL set up for saving variables however it's not really required and of very little use to anyone else. The better plan would be to save locally.

Taking Alan's code a little further...


:loop
waitforchange(getvolume())
$volume = getvolume()
IF(FileExists("c:\temp\volume.txt") = 1)
  FileDelete("c:\temp\volume.txt")
EndIf
FileWrite("c:\temp\volume.txt", $volume)
goto(loop)

The init script


IF(FileExists("c:\temp\volume.txt") = 1)
  $volume = FileReadAll("c:\temp\volume.txt")
  setvolume($volume)
  FileReadClose("c:\temp\volume.txt")
EndIf

Note: This hasn't been checked in ARC, some tweaks may be needed

#5  

Should we put a little sleep in the loop so it isn't writing a new file for every increment of volume as we adjust the slider up and down? I don't know how fast waitforchange will react.

Alan

United Kingdom
#6  

@DJ Sures.

Thanks for that. It's much appreciated and will come in very handy. Top man. :D :D

United Kingdom
#7  

Here's another thought I had. As well as the "When button is released" script command of the mobile control I mentioned, I have another ARC idea would be a great addition. How about a small control box which visually displays the EZ-B's signal strength?

Much like the signal strength bars you would find on a mobile/cell phone or laptop, it would be useful when controlling a robot, or for autonomous movement with a script, if a robot detects that the WiFi signal drops to one bar for example, it would stop, turn 180, and head back to where the signal was stronger.

What do you think? Good/bad idea, or already do'able with EZ Script?

#9  

That would be very useful for network troubleshooting, as well as like you suggest, having the robot turn around when it starts to lose signal.

Alan

#10  

@Alan, @Steve G... yes a good idea indeed about having the ability to read wifi signal strength... However, to get your robot to do something like stop or turn around would probably be best done via your own scripting... You would set up a variable that has the wifi signal strength read into it ( ongoing)... When it's value drops below a predetermined level your code could have the robot stop or turn around or report via an announcement or chime or whatever that the robot is about to lose wifi signal...

United Kingdom
#11  

@Richard.

My thoughts exactly about doing our own scripts to make the robot stop, turn ect, or with a soundboard file or SayEZB() audible alarm if needed as you suggested. :)