Close
0%
0%

Arduino Umpire Mask

MLB IoT ERA

Similar projects worth following
MLB IoT ERA

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!

Vidme link in case the MLB hunts me down and murders me for venturing so close to the sun with out written consent.

https://vid.me/9uzZ

Shout out to Leslie Nielsen - you are missed.

  • 1 × Arduino Nano (Uno Prototype)
  • 1 × HC-06 Bluetooth Module
  • 1 × Adafruit Neopixel LEDs
  • 1 × 1000uf
  • 1 × 470 Resistor
  • 1 × MIT App Inventor
  • 1 × 9 volt Battery
  • 1 × 7805 5V Regulator Optional
  • 2 × 1uf Optional
  • 1 × Dot Stickers

View all 12 components

  • Arduino Cod-didily-odily

    VijeMiller12/22/2016 at 16:46 1 comment

    HackADay.io really needs to add "Arduino" to code snippet options because none appear as viusally accurate. Just -- sayin'.

    // Arduino Umpire Mask
    // TVMiller
    
    #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(0, 0, 255), 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);
      }
    }
    

  • Process

    VijeMiller12/19/2016 at 17:02 0 comments

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates