Android Netrunner click tracker

door dwjmeijer

Printbare bestanden (4)

  • stl

    clicktracker-top-flat.stl

    19 Ko · 212 downloads

    Downloaden
  • stl

    clicktracker-bottom.stl

    46 Ko · 210 downloads

    Downloaden
  • stl

    clicktracker-draw.stl

    67 Ko · 209 downloads

    Downloaden
  • stl

    clicktracker-click.stl

    76 Ko · 218 downloads

    Downloaden

Beschrijving

A click tracker with 4 buttons and 4 leds, gives that sweet "click" sound.

see it in action: https://www.youtube.com/watch?v=8vFgDed7kWc

Requires an Arduino micro or similar, I used a Pololu A-Star* 328PB Micro, the cheapest compatible device I could find.

The design uses a lot of specific dimensions for components I had, such as battery terminal at the bottom and exact holes for jumper cables, so you may need to adapt it.

Print the click icon 7 times and the draw icon once, in transparent filament to diffuse the leds. Glue these into the top, which folds nicely in two 60degree angles. (at .2mm layer height, they are connected by a single layer of filament).

Once you've confirmed to circuit to be working, put everything in its place and assemble with hot glue. Battery pack is still accessible

Arduino code:

const int buttonPin[] = {2,3,4,5};
const int ledPin[] = {6,7,8,9,10,11,12,13}; //first 4 for blue, last 4 for red

// variables will change:
int buttonState[] = {0,0,0,0};
int playerTurn = 0;
int endTurn = false;

void setup() {
for(int p=0; p<4; p++){
pinMode(ledPin[p], OUTPUT); //4 blue leds
pinMode(ledPin[p+4], OUTPUT);//4 red leds
pinMode(buttonPin[p], INPUT_PULLUP);//4 buttons
}
}

void loop() {
endTurn = true;
for(int p=0; p<4; p++){
buttonState[p] = digitalRead(buttonPin[p]);
if (buttonState[p] == playerTurn) {
digitalWrite(ledPin[p+4*playerTurn], 0);
} else {
digitalWrite(ledPin[p+4*playerTurn], 1);
endTurn = false;
}
}
//if all buttons have been pressed by the current player, go to the next player
if(endTurn){
playerTurn = 1 - playerTurn;
//should not have to turn leds on or off,
//current player leds are all off, otherwise endTurn would be false,
//other player leds are going to turn on in the next loop.
}
}

Card draw icon adapted from: https://game-icons.net/1x1/faithtoken/card-draw.html
Click icon is property of Fantasy Flight Games.

Tags