# ATTINY+ RS3231 Watch Project Help

Well, have you fully researched those? It takes more than a few hours but you would already know more if you had spent your time doing that instead of asking questions here. I suggest, it's great to ask questions here, but futile unless you combine what you read here with some independent research.

Been watching lectures all day on the various topics discussed here, I am getting closer!

I hope not on YouTube. That is not research. But better than nothing, I guess...

okay let me take another stab at this, each SegmentPins is assigned a bit address "0b01xxxxxx" you have assigned these addresses by shifting the starting bit 0b01000000 over by n where n correlates to a segment variable 0-6. It looks to me like yo could have theoretically labelled each segment as:
0b01000001 for Seg[0]
0b01000010 for Seg[1]
0b01000011 for Seg[2]
0b01000100 for Seg[3]
0b01000101 for Seg[4]
0b01000110 for Seg[5]
0b01000111 for Seg[6]
but you decided to bit shift to ensure that the segment address would never overlap with something else called out in the code?

This is what I consider, "gaslighting yourself". Your thoughts there seem like a kind of attempt to understand low level things by describing their possible uses. You will never get anywhere with that approach.

Good research comes from a widely varied set of sources, one of which for me is YT. I am also reading many other sources but watching is easier while I work. Baby steps, I am not writing a thesis paper on computer science, just trying to learn new skills to bolster my ME degree.

You are distracting yourself while you watch? Even worse.

I tend to learn well by seeing something function in various ways, that's why I am interrogating the purpose, and possible alternate uses for bits of code. My mind is molded to think in gears and linkages, so I am learning how to pick up on the "low level" concepts in the best ways I can.

Sounds like a fail. You're an engineer. How did you study physics, for example? I think not by playing with stuff.

The theories and techniques of digital logic and computer programming are essential to a timely introduction to the subject. There is no short cut.

You can not learn very much from looking only at the applications and particular implementations of them, in isolation.

Also, most reference material also includes examples, from which you can obtain a good idea of the purpose and possible applications.

Believe it or not the majority of my degree was understood through practical labs and most of my success in class came from better explanations on YT than my textbooks could offer. And I come from U of M, not a low-level school. Still, I hear the wisdom in what you are saying, I grasp the importance of building fundamental knowledge. This project is a hobby, not a career. would you suggest I purchase a textbook on the subject, what constitutes research in you mind? I think there is a good reason that in every textbook, the theoretical explanations and hard-science concepts are always supported with real world examples, use cases, and isolated practice problems. I think of this project as a practice problem to try and push me foreword through understanding these concepts at a deeper level than memorizing functions. Maybe this is not how you learn or think others should learn but it is how I am choosing to act. However I must say that while I value your expertise immensely, you attitude of superiority is not welcome any longer. If my methodology or ignorance frustrates you than move to another forum topic and stop taking up posts with insulting remarks.

I'm only suggesting that you do basic internet research. I don't really care what you consider "welcome". You came here for help, I'm giving you help, in my experience beginners can't always see the difference between what they want to know and what they need to know. I see that I've exhausted my arsenal of pedagogical advice. I felt that it would circumvent a long, fruitless, and repetitious exchange of questions and answers.

If you feel that I have made insulting remarks, please report them to a moderator because they are not allowed here.

I don't quite see what you mean by this. How would you use your "Seg" array?

If you don't want to use a 'for' loop and you don't want to use shifting you could save the compiler some work by doing the shifting yourself:

``````void displayDigit(uint8_t digit)
{
digitalWrite(SegmentPins[0], digits[digit] & 0b01000000);
digitalWrite(SegmentPins[1], digits[digit] & 0b00100000);
digitalWrite(SegmentPins[2], digits[digit] & 0b00010000);
digitalWrite(SegmentPins[3], digits[digit] & 0b00001000);
digitalWrite(SegmentPins[4], digits[digit] & 0b00000100);
digitalWrite(SegmentPins[5], digits[digit] & 0b00000010);
digitalWrite(SegmentPins[6], digits[digit] & 0b00000001);

delay(1100);

digitalWrite(SegmentPins[0], LOW);
digitalWrite(SegmentPins[1], LOW);
digitalWrite(SegmentPins[2], LOW);
digitalWrite(SegmentPins[3], LOW);
digitalWrite(SegmentPins[4], LOW);
digitalWrite(SegmentPins[5], LOW);
digitalWrite(SegmentPins[6], LOW);
}``````

And you don't need to use the SegmentPins array:

``````void displayDigit(uint8_t digit)
{
digitalWrite(6, digits[digit] & 0b01000000);
digitalWrite(7, digits[digit] & 0b00100000);
digitalWrite(8, digits[digit] & 0b00010000);
digitalWrite(2, digits[digit] & 0b00001000);
digitalWrite(3, digits[digit] & 0b00000100);
digitalWrite(5, digits[digit] & 0b00000010);
digitalWrite(4, digits[digit] & 0b00000001);

delay(1100);

digitalWrite(6, LOW);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(5, LOW);
digitalWrite(4, LOW);
}``````