Giter Site home page Giter Site logo

uhr.ino about rheinturm HOT 3 CLOSED

FROGGS avatar FROGGS commented on July 26, 2024
uhr.ino

from rheinturm.

Comments (3)

MueThoS76 avatar MueThoS76 commented on July 26, 2024

Der erste Teil ist umgesetzt.
Beim zweiten habe ich zwar den code gekürzt ich verstehe nicht warum ich das unsigned short rein machen soll.

aktuell ist es so:

sekunden.einer  = timeinfo.tm_sec  % 10;
sekunden.zehner = timeinfo.tm_sec  / 10;
minuten.einer   = timeinfo.tm_min  % 10;
minuten.zehner  = timeinfo.tm_min  / 10;
stunden.einer   = timeinfo.tm_hour % 10;
stunden.zehner  = timeinfo.tm_hour / 10;

Und das macht auch was es soll.

Rheinturm/Rheinturm.ino

Lines 22 to 25 in 0af6f29

struct ziffern {
byte einer;
byte zehner;
} sekunden, minuten, stunden;

Ich weiß nicht mehr warum ich da das byte gemacht habe

from rheinturm.

FROGGS avatar FROGGS commented on July 26, 2024

Ein expliziter Cast ist besser als ein impliziter, weil du dann im Code siehst was passiert. Sonst siehst du ja garnicht dass er "abrundet".

from rheinturm.

MueThoS76 avatar MueThoS76 commented on July 26, 2024

Ich habe es eingebaut

from rheinturm.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.