14 April 2026

Jasmine Darman Final Project Progress/ Prototype

 The main goal of this project is to recreate a wooden board game to give better visual indicates for player piece movement. It will have 3 parts: an RFID reader to get the piece, an array of neo pixels, and an array of push buttons over top a layer of copper tape. when a user scans their piece, the RFID reader saves their piece data. The player then places their piece down on the board and holds down. This sets registers a location within the push button array. This is then given to the LED array to signal how they should display. 
Here is the Schematic: 


The two arrays are visually separated, but they are meant to be on top of one another. The red is representative of the individual tiles. 
For the starting progress, I worked on feasibility and modeling to try to get an effective push down button. It was 3 iterations and still counting.
At first, I tried to make it so you close a circuit when you get a press down. 
 This came with an Led inside and a program that checked for a completed circuit before turning on the LED. This iteration used a lot of copper tape and soldering. The finished result was having to place the upper part of the button directly onto a section to complete a circuit. 


Video for Button 1

The second iteration I tried to use TPU plastic that is flexible to make the moving part. This was too flexible and resulted in the top of the button not having any bounce. However, The top of the button was now surrounding parts of the bottom of it. The top this time was thinner, but too thin to where it could easily break. 

The third iteration used Transparent PETG for the spring effect and the top of the button was glued to the bottom as a strictly bouncing button prototype. It was very effective. 

Video for button 3
While creating buttons, I was also getting a list of materials for the final project. I've bought all of it except for PETG. 
 Additionally, I had shifted the way I was making the bttons from having an open curcuit to having two lines of conductive material meeting. 
Each intersection where there is a push button will have 3 layers of paper: 
Layer 1 at the bottom will have lines of copper tape going in one of the hexagonal diagonals. 
Layer 2 will have an opening small enough to where layer 1 and 3 would touch when pressed together. 
Layer 3 at the top will have lines of copper tape going in one of the other hexagonal diagonals. 
The current code for the project is mainly what was taught in class. This was modified for an 11 by 11 grid and pin numbers are changed to match the schematic above. 
#include <Shifter.h>



//pins  for the mux 4 // muxes are 11
int muxPin1 = 4; //s0
int muxPin2 = 5;//s1
int muxPin3 = 7; //s2
int muxPin4 = 8; //s3
//power and ground as well


//3 pins for the shifter
int pin1 = 2; // ser pin
int pin2 = 1; //L clock
int pin3 =0; // clock
int registerNumber = 2;

//ser in to ser out, l clock to l clock, clock to clock,
//ground ground, vcc to vcc


//A5
int muxPin5 = A5; //sig

//ser pin, l clock, clock
Shifter shifter(pin1, pin2, pin3, registerNumber); //shifters are 11
int array[121];


void setup() {
  // set all muxs to output
  pinMode(muxPin1, OUTPUT);
  pinMode(muxPin2, OUTPUT);
  pinMode(muxPin3, OUTPUT);
  pinMode(muxPin4, OUTPUT);
  pinMode(muxPin5, INPUT);// you need a pull down resisteor on the muxes





  //loop through the array set it all to 0


  //start a serial


}

void loop() {
  // put your main code here, to run repeatedly:

  //iterating through the shifters by 11
 for( int i = 0; i < 11; i++){
  shifter.clear(); // ground it all
  // set an i to high
  shifter.setPin(i, HIGH);
  shifter.write(); // set pin value to the device

  //for loop with a
  for(int x = 0; x < 11; x++){
    array[i*11+x] = readMux(x);
  }


 }


}

int readMux(int channel){
  int controlPin[] = {muxPin1, muxPin2, muxPin3, muxPin4};

  int muxChannel[16][4]={
    {0,0,0,0}, //channel 0
    {1,0,0,0}, //channel 1
    {0,1,0,0}, //channel 2
    {1,1,0,0}, //channel 3
    {0,0,1,0}, //channel 4
    {1,0,1,0}, //channel 5
    {0,1,1,0}, //channel 6
    {1,1,1,0}, //channel 7
    {0,0,0,1}, //channel 8
    {1,0,0,1}, //channel 9
    {0,1,0,1}, //channel 10
    {1,1,0,1}, //channel 11
    {0,0,1,1}, //channel 12
    {1,0,1,1}, //channel 13
    {0,1,1,1}, //channel 14
    {1,1,1,1}  //channel 15
  };
 
  //loop through the 4 sig
  for(int i = 0; i < 4; i ++){
    digitalWrite(controlPin[i], muxChannel[channel][i]);
  }

  //read the value at the SIG pin
  int val = analogRead(muxPin5);

  //return the value
  return val;
}









No comments:

Post a Comment

Note: Only a member of this blog may post a comment.