I want to build a ship's clock. It will ring a sequence of bells -- 8 bells at noon, one beall at 12:30, two bells at 2 pm, three bells at 3:30, etc until 4 pm when the sequence starts over again.
I think I will need a cpu board of some sort, an amplifier, a speaker, and some form of static memory, probably in t he form of a micro USB card or something like that.
For control, I wans thinking of adding a touch screen. I need to be able to reset the time and do thinks like set "silent hours" when the chimes don't ring.
I'd like to know what kind of Arduino board I would need. Any suggestions for this kind of project would be appreciated.
Any Arduino is more than adequate for a project like this. Your soldering/assembly skill is probably the main factor. Another consideration is whether you want to run it on battery power. You will probably need a clock module. They all come with their own battery backup. There is a swag of ship's clock software around here somewhere.
The audio files are no problem. That's the easy part. I'm just trying to figure out the smallest number of components needed to try to build the workings.
Are you familiar with modulus? For example "5 modulus 4" equals "1" and "3 modulus 4" equals "0"... Your bells are like leap year, "modulus 4", but the even multiple gets four double bells, plus the half-hour bell. The percent "%" symbol is the modulus (mod) symbol. In code this might be simplified to...
// Calculating ships bells
void setup() {
Serial.begin(115200);
for (int hour = 0; hour <= 24; hour ++) { // count the hours
Serial.print(hour);
Serial.print(" = ");
if (hour && !(hour % 4)) // greater than zero and evenly divisible by 4
Serial.print(4); // four double bells
else
Serial.print(hour % 4); // remainder of hour division by 4
Serial.print(" double bells");
Serial.println();
}
}
void loop() {}
Test 1... 5:30 p.m... The time "17:30 mod 4" has a remainder of 1, and "30 equals 30" is true (1), so 1 double bell and 1 single bell.
Test 2... 4:00 p.m.... "16:00 mod 4" has a remainder of 0 so it gets 4 bells.
You have to do the assembly in the manner that best suits you. An example might be to solder up proto shield that carries an RTC module and a relay for the bell, plus sundry buttons. Your LCD display plugs into it, and your shield plugs into a Uno, i.e. a three storey pile.
If you scroll down from here, you might find some "related topics" with all you need!