Convert byte to float format

Hi every one
Do you want to be helpful with the following.
Convert two byte float format.

How I Convert float two byte format, see below:
byte * minute,
byte * hour,
byte * dayOfWeek,
byte * dayOfMonth,
byte * month,
byte * year)

Has attached “DS3231 Clock”!

Want to help with a code which inserted in the DS3231 Clock.

DS3231-CLOCK.ino (2.93 KB)

What is "two byte float format"?

Hi jremington
Convert from byte to float format.

I am very bad at English
Hope you can see what I mean now;-)

Hello

Info:

When DS3231 Clock has information byte format for ouput. year month; day; hour; minute;

But I want to use variables as float format. 5 on the following variables. float year float month; float day; float hour; float minute;

To convert a number from a byte value to a float value, use "=":

   byte x=13;
   float y=x;

But unless you are doing something like astronomical calculations, there is no reason to do that.

Hi jremington Is it real only what needs to be done? I'm also really new in the use Arduino I've tried many codes eksemple from Ardino, they were all very complicated.

Thank you very much. GO / weekendt

Hi jremington

byte x = minute; float minute = x;

Where do I DECLARE / setup byte and float in coderne DS3231?

Is it real only what needs to be done?

Tell us [u]what problem you actually want to solve[/u], not how [u]you think[/u] the problem should be solved.

In other words, what are you really trying to do?

Hi jremington How to insert coderne in DS3231

What is a "coderne"?

If you want to set the time, date or alarm times on the DS3231, use the appropriate library routine. None of that information is floating point, just single bytes of data.

One example: https://learn.adafruit.com/adafruit-ds3231-precision-rtc-breakout/wiring-and-test

In the C language you can use "casting" to convert data types. For example, "(float) x" changes x of any data type to a float. In the Arduino language, you can use "float( x)" to convert any data type to a float. There is a built in function float() that does this. Some think that the Arduino language is C. It is not.

Hi charlie sixpack Many, many thanks for you explanation. Will try to work with yor suggestions! I am very new to Arduino and can see that can be done many projects. I just want to try to learn how to use Arduino to my projects.

Good weekend Monie