1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
// DFPlayer mini shield for Arduino UNO v1.00 // Target device : Arduino UNO r3 // Target Frequency : 16MHz // Date : 2020/12/25 // Author : Takishita of Delivery Toy Hospital // http://wwww.takishita.jp/toy_hospital // // GNU Lesser General Public License. // See <http://www.gnu.org/licenses/> for details. // All above must be included in any redistribution // // RAM allocation table // usage start end size // groval: 0x0100( 256) - 0x0436(1078) 0x0337( 823) // heap : 0x0437(1079) - 0x083B(2106) 0x0404(1028) // free : 0x0853(2107) - 0x08F5(2293) 0x00BA( 187) // stack : 0x08F6(2294) - 0x08FF(2303) 0x000A( 10) #include "Arduino.h" #include <SoftwareSerial.h> #include <DFRobotDFPlayerMini.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> // Debug //#define DEBUG // Debug serial output // OLED Shield #ifndef DEBUG #define oled_shield // OLED shield display enable #endif // Arduino UNO #define SERIAL_TX 7 // Digital 7 pin #define SERIAL_RX 8 // Digital 8 pin #define volume_pin A0 // Analog A0 pin #define play_pin A1 // Analog A1 pin #define seed_pin A3 // Analog A3 pin #define device_pin 2 // Digital 2 pin |