This experimental code pulls a data feed of major league baseball games and sends it to the https://www.particle.io/ API to display stats on an LCD screen.
📷 Tweet with photo of Particle and LCD
📌 NOTE: Code in this repo implements even better custom LCD graphics
Install Particle CLI.
bash <( curl -sL https://particle.io/install-cli )
Optionally install dfu-util
brew install dfu-util
5v
out of LCD panel plugs into the3v3
pinGND
plugs into any groundRX
out of LCD panel plugs intoTX
on the Photon- End pin of 3rd base LED goes to
A6
. End pin of 2nd base goes toA5
. End pin of 1st base goes toA4
. - LEDs need resistor to
GND
.
Send a full score to both lines of the LCD:
curl -H "Authorization: Bearer $SPARK_ACCESS_TOKEN" https://api.particle.io/v1/devices/$SPARK_DEVICE_ID/lcdRow1 -d arg="*NYY 10 Judg 1-2 LAD 12 8 **"
Turn on an LED for all bases (321).
curl -H "Authorization: Bearer $SPARK_ACCESS_TOKEN" https://api.particle.io/v1/devices/$SPARK_DEVICE_ID/bases -d arg="0000000000000321"
away_name_abbrev
home_name_abbrev
status (strikes, balls, etc.)
status:
{ b: '2',
ind: 'I',
inning: '4',
inning_state: 'Top',
is_no_hitter: 'N',
is_perfect_game: 'N',
note: '',
o: '0',
reason: '',
s: '1',
status: 'In Progress',
top_inning: 'Y' },
linescore