Rockpool - Searching for Flotilla takes 10 minutes or more

When I run Rockpool on my Pi 2B running Jessie I get the “Pick Your Dock” screen with the message “Searching for Flotilla…”. There’s a progress bar going up super slowly. Do I need to wait for this to go all the way up before Rockpool will work? Should it take upwards of 10 minutes for this process to complete? If so what the heck is it doing?

I have had my Flotilla working once. I waited for the bar to fill before pressing connect. I’ve also had it NOT work after waiting for the bar to fill up. So honestly I’m not sure how this is supposed to work.

Also if I go to flotil.la/cookbook I don’t see the cookbook. I see this same “Pick Your Dock” screen with what looks like the cookbook behind it. Is that right? There only seem to be 2 projects in the cookbook and I can’t see how to get to them.

Ok time to answer my own question in the hope that others as dense as me might find this and solve their problem.

The searching bar is searching the network for Flotilla serving computers. I’ve never seen this find anything so I don’t know if it actually works. But if you’re running the browser on the same computer that the flotilla is connected to then you can just click the Connect button right away to connect to your local Flotilla server on the loopback address 127.0.0.1.

The working/not working thing just seems like a “reboot it and it should be ok” thing.

I don’t have an answer on the cookbook thing yet. I’m still experimenting. This thing certainly runs a LOT faster if I connect from a browser on my Mac.

Next question - is there a Flotilla Python module yet and if so where can I find it and the API?

That’s right, if connecting to the localhost you do not need to wait for network scanning, see the getting started PDF pinned at the top of this section.

To install the (WIP) Python API, follow the instructions at the botton of:
http://flotil.la/start

Yeah the problem with the getting started PDF is that I was trying to read it on my Pi2 and the browser wouldn’t render the PDF. I kept clicking around trying to find where to download it. Was only later when I went back on my Mac that I realised it was there in the page. The Pi browser didn’t show it.

1 Like

In short; no, it really doesn’t. It’s a terrible, awful implementation that naively scans a bunch of common subnets (probably about a thousand IP addresses) waiting for a Flotilla Daemon to respond.

This has been totally scrapped in the upcoming, updated version of Rockpool in favour of an intelligent discovery system that, as long as you have an internet connection, just works.

For now, if you know the IP address of your Pi you can just type that in. Or you can switch to the pre-release Flotilla.

Honestly I’m surprised you’re trying to do that at all. It would certainly be a nice feature to auto discover all the Flotilla units on the LAN but far from essential. I like what’s in Rockpool so far. Now that I’ve realised it’s MUCH faster than it seems when using it from within the Pi Browser I can see that this is going to be a lot of fun. I’ve spent most of this evening wiring up all the modules to each other in various random combinations and playing with the converters. I plan to take it along to my Code Clubs so I’ve been putting together a little travelling kit. I’ll use the Pi as a Rockpool server and use a school computer to talk to it probably.

I’m sure you have more converters in mind but it would be nice to be able to change the period of the sine wave. And possibly also to have a Cosine wave.

Also a converter that splits out a single signal to multiple outputs would be nice. I realise you can get this effect now by storing a value into a variable and then making multiple lines that use that variable. But you have the metaphor going the other way already.

:D

I had “Sine Wave” implemented as a converter in ShipShape for experimentation. The value you passed into the converter controlled the frequency of the sine wave. It was quite effective! A two-input converter would also be able to control frequency and amplitude. We’re trying not to add anything new until the core experience is tidied up for the moment, but then I’ll try and find a way to make extras like this available to folks who want to use them- without cluttering it all!

Rockpool is implemented in a way that makes it dangerously easy to add any 1input->1output or 2input->1output converter you might think of. For example; the entire code for frequency controlled sine wave is:

sine: function(){
    this.name = "Sine Wave"
    this.category = rockpool.category.modify
    this.icon = "sine"
    this.frequency = 0;
    this.phase = 0.0;
    this.convert = function (new_frequency) { 
        var time = rockpool.time;
        if( new_frequency != this.frequency ){
            var c = (time * this.frequency + this.phase) % (2.0 * Math.PI);
            var n = (time * new_frequency) % (2.0 * Math.PI);
            this.phase = c - n;
            this.frequency = new_frequency;
        }
        return (Math.sin(time * this.frequency + this.phase) + 1.0) / 2.0;
    }   
}

Most of which is mathematical nonsense to keep the sine wave in phase when the frequency is changed.

One input, two output “splitting” converters is a heck of a challenge; it’s complicated in so many ways that it’s something I have to force myself not to think about- or I’ll lose a week trying to make it work!

Ahhh a sine wave converter is an excellent idea. A value passed into a Sine converter would let me do what I want. I still think a Cosine wave would be useful. Combining a Sine and a Cosine wave would allow me to draw circles or rotate through ALL the colours with the rainbow module. I’ll see if I can write myself one using the code you showed (thanks for that). I think others might appreciate it too.

Tonight is my night to try Flotilla with Python.