Arduino Umpire Mask
It is time for the MLB to join the modern era by translating the often unclear umpire muttering and connecting them to the rest of us at home. In our first #OneDayBuild comes the Arduino Umpire Mask that delivers an immediate visual response to that crucial life or death call.


Not a software designer, so simply close your eyes and imagine that the Counter App is also IoT and seamlessly updating several resources.

Shout out to umpires young and old who wear these bulbous masks; holy cripes! Shout out to Leslie Nielsen -- you are missed.



Arduino Code
// Arduino Umpire Mask
// Vije Miller

#include "Adafruit_NeoPixel.h"

// Neopixel Data Pins
#define PINSTRIP 3
#define PINPIXEL 4

// LED Count and Setup
Adafruit_NeoPixel strip = Adafruit_NeoPixel(15,
PINSTRIP, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(6,
PINPIXEL, NEO_GRB + NEO_KHZ800);

// Strike Count
int strikes = 0;
// Ball Count
int balls = 0;

// Bluetooth Data
char call = 0;

void setup() {

Serial.begin(9600);

strip.begin();
strip.show();
pixels.begin();
colorWipe(strip.Color(255, 0, 0), 50);
}

void loop() {

// Clear Strip
colorWipe(strip.Color(0, 0, 0), 50);

if (Serial.available() > 0) {
call = Serial.read();
if (call == '1') {
colorWipe(strip.Color(255, 0, 0), 50);
strike();
delay(1000);
}
else if (call == '2') {
colorWipe(strip.Color(0, 255, 0), 50);
ball();
delay(1000);
}
else if (call == '3') {
reload();
}
}
}

void strike() {
if (strikes == 0) {
// Red Strike Count
pixels.setPixelColor(5, pixels.Color(255, 0, 0));
strikes = 1;
}
else if (strikes == 1) {
pixels.setPixelColor(4, pixels.Color(255, 0, 0));
}
pixels.show();
}

void ball() {
if (balls == 0) {
// Green Ball
pixels.setPixelColor(0, pixels.Color(0, 255, 0));
balls = 1;
}
else if (balls == 1) {
pixels.setPixelColor(1, pixels.Color(0, 255, 0));
balls = 2;
}
else if (balls == 2) {
pixels.setPixelColor(2, pixels.Color(0, 255, 0));
}
pixels.show();
}

void reload() {
colorWipe(strip.Color(255, 0, 0), 50);
pixels.setPixelColor(0, pixels.Color(0, 0, 0));
pixels.setPixelColor(1, pixels.Color(0, 0, 0));
pixels.setPixelColor(2, pixels.Color(0, 0, 0));
pixels.setPixelColor(4, pixels.Color(0, 0, 0));
pixels.setPixelColor(5, pixels.Color(0, 0, 0));
strikes = 0;
balls = 0;
pixels.show();
}

void colorWipe(uint32_t c, uint8_t wait) {
for (uint16_t i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}

Archive
https://hackaday.io/project/18300-arduino-umpire-mask

03:59:47 282-016

@pkvi
"...may not meet professional standards."
12,126 miters
0 miters today
202 tenons
Subscribe