...

Concept

Minds-On came from the tilt board game( people have a board with holes and a ball on it, then they need to tilt the board to let the ball go through the maze). Usually, people play it with their hands. But in Minds-On, people can play it with their heads which means when their are nod or shake, they can tilt the board remotely. To make this installation sustainable, I designed both the maze and holes to be customizable.

Detail image Detail image

The first demo

To test my idea, I first made a demo with foam board and the walls of the maze could be plugged in. Detail image Detail image

Final version(2023)

Then I found this way look stupid and not easy to operate. As a result, the final version came with magnets. The board consists of two layers and I put magnets between them. Also I put magnets into the walls, so that it look like magic.

Your browser does not support the video tag.

Resources

//Uno
#include <ArduinoOSCWiFi.h>
#include <Adafruit_Sensor.h>
#include <Servo.h>
#include <Wire.h>


// WiFi stuff
const char* ssid = "lmq";
const char* pwd = "55660000";
const IPAddress ip(192, 168, 4, 2);
const IPAddress gateway(192, 168, 1, 1);
const IPAddress subnet(255, 255, 255, 0);

WiFiUDP Udp;

// for ArduinoOSC
const char* host = "192.168.4.1";
const int recv_port = 55556;

int i;
float f;
String s;
float c = 1.0;

//x,y
float x;
float y;
float anglex = 40;
float angley = 40;

void onOscReceived(const OscMessage& m) {
  Serial.print(m.remoteIP());
  Serial.print(" ");
  Serial.print(m.remotePort());
  Serial.print(" ");
  Serial.print(m.size());
  Serial.print(" ");
  Serial.print(m.address());
  Serial.print(" ");
  Serial.println();

  x = m.arg<float>(0);
  y = m.arg<float>(1);
}

void setup() {
  Serial.begin(115200);
  delay(2000);
  WiFi.begin(ssid, pwd);
  WiFi.config(ip, gateway, subnet);
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
  Serial.print("WiFi connected, IP = ");
  Serial.println(WiFi.localIP());
  Udp.begin(recv_port);
  OscWiFi.subscribe(recv_port, "/sensor", onOscReceived);

  //motor
  servoX.attach(9);
  servoY.attach(10);
}

void loop() {
  OscWiFi.update();  
  if (x < -0.2) {
    anglex=anglex -c;
  }
  if (x > 0.2) {
    anglex=anglex +c;
  }

  if (y < -0.2) {
    angley=angley -c;
    //delay(10);
  }
  if (y > 0.2) {
    angley=angley +c;
  }
  anglex = constrain(anglex, 0, 90);
  angley = constrain(angley, 0, 90);
  
  Serial.print("x: ");
  Serial.println(x);
  Serial.print("y: ");
  Serial.println(y);

  Serial.print("anglex: ");
  Serial.println(anglex);
  Serial.print("angley: ");
  Serial.println(angley);
 
  servoX.write(int(anglex));
  servoY.write(int(angley));

}
//Nano
#include <ArduinoOSCWiFi.h>
#include <WiFiNINA.h>
#include <Arduino_LSM6DS3.h>

char ssid[] = "lmq";
char pass[] = "55660000";

int status = WL_IDLE_STATUS;

// for ArduinoOSC
const char* host = "192.168.4.2";
const int send_port = 55556;

int light;

float x, y, z,roll,pitch;


void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  // check for the WiFi module:
  if (WiFi.status() == WL_NO_MODULE) {
    Serial.println("Communication with WiFi module failed!");
    // don't continue
    while (true)
      ;
  }
  // print the network name (SSID);
  Serial.print("Creating access point named: ");
  Serial.println(ssid);
  status = WiFi.beginAP(ssid,pass);
  printWifiStatus();
  OscWiFi.publish(host, send_port, "/sensor",x,y)->setFrameRate(60.f);

  if (!IMU.begin()) {
    Serial.println("Failed to initialize IMU!");
    while (1);
  }

}

void loop() {
  OscWiFi.update();
  //light = analogRead(A3);

  //LSM6DS3Core imu;
  //float x, y, z;
  IMU.readAcceleration(x, y, z);
  // Calculate tilt angles
  roll = atan2(y, z) * RAD_TO_DEG;
  pitch = atan2(-x, sqrt(y * y + z * z)) * RAD_TO_DEG;

  
  // Print tilt angles
  Serial.print("Roll: ");
  Serial.print(roll);
  Serial.print("\tPitch: ");
  Serial.println(pitch);
  Serial.print("\tx: ");
  Serial.print(x);
  Serial.print("\ty: ");
  Serial.println(y);
  

  delay(100);  // Adjust the delay as needed

}


void printWifiStatus() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print your board's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);
}