Skip to content

Instantly share code, notes, and snippets.

@pagdot
Last active October 28, 2023 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pagdot/c2ab06c11eec914e4b970cb3a88d7a0d to your computer and use it in GitHub Desktop.
Save pagdot/c2ab06c11eec914e4b970cb3a88d7a0d to your computer and use it in GitHub Desktop.

Hardware

  • Generisches WEMOS D1 MINI ESP32 Board
  • Motor Controller/Dual H-Bridge L298N (Manual)
  • 5V 6W stereo Amp (PAM8403 6W STEREO AMPLIFIER)
  • 2 Motoren
  • 1 Button

Notes

L channel amp is on GPIO26; Audio can be output using PWM

esp32:
board: wemos_d1_mini32
output:
# Speaker
- platform: gpio
id: speaker
ping: GPIO26
binary_sensor:
- platform: gpio
name: "Button front"
pin: GPIO27
fan:
- platform: hbridge
id: motor_fin
name: "Motor Fin"
pin_a: GPIO17
pin_b: GPIO5
enable_pin: GPIO16
decay_mode: slow # slow decay mode (braking) or fast decay (coasting).
- platform: hbridge
id: motor_mouth
name: "Motor Mouth"
pin_a: GPIO23
pin_b: GPIO19
enable_pin: GPIO18
decay_mode: slow # slow decay mode (braking) or fast decay (coasting).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment