Final project

I have couple of ideas for fabacademy final project ideas.

ABOVE ARE SOME OF THE IDEAS I BRAINSTORMED. I REALLY LIKE THE IDEA THAT CAME UP WITH THE FORTURE TELLER THAT "HELP MAKERS IDEATE".SO I AM THINKING ABOUT MAKING A SLOT MACHINE THAT HELP TO IDEATE. yetch made by laura kampf is really inspiring for this idea.

Pasted image 20240213031310.jpg

Screenshot 2024-02-13 at 2.24.48 PM.png

SIMPLE CIRCIUT DAIGRAM
sample circuit i made using ciruit.io

i am brainstoring about what all options i can give the dials.

IMG_7868.jpg

why can't i add a clock with it. so this could be. a slot machine and clock at the same time.

IMG_7869.jpg

WHEEL DESIGN

Screenshot 2024-05-07 at 2.42.13 PM.jpg

Screenshot 2024-05-07 at 6.45.40 PM.jpG

Pasted image 20240507223024.jpg

Pasted image 20240507223508.jpg

IMG_8683.jpg

Pasted image 20240507223835.jpg

IMG_8686.jpg

Pasted image 20240508224904.jpg
so i have to drill the magnets out and refill it.

programming an encoder

// Define the pin for the hall effect sensor

const int hallEffectPin = 31;

  

// Variable to store the count of magnet detections

int magnetCount = 0;

  

// Flag to track whether the sensor was already triggered

bool sensorTriggered = false;

  

void setup() {

// Initialize serial communication

Serial.begin(9600);

  

// Set the hall effect sensor pin as input

pinMode(hallEffectPin, INPUT);

}

  

void loop() {

// Read the state of the hall effect sensor

int sensorState = digitalRead(hallEffectPin);

  

// If the sensor detects a magnet (LOW state) and it wasn't triggered before

if (sensorState == LOW && !sensorTriggered) {

// Increment the magnet count

magnetCount++;

  

// Print the current magnet count

Serial.print("Magnet detected! Count: ");

Serial.println(magnetCount);

  

// Set the sensor triggered flag to true

sensorTriggered = true;

}

// If the sensor is not detecting a magnet (HIGH state)

// reset the sensor triggered flag to false

if (sensorState == HIGH) {

sensorTriggered = false;

}

  

// // A short delay to prevent rapid counting due to sensor noise

// delay(100);

}

the code