Skip to content

Latest commit

 

History

History
134 lines (89 loc) · 4.38 KB

README.BREAD.BOARD.md

File metadata and controls

134 lines (89 loc) · 4.38 KB

MLB-ESP32

ESP32 CAM MLB Mini Kiosk

||||

What

  • Build your own MLB team kiosk for your favorite team on a tiny device - all in for $15 or less...
  • If it's gametime the kiosk will refresh every 120 seconds.
  • If no game it will wait a few hours and retry.
  • RGB LED (optional) turns RED if your team is losing, GREEN if winning, BLUE if a tie or WHITE if a game is scheduled for later.
  • Only 1 Network Request is needed per update to https://statsapi.mlb.com/.

Requirements

Steps

Using this setup, the FTDI supplies the power and allows for repl, if desired.

  • Connect USB FTDI programmer to esp-cam as per the PIN CONNECT link in References.

  • Connect Esp-32 CAM (Bare) to OLED with male to male jumpers:

Esp32cam OLED
IO15 sda
IO13 sdcl
  • Connect Esp-32 CAM to the RGB LED:

There are many pics online to to understand how to setup the reisistor to the RGB:

You can try 200 Ohm resistors, or higher depending on the LED. I have about 500 Ohms using 2 resistors in series, because that's what I had available at the time.

However, you will be using PINS 12, 2, and 14 for the red, blue, and green legs of the LED respectively.

This is reflected in rgb.py:

r = Pin(12, Pin.OUT)
g = Pin(2, Pin.OUT)
b = Pin(14, Pin.OUT)

You can place the RGB LED in the breadboard in any manner, there is no forward or backwards, but if you count the legs from left to right as 1, 2, 3, 4, I connected them like this:

Esp32cam RGB LED What
IO14 1 Blue leg
IO02 2 Green leg
GRND 3 longest leg Ground
IO12 4 (furthest to the right) Red Leg

Yes, the esp32 cam is very crowded now and is almost using 'all available' GPIOs.

  • Install MicroPython with SPIRAM to the ESP32:
  • Get a REPL on the ESP32:

https://microcontrollerslab.com/getting-started-thonny-micropython-ide-esp32-esp8266/

  • Edit the Wifi Config:
vi net_config.py  #should be obvious
  • Edit tm_id = XXX and set to your team's id
edit the mlb_app_runner.py  file
  • Upload mlbapp/ folder using Thonny/IDE as well as:
- boot.py 
- main.py
  • Install 2 Libraries
import upip
upip.install('urequests')
upip.install('micropython-logging')

Note: ssd1306.py is from https://github.com/micropython/micropython/blob/master/drivers/display/ssd1306.py

to '/'

When expanded the view from Thonny should look like this:

References