#1

Hi.

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

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. Smile

#2

+1 to both ideas.

Alan

#3

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

#4

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:

Code:


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



Your init script would have a section like this
:

Code:


: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: http://www.ez-robot.com/Community/Forum/Thread?threadId=5867

@Luis Vazquez is also working on a cloud variable storage app:
http://www.ez-robot.com/Community/Forum/Thread?threadId=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 EZ-Builder).

Alan

#5

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...

Code:


: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

Code:


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 EZ-Builder, some tweaks may be needed

#6

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

#7

@DJ Sures.

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

#8

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 EZ Builder 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

I like it. Winky

#10

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