Forums » Support

Back To Topics

Programable Firmware

    • 87 posts
    December 3, 2014 11:15 AM CET

    Thanks!

    Very, very happy. Great LEGO animatronics ideas for 2015. My Raspberry Pi is feeling jealous.

    • 178 posts
    December 3, 2014 9:22 AM CET

    Hello folks! I'm working on something very similar to Jorge's idea, so yes, this will be possible.

    • 87 posts
    December 2, 2014 5:39 PM CET

    @Tamás Fábián: will you please be kind to me and Christian and tells us if future Sbrick firmware could handle that? I believe there are several ways, the easiest/lazyest perhaps mine: giving a list of n values to send to each port (simillar to LEGO ControlCenter from the 90's) and a step length... so with 16 bytes for each port it woul be neeeded 64 bytes in the SBrick to store the 4 sequences + 1 byte to store the step length.

    We are all impatient for the 2.0 version :)

  • December 2, 2014 5:15 PM CET

    @jorge Yes, that is what I wanted to do. With four ports, and a bit slower, but basically thats it.

    If it can be done with a Raspberry Pi, it is OK, but my original question was whether this is possible with the SBricks programmable firmware.

    • 87 posts
    November 30, 2014 11:47 AM CET

    @Christian Treczoks: I believe you want something like this but with a better transition from led to led

    https://www.youtube.com/watch?v=mY8iqgo0zvk

    I'm using just 3 PF Lights because my Beta SBrick never worked with the 4 channels. I'm sending to each port square values (1,4,9...225,256, 225... 9,4,1) but not doing the transition you want.

    I'm not using delays at all because the way I talk to SBrick uses a python call to an external command (gatttool from BlueZ Bluetooth stack for Linux/Android). That's very unefficient and slow but I didn't yet find a python library for Bluetooth Low Energy and SBrick still misses an API/SDK/whatever.

    This python script was running on my Ubuntu laptop, it also works in Mindstorms EV3 with ev3dev. I'll try later with a Raspberry with Raspbian, not sure if BlueZ 5 is already included in Raspbian.

    -- edit --

    Now with a better transiction effect

    http://youtu.be/c-3Y2JVRM44


    This post was edited by Jorge Pereira at November 30, 2014 6:48 PM CET
    • 87 posts
    November 28, 2014 7:16 PM CET

    I believe it will be possible, with a better firmware. Al least something very close to your request.

    Except the client app for iOS and Android there is nothing at all. But the same python scripts I've been using in Ubuntu and ev3dev should also work with Raspbian so you could write a loop in python to do want you want (those 0.25 ~ 0.50 Hz  frequencies are low enough to use time.sleep to control the timings - perhaps even just a shell script could do it, no python at all).

    In fact... I have 4 PF LEDs at home... just give me a day or two, OK?

  • November 28, 2014 6:36 PM CET

    [blockquote]Jorge Pereira said:

    For smaller and cheaper uses a Raspberry Pi is better - just need to add a USB BT 4.0 dongle, a microSD card and a wall charger with USB output.

    [/blockquote]

    Oh, there is an SBrick control software or library for the Raspberry, too?

    But apart from that, is what I asked for possible with the SBrick?


    This post was edited by Christian Treczoks at November 28, 2014 6:37 PM CET
    • 87 posts
    November 28, 2014 1:00 PM CET

    [blockquote]Christian Treczoks said:

    Would it be possible to make the SBrick do this on its own, with the bluetooth controller just used to switch this program on and off? It would be a waste to have a smartphone running an application just to keep the lighthouses' light circling all day...

    [/blockquote]

    You might consider using a spare laptop with BT 4.0 (or add a USB BT 4.0 dongle).

    For smaller and cheaper uses a Raspberry Pi is better - just need to add a USB BT 4.0 dongle, a microSD card and a wall charger with USB output.

    Or if you already have a LEGO Mindstorms EV3, just add a USB BT 4.0 dongle and a microSD card with ev3dev for an all-LEGO solution.

  • November 28, 2014 12:18 PM CET

    For one project I would need four PF outputs producing changing PWM levels for LEDs. On a higher level, I need the LEDs' level to be in four waves of identical frequency in the range of .25 to .50Hz and a 90° phase shift. The waveform is that only one LED is at full power, then dims while the next rises, simulating a light moving from one LED to the other. Actually, I'm using four PF LED pairs, so I will have two spots moving around a circle of eight LEDs.

    Would it be possible to make the SBrick do this on its own, with the bluetooth controller just used to switch this program on and off? It would be a waste to have a smartphone running an application just to keep the lighthouses' light circling all day...

    • 5 posts
    October 16, 2014 4:56 PM CEST
    Ok thank you. I am working all the kinks out of my model. And hopefully have the funds to purchase two SBricks for it as well.
    • 178 posts
    October 15, 2014 4:16 PM CEST

    ...and I need to file a bug report about lists not appearing correctly :D

    • 178 posts
    October 15, 2014 4:15 PM CEST

    Hello Nicholas,

    This feature is heavily work-in-progress, so we can't demonstrate it now. Our highest priority is to deliver the app with basic function AND the profile designer to all platforms.

    Automation features will come after that.

    I can tell already that programming the SBrick will be nothing like Mindstorms, because SBrick lacks inputs (no sensors are available... yet ;) ), and the computation / storage capabilities of the hardware are severely limited.

    Under "programming" we mean the following:

    • Fine tuning operational paramters, like connection interval, latency, timeout, watchdog frequency, (maybe-maybe) PWM frequency, etc.
    • Building custom profiles with advanced actions. Those familiar with functional reactive programming (frp) will probably like this :)
    • Setting up automated one shot / repeated actions, storing them in the brick, and playing them back on an event (like user event sent from the phone, or connection events)

    The details are not fixed yet, so consider the previous list as a teaser. We have a large list of features, and they need to be prioritized properly so we can get the best value for the work done on the SBrick. "Value" of course means what the community considers valuable, and we're facing demands for certain features we did not consider at the time of the Kickstarter campaign.

    Actually I'm about to post one right now: "how to use SBrick with an Android phone without BLE support" ;)

     

    • 5 posts
    October 14, 2014 2:58 PM CEST

    Hello, I have built a custom creation and was interested in the Sbrick's Programable Firmware. Can someone put a video up demonstrating this. How complex the tasks be? And are they repeatable? How does this come pare to the Lego Mindstorm?