esphome:
  name: ride
  platform: esp8266
  # pin layout: https://cdn.evilmadscientist.com/catalog/kits/ada-huzzah/imglrg/2@2x.jpg
  board: huzzah
  build_path: build_ride

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  use_address: 10.2.0.95
# MAC: 5c:cf:7f:01:58:8a

mqtt:
  broker: "10.2.0.1"
  port: 1883
  username: ""
  password: ""

logger:
  baud_rate: 115200
  level: DEBUG

ota:

# FAN8200 motor driver
# FAN8200 pins on the left
# -------------
# VCC  - 3v
# CE1  - GPIO13
# OUT1 - MOTOR_BLK
# VS1  - n/c
# OUT2 - MOTOR_RED
# IN1  - GPIO12
# SGND - GND
#
# PGND - GND
# IN2  - n/c
# OUT4 - n/c
# VS2  - n/c
# OUT3 - n/c
# CE2  - n/c
# PGND - n/c

output:
  - platform: esp8266_pwm
    frequency: 500Hz
    id: motor_pwm
    pin: 13
switch:
  - platform: gpio
    id: motor_dir
    name: "motor_dir"
    pin: 12

light:
  - platform: fastled_clockless
    chipset: WS2812
    pin: GPIO5
    num_leds: 10
    rgb_order: GRB
    name: "rgb10"
    default_transition_length: 200ms
  - platform: monochromatic
    name: "motor_speed"
    output: motor_pwm
    gamma_correct: 1.0
    default_transition_length: 200ms
    restore_mode: ALWAYS_OFF
# dir doesn't work- I'm not using the driver chip right.  :(

# mosquitto_pub  -t ride/light/motor_speed/command -m '{"state":"ON","brightness":255}'
# mosquitto_pub  -t ride/light/motor_speed/command -m '{"state":"ON","brightness":0}'

# mosquitto_pub  -t ride/light/rgb10/command -m '{"state":"ON","brightness":255,"color":{"r":100,"g":100,"b":200}}'
# mosquitto_pub  -t ride/light/rgb10/command -m '{"state":"ON","brightness":255,"color":{"r":0,"g":0,"b":0}}'
# and see https://esphome.io/components/light/index.html?highlight=wle#wled-effect for per-led options.

# See /home/drewp/own/proj/mos/apps-1.19.6/ride/ for prev version with LED images.