#!/bin/bash

while :
do
  res=$(nfc-poll | grep "UID " | cut -d: -f2 | sed 's/ //g' | xargs)
  if [[ ! -z "$res" ]]
  then
    echo $res
    echo "11ff11 0.2" > /dev/rgb_pipe
  else
    echo "ff1111 0.2" > /dev/rgb_pipe
  fi
  sleep 1
done
