Version/Date: 04/11/2023

The mesh-enabled interaction buttons allow you to easily create interactions using buttons, lights, and music with any programming language.

- Hardware:

  1. X amount of interaction buttons
  2. 1 mesh dongle

- Software:

  1. A programming language that supports sending data over a serial connection

The buttons were originally created for the course Experience Design for Interaction. The goal was to create a new layer to existing small playgrounds to make it more fun for children to play there. This project aimed to solve the issue by hanging the buttons all around the playground. And with the use of these buttons, create games like Capture the flag. They were set up in a way where the buttons listened to basic commands via a mesh network and were sent when they were pressed.

  1. Ensure the buttons are configured to be in the same mesh. Settings for this can be changed with an SD card. The following settings need to match:
    • MESH_SSID: This is the name of the mesh (you can see this with your phone). They have to match otherwise the buttons will be separate meshes.
    • MESH_PASSWORD: This is the password to connect to the mesh. If this is wrong, it is not allowed to join the mesh.
    • WIFI_CHANNEL: These if to match; otherwise, they can not see each other at all
    • MESH_PORT: This determines what port the buttons will listen to for commands. You can choose to mismatch these but not the settings above. For example if you want to have two different sets of meshes with the same settings but a separate communication.
  2. Turn on the buttons. They will start out blinking red, and when you connect to a mesh, it will blink green.
  3. Insert the mesh dongle into your computer. The screen will display the number of connected buttons.
  4. Run your script for interactions. A Python example is available.
    • If the script stops, the dongle reboots. Ensure it's connected to the mesh before rerunning the script.

The dongle has a button on the underside. This button can do three things:

  • Normal press: it refreshed the node list and the connected amount of buttons
  • Double press: It will flip the screen. It can be upside down depending on what side the USB port is.
    • This state is remembered when the dongle is turned on again.
  • Long press: Sets all connected buttons to Battery display mode
    • The actual values are also sent over the serial port. You can read these, for example, with the Arduino ide or putty.
  1. To create a script for your interactions, choose a programming language of your choice and make sure it has the library installed for Serial Communication (for Python this is PySerial).
  2. Set up the serial communication, set the baud rate to 115200 and select the right COM port. The device should be called USB Serial Device.
  3. Listen to the serial communication so you can receive information from the mesh (list of the nodes connected, battery level and which button has been pressed)
  4. You can send commands in the following format nodeid:command:subcommand`. The backtick at the end is important.
  • To receive the list of all nodes connected to the mesh, send Nodelist`. You will receive a list of all nodes starting with the ID of the dongle. The IDs are separated with a \.
  • You can start with the word Broadcast. This means the command will be sent to all nodes in the mesh. Or a specific node ID is received by sending the Nodelist command. The IDs are also located on the buttons.
  • After the part where you tell which buttons have to receive the command, you can use the command and subcommand to tell it what to do. Below are all the available commands.
    • :Play:[song] - This is how u play a song on a button. [song] has to be replaced with the name of a song u have put in the sounds folder of the SD card without the “.mp3”.
    • :Rainbow - This will put a rainbow effect on the button.
    • :Full:[color] - This will put a solid color on the button. Replace [color] with one of the colors.
    • :Circle:[color] - This will put a circle effect on the button in color.
    • :Blink:[color] - This will have the button blink a color.
    • :Clear - Turns of the LEDs.
    • :Brightness - With this, u can change the brightness of the button on a scale from 0 - 255.
    • :Volume - With this you can change the volume of the speaker on a scale from 0-21.
    • :Battery:[subcommand]`- With this, u can get information about the battery.
    • Percentage - Gives the battery percentage over serial.
    • Voltage - Gives the battery voltage over the serial.
    • Show - Gives back the battery voltage and percentage over serial, but also shows the battery capacity with the LEDs.

The following colors are available: Red, Blue, Green, Purple, Yellow, Orange, Cyan, Pink.

This is how the program looks when starting.

Picture of the dongle.

dongle.jpg

Inside view of the buttons.

button_inside.jpg

Buttons; one off, one green.

button_on_off.jpg

The buttons will be tested in module 6 as a tool in the course. Besides this, they might be used for graduation projects. If any problems occur during those use cases, the functionality of the buttons might be extended.

The buttons work great on the software side and are easy to set up. This used to be complicated. However, due to the same manufacturing error, there is only one set of buttons where the LEDs work correctly. The other 2 sets have defective LEDs, which might be replaced later.