#include "Arduino.h"
#include "uRTCLib.h"
#include "SPI.h"
#include "TMRpcm.h"
#include "SD.h"
// uRTCLib rtc;
uRTCLib rtc(0x68); // Create library object
File myFile; // Create file object
TMRpcm tmrpcm;
// Ports
const int tb = 2; // Top button
const int bb = 3; // Bottom button
const int vp = 4; // Vibrator pin
//tb
bool tbposition;
long tbinitialtime;
long tbpresenttime;
bool tbprevposition = 0;
long tbpushtime;
// 1-bb
bool bbposition;
bool morsevoice = 0;
// RTC
// Days of the week
char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
// SD
// Change this to match your SD shield or module;
const int chipSelect = 10;
void setup(){
// Pin inputs and outputs
pinMode(tb, INPUT);
pinMode(bb, INPUT);
pinMode(vp, OUTPUT);
tmrpcm.speakerPin = 9; // Speaker pin
// Begin communication
Serial.begin(9600);
delay(3000); // wait for console opening
URTCLIB_WIRE.begin(); //Initialize RTC
// Comment out below line once you set the date & time.
// Following line sets the RTC with an explicit date & time
// for example to set January 13 2022 at 12:56 you would call:
rtc.set(0, 56, 12, 5, 13, 1, 22);
// rtc.set(second, minute, hour, dayOfWeek, dayOfMonth, month, year)
// set day of week (1=Sunday, 7=Saturday)
tmrpcm.setVolume(7); // Set speaker volume
OK, listen man, the reason I haven't posted the whole code is because my code is about 2000 lines long, and I don't think you want to go through all that. Second of all, most of that is irrelevant to the speaker or SD Card module.
As for the connections, what more do you want me to post than what I already did!
And if you're looking for more information to solve my problem (which I would greatly appreciate), then what info do you want concretely?
Great, cut it down to an MCVE. We would really appreciate that.
Looks like from the code that there is an RTC in there. It's missing. What else is missing.
I've been pretty clear about that.
Look, I'm assuming that you don't know what the problem is. If you did then why would you be here right? So please stop just giving me the information that YOU think I would need to solve it. You don't know what the problem is so you can't possibly know what information is or is not crucial. Maybe you cross wired some other part. Maybe there's a buffer overrun in some completely different part of the code. The point is that YOU DON'T KNOW. So what you have to do is get it all out there. Show the whole thing or stop wasting our time.
If you don't want to post your whole project, then cut it down to an MCVE. But at least give us a way to replicate the problem. How do you expect someone to solve it when all you've given us is the fact that there is a problem.
You keep asking questions of us like we are in the room with you and know what you have. Do you not understand that I'm in a completely different place? I don't know how you recorded your file. I don't have the file. How would I know why it is quiet?
Well, that depends on a lot of things that you seem to not want to share.
So I'm going to ask this one more time and hope you get the hint.
Do you want someone to help you correct the code that you haven't posted all of?
Or do you want someone to help you correct the connections you haven't posted all of?
Not it can't produce it, think it will max out at 500ma and your computers usb will also max out 500ma..
board could get hot, could also damage pc usb port..
careful.. ~q