Example Projects
Workshops
Announcements
Actuators
Connections
Power
Sensors
Traces

Circuits and Code Wireless

Meet the Materials
Conductive Materials
Non-Conductive Materials
Tools
Techniques
Thinking Out Loud
Circuits and Code
  • Arduino Overview
  • Arduino as Bluetooth HID
  • ATtiny: 7-Segment Display
  • ATtiny: Capacitive Sensing
  • ATtiny: Programming
  • ATtiny Serial & Wireless Boards!
  • ATtiny: Soft Serial
  • ATtiny: Sound
  • ATtiny: Soft Fade
  • Bits and Bytes Binary numbers
  • Multiplexed Matrix
  • Controlling EL Panel and EL Wire
  • EL panel/wire inverter hack
  • EMF amplifier
  • Heat Controlling Circuit
  • LED with Light Sensor
  • Lilypad XBee Shield
  • My First Arduino Connection Check
  • pressure matrix code + circuit
  • Pull-up Resistors
  • Rabbit Control Client on Bela
  • RabbitControl on Bela
  • RGB Colour Fade
  • simple heat circuit
  • Solar Powered Motor Circuit
  • Sound Amplifying Circuits
  • Graphing and Drawing Sensor Values
  • Teensy as HID Device
  • Transistor Switch
  • Volume Detection
  • Visualization: 2x2 Matrix
  • Visualization: Drawing
  • Visualization: Graph
  • Visualization: Pressure Sensor Matrix
  • Visualization: Touchpad
  • Voltage Divider
  • Voltage Divider with Arduino
  • What is Variables?
  • Support the creation of content on this website through PATREON!
  • About
  • E-Textile Events
  • E-Textile Spaces
  • Newsletter
  • Print & Publications
  • E-Textile Shopping

  • SEARCH
    Content by Mika Satomi and Hannah Perner-Wilson
    E-Textile Tailor Shop by KOBAKANT
    The following institutions have funded our research and supported our work:

    Since 2020, Hannah is guest professor of the Spiel&&Objekt Master's program at the University of Performing Arts Ernst Busch in Berlin

    From 2013-2015 Mika was a guest professor at the eLab at Kunsthochschule Berlin-Weissensee

    From July - December 2013 Hannah was a researcher at the UdK's Design Research Lab

    From 2010-2012 Mika was a guest researcher in the Smart Textiles Design Lab at The Swedish School of Textiles

    From 2009 - 2011 Hannah was a graduate student in the MIT Media Lab's High-Low Tech research group led by Leah Buechley


    In 2009 Hannah and Mika were both research fellows at the Distance Lab


    Between 2003 - 2009 Hannah and Mika were both students at Interface Cultures
    We support the Open Source Hardware movement. All our own designs published on this website are released under the Free Cultural Works definition
    Circuits and Code

    RabbitControl on Bela

    Bela Mini Board (https://bela.io/) is a super nice tool to read textile sensors, and generate sound on board. Bela can run Pure Data, and this is becoming my favorite toolset. One problem of working with Bela is that it does not have monitor, so you can not easily see in realtime what value your sensor is reading, or to tweak the adjustment. For this, RabbitControl protocol (https://rabbitcontrol.cc/) become very handy.

    In this post, I follow the steps of how to install Rabbit Control for PD on you computer, and to install RabbitControl for PD on Bela, then how to use them. Overall, Rabbit Control resources are found here >> https://github.com/rabbitControl/rcp-flext

    If you are new to Bela platform and want to know how to start using them, Bela has a very nice tutorials >> https://learn.bela.io/get-started-guide/

    Open Pure Data on your computer. I am using Vanilla. Go to help/find externals. in the find externals window, type “RabbitControl” and it should find the latest version. click to install.

    Now you have to set the path to the installed externals. Go to Pd/Preferences/path… then add the path to the installed files. If you did not change the default, it is in your Document/Pd/externals/RabbitControl

    Because RabbitControl is a library, you will need to add it to the startup so the library is loaded when the PD starts up. Go to preference/Startup…

    when the start up window opens, press “new” and add “rcp”. rcp is a short name of “rabbit control protocol”, and this is how the library is named. Don’t ask why;) when rcp is added to startup, you can restart the PD.

    When you restart the PD, you will see the Rabbit control logo on the PD window. This indicates that RCP library is successfully loaded. Now you are ready to go.

    Open a new patch and make an object (cmd 1) “rcp.server”. If the installation is successful, it should create the object. If not, it shows the object with dotted line. if this happens, make sure that your externals path is correct. If you right click the rcp.server object and open help file, it explains what you can do with them. In this example, I open port 10000 and expose one value called sensor1 that has minimum0 and max1 range.

    now, I want to run this on Bela, so I add few more object to set up the server and activate expose value with [loadbang], read one sensor and expose that value. Add the declare object [declare -lib rcp] so the Bela can find the rcp library. Save the patch as _main.pd

    now we go to Bela side. First, we download the RabbitControl PD externals for Bela. Go to https://github.com/rabbitControl/rcp-flext scroll down to “Prebuilt Binaries” for Bela board and download the zip file. unzip the file somewhere in your computer.

    Open terminal window, and ssh to Bela. Make sure that your Bela is connected via USB and it is already booted. Type in to the terminal window (if you are windows user, the address maybe 192.168.6.2, or you can also use the address root@bela.local)

    $ ssh root@192.168.7.2

    Then you will see that you enter the Bela

    now we change directly to Bela/projects. Type in:

    #  cd Bela/projects 

    now we make a new directory called “pd-externals” the name of this directory must be exactly this, as it is set internally that it automatically look into this name for externals. Type in

    # mkdir pd-externals

    This should have made pd-externals folder in your projects directly. you can type “ls” and see what is in the projects directly. Do you see “pd-externals”?

    Now, open browser window (firefox, chrome… whatever you like) on your computer. type in address bela.local (or 192.168.7.2). It should open Bela control window.

    from “your projects” drop down menu, you see “pd-externals” folder. select this and it opens the folder on browser. Probably it gives some error message, but just ignore.

    Now drop all the dwonloaded and upzipped Rabbit Control externals content to the browser. it upload all the files into this pd-externals folder.

    you can also add other externals here. For example, cyclone externals are very useful. here I found some tutorials >> https://www.youtube.com/watch?v=CydZ8v95_ok

    you can find some compiled pd externals for Bela here >> https://github.com/BelaPlatform/Bela/issues/621

    Once you have the externals on Bela, let’s test the PD patch we created. Make a new PD project on Bela, call it “sensor_RCP”. open it and upload the _main.pd patch we created above. now run the patch on Bela.

    You may need to increase the block size as Rabbit Control takes some calculation. otherwise you may see the warning of on the console.

    While the patch is running on the Bela, go to http://client.rabbitcontrol.cc/ (or if you installed rabbit control client on the Bela webserver, go to bela.local/client, see this post for details) and type in the host as 192.168.7.2

    now you can see the sensor data on your browser. This becomes very handy if you want to monitor what your sensor is doing. you can also do this if you add wifi dongle to Bela and do it via wifi/wireless. To connect Bela with wifi, please see this tutorial from Bela >> https://learn.bela.io/using-bela/bela-techniques/connecting-to-wifi/

    Here is another example on Bela+PD+RabbitControl:

    This example reads A0 pin, compare with threashold1 value (initially 0.5, but you can change it from Rabbit Control). When the sensor value is bigger than threshold value, it plays back the bom.wav sound file. Toggle on RabbitControl window shows the playback status of the sound file.



    Leave a comment