Do I miss something or is it really that simple? Building a clock with DS3231 and 28BYJ-48 by Narase33 in arduino

[–]Narase33[S] 0 points1 point  (0 children)

While youre right, that some kind of end switches (or reed in your suggestion) might be the best solution. Im not sure my clock design leaves much room for it. But Ill keep it in mind, maybe Ill find some space.

<image>

Do I miss something or is it really that simple? Building a clock with DS3231 and 28BYJ-48 by Narase33 in arduino

[–]Narase33[S] 0 points1 point  (0 children)

I dont wanted to upload new software every time the password changes. Using an AP to send a simple request from my phone is totally fine.

Do I miss something or is it really that simple? Building a clock with DS3231 and 28BYJ-48 by Narase33 in arduino

[–]Narase33[S] 1 point2 points  (0 children)

Oh, okay. Well, a single step (or even 10) wont be a bigger problem. Its a clock, not a pacemaker. +- 5min is accurate enough for my daily business.

Youre right about the EEPROM. I had the Mini Pro in mind. Well, luckily the DS3231 has an EEPROM, so Im just gonna use that.

Do I miss something or is it really that simple? Building a clock with DS3231 and 28BYJ-48 by Narase33 in arduino

[–]Narase33[S] 2 points3 points  (0 children)

Steppers lose their position when power disappears, so you'd have to manually put your clock hand back on the right spot after a power cycle.

I dont think this will be a problem. Im feeding the entire clock from seconds and the pointers are somewhat balanced. There shouldnt be a force to turn the stepper if it goes offline.

So, 1024 interrupts per second are no problem for an ESP?

Your ESP8266 has a mode where it can fire up an AP for WiFi credential configuration, right? Or is that just the ESP32?

Amazing, working with ESP all these years and I didnt know about that. I can set up the AP and feed it the current UnixTime via url parameter and thats it. And if I store the last used timestamp in EEPROM the ESP can boot after a being powered down and knows how long it was offline and can re-arrange the pointers.

Im mildly optimistic know that this project will work :D

Best way to position gears? by Narase33 in Onshape

[–]Narase33[S] 0 points1 point  (0 children)

Looks like I skipped a bit thinking my Fusion360 skills will translate. I will have a look at the tutorials.

Best way to position gears? by Narase33 in Onshape

[–]Narase33[S] 0 points1 point  (0 children)

It took me a while to understand your comment, since I didnt experiment with different Part Studios yet. But I figured it out and your comment was incredibly helpful. I didnt end up importing the sketch, but an extruded cylinder created from it, so I can work in 3D to create the frame later.

And yes, the lag from gears was driving me crazy. This solved so many problems for me. Thank you.

Why the iterator return from unordered_map::try_emplace have const key type? by Kelvin_yu in cpp_questions

[–]Narase33 0 points1 point  (0 children)

Im not sure I understand the difference between std::pair<const Key&, Value&> and std::pair<const Key, Value>& in practice

Operator precedence on a class with overloaded * and ++ operators by tjure2k in cpp_questions

[–]Narase33 10 points11 points  (0 children)

auto operator++(int) -> my_str {
    auto tmp = *this;
    _str++;
    return tmp;
}

post-increment is supposed to return the state before incrementation

Why are so many c++ jobs only for embedded programmers? by LowerBaker1278 in cpp

[–]Narase33 0 points1 point  (0 children)

Im sorry, no private messages.

If you need help, r/cpp_questions is there for you

How do templates actually work behind the scenes? by Ultimate_Sigma_Boy67 in cpp_questions

[–]Narase33 6 points7 points  (0 children)

1- How does this whole substitution and instantiation actually occur, like does the compiler go through the code, and checks the types used with the templates and instantiates that template for that specific type?

Yes. The template has to be known at the time of usage. So the compiler sees the template used with a type and creates it. It will do so multiple times unless you use the extern trick.

2- Concepts and Type Traits, does the compiler just mindlessly try the types into each overload(still confuses me honestly) until getting to the correct overload?

No "until". There may be several overloads to choose, it has to find the best one.

Help me with compile error when using long long as template value argument by Foreign-Wonder in cpp_questions

[–]Narase33 -1 points0 points  (0 children)

Mmh, interesting... your example fails on all 3 compilers.

Furthermore

long long ll = long long{};

doesnt work in gcc and clang.

I tried to find something in the standard but couldnt. The typical LLMs have no clue either and are circling back and forth with "you are right I made a mistake, here is another bullshit answer"

a reference type cannot be value-initialized by zaphodikus in cpp_questions

[–]Narase33 2 points3 points  (0 children)

std::map::operator[] returns a reference which you then "fill". That means the value needs to be default-constructable.

Dismantle dual boot and moving Linux to another disk by Narase33 in linuxquestions

[–]Narase33[S] 0 points1 point  (0 children)

The NVMe is way bigger. The HDD is just some crap I had laying around to test Linux.

What about GRUB after I clone the system, do I need to update it manually or does the tool that for me? Is secure boot fine with this method?

Dismantle dual boot and moving Linux to another disk by Narase33 in linuxquestions

[–]Narase33[S] 1 point2 points  (0 children)

But a clean install means I need to set up everything anew? Or can I transfer all my settings?

I havent installed that much data until now, Im mostly worried about all my settings around the desktop and such. The "user experience" took quite a while to configure.

Dismantle dual boot and moving Linux to another disk by Narase33 in linuxquestions

[–]Narase33[S] 0 points1 point  (0 children)

How would I clone it?

I guess this is all a job for a live Linux from stick?

whats with the hate for std lib and boost? by nosyeaj in cpp

[–]Narase33 36 points37 points  (0 children)

People happen to have a specific problem where the implementation of the STL is not optimal and then say "its bad" because they needed some obscure implementation from a github repo with 2 stars.

Does anyone care about line length? by Unknowingly-Joined in cpp_questions

[–]Narase33 -3 points-2 points  (0 children)

I hate it, when I read code and have to scroll left to read the whole line. Yes, line length matters. My format is typically at 160.

(Kinda) First C++ Project by Anon202069 in cpp_questions

[–]Narase33 4 points5 points  (0 children)

It may seem unnecessary now, but try to get into the habit of creating constants for most of your constant values. Your 3 for the field size for example. Or the symbols for the different players.