Zoomer, Sit down????

ilan

Expert
Licensed User
Longtime User
hi,

i bought my little kids a new toy called Zoomer.
It is a robot dog that has some infrared sensors and a microphone. he recognize voice commands and do different funny stuff.

unfortunately he does not understand me well. i am telling him: Zoomer, sit down. and he goes to pee

and my kids don't really speak english, they know few words from dora and diego but not enough to tell this stupid dog to sit down or shake a paw... and even if they repeat what i said he still goes to pee. (maybe i charged him to much?! )

so i decided to make a simple b4i app (on my ipad) that will talk to zoomer and wallah, it worked via TTS

here is the code if someone will have similar issues with dogs as i did.

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public App As Application
    Public NavControl As NavigationController
    Private Page1 As Page
    Dim tts1 As TTS
End Sub

Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.Title = "Page 1"
    Page1.RootPanel.Color = Colors.White
    NavControl.ShowPage(Page1)
    NavControl.ToolBarVisible = False
    NavControl.NavigationBarVisible = False
    Page1.RootPanel.LoadLayout("main")

    tts1.Initialize("tts1")
    tts1.SetLanguage("en-US")
    tts1.Pitch = 1
    tts1.SpeechRate = tts1.MIN_SPEECH_RATE
End Sub

Private Sub Page1_Resize(Width As Int, Height As Int)
End Sub

Private Sub Application_Background
End Sub

Sub btn_Click
    Dim btnsender As Button = Sender
    Dim speech As String = btnsender.Tag
    tts1.Speak(speech,True)
End Sub

The code is very simple, every button.tag is filled with the command that zoomer understand, like:
btn1.tag = "Zoomer, go to sleep.", btn2.tag = "Zoomer, follow me.",...

my kids really enjoy playing with zoomer, fun toy but without b4i a bunch of plastic...

 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…