I'm fairly new to arduino and coding, but I'm very handy with a soldering iron and computer. I'm working on a gift for a friend based on the Alexa controlled Billy Big Mouth Bass.
I chose to build it with a old Arduino Nano and a L298N H-bridge to drive the 5V brushed motors in the bass. I am not using an Uno / Motor Shield as used in the tutorial above, so my understanding is some of the same coding is not available to me.
Wiring
The wiring is generally correct at this point. I have the 4 AA's 6.5V wired to the L298N and the 5V reg (4.8V) on the L298N powering the Nano. I have the L298N wired correctly to the bass motors, and the bass moves correctly. I currently have no PWM outputs run to the L298N. I have the left channel from the 3.5 jack wired to the A7 on the Nano. I also have the stock button on the front of the bass wired between ground and A5 on the Nano. The stock crappy speaker is wired to the right channel audio.
What I want the Bass to Do
- I want the bass to "sit up" and look forward when the button is pressed. When the button is pressed again, I want the bass to "lay down." This appears to be working correctly with the current code
- I want bass lips to move with the music playing. I have a solid set of data from the audio sensor, but I cannot get the audio to sync well with the lips. I know my current code (trial and error) is not ideal for this situation.
Current Code
Request
If anyone has any thought or suggestions, I would greatly appreciate it. This is my first arduino project where I haven't just copied and pasted someone else's code. Thank you!