Fab Lab Ciudad de México

Mexico City

Group Assignment – Interface and Application Programming - CDMX

The first tool we checked out was ControlP5. It is a Processing library that helps you create knobs, dials, toggles, switches and sliders. It can be found here:

 

https://www.sojamo.de/libraries/controlP5/

Control P5 is used in processing, And the creation of knobs and buttons is easy with their examples.

Here are some pictures of our work:

These knobs are the ones we were most acquainted with, because they can be used to change variables like servo angles. This is the syntax:

 

myKnob = cp5.addKnob("stepper")

    .setRange(500, 20000)

    .setValue(5000)

    .setPosition((width/2)-500, height/2-500)

    .setRadius(500)

    ;

void stepper(int theValue) {

  knobValue=theValue;

  String s="H,"+knobValue+";";

  if (toggle1) {

    myPort.write(s);

  }

  println("a knob event. saving "+theValue+" to values...");

}

 

It is a little bit complicated but once you figure out what you want it to do, you can have the processing code send serial messages to the boards. Note that it is used with the Serial library so that processing also sends the messages to the boards.

 

The second tool we checked out was TouchOSC. It is a mobile app to send messages using OSC protocol. It can be found here:

 

https://hexler.net/touchosc

 

Here are some pictures of our work:

The hard part in touch osc is matching the addresses and then reading the messages in the computer, it’s a bit hard to get it going.

This is the editor of touchOSC interfaces:

The good part is that you configure everything in the editor, and set the values of your buttons so that you can control everything with them.

Overall, touch OSC is harder because you need processing or python to read the messages on the computer or a wifi module. This is harder because there is an extra step. Control P5 can be eimplemented in any laptop so it’s easier.

Copyright Fab Lab

Ciudad de México 2021