Vcc and gnd arduino 1.8.57/5/2023 ![]() Start communication with DFPlayer Mini if (player. Init USB serial port for debugging Serial. With the connection all done, we can now proceed to write the code for the. ![]() Servo directions are sent from the microcontroller to the servo motor as PWM pulses. The signal pin was connected to the digital pin 8 of the Arduino because it is a PWM pin. #include "SoftwareSerial.h" #include "DFRobotDFPlayerMini.h" // Use pins 2 and 3 to communicate with DFPlayer Mini static const uint8_t PIN_MP3_TX = 2 // Connects to module's RX static const uint8_t PIN_MP3_RX = 3 // Connects to module's TX SoftwareSerial softwareSerial(PIN_MP3_RX, PIN_MP3_TX) VCC (Red wire) - 5V SIG (yellow/orange) - D8 GND (Black/Brown) - GND. This is a simple example that starts playing the first MP3 file on the SD card after Arduino start up:
0 Comments
Leave a Reply. |