Post Created date
curtvm wrote: I'm not sure it is realized that the values you are getting are in 1/16 of a C (0.0625). That should simplify everything. That is realized, OP is using floating...
Monday, 3 May 2021 - 08:15
MrKendo wrote: If concerned about the implementation defined behaviour possibly doing something different one day, you could do int16_t temp = safe_u16_to_s16(rawtemp); with...
Sunday, 2 May 2021 - 13:00
MrKendo wrote: Or you could put the msb and lsb into a union of uint8_t[2] and int16_t  if you don't mind having dependency on endianess. An example would be like...
Sunday, 2 May 2021 - 10:57
N.Winterbottom wrote: As always; it can be instructive to look at the implementation in Arduino Libraries: This is instructive of don't trust everything on the internet :)...
Sunday, 2 May 2021 - 10:21
OK, I think what you are doing is, in gettemp() you have rawtemp initially as an int16_t, but then that value is converted to double becuase you have defined gettemp to return...
Sunday, 2 May 2021 - 08:15
amorawala wrote: rawtemp = ds18b20_gettemp(); // function returns double temp printf("%.4X\n", rawtemp); The %X in printf expects an argument of unsigend int. You are giving it...
Saturday, 1 May 2021 - 15:45
ATmega644PA UART not working properly
KoronaSwirus wrote: Doesn't #define just replace the text in code? (Edit: sorry this is a wrong statement or is it? I'm confused now) Yes it does. So your origianal code does...
Thursday, 29 April 2021 - 20:25
Replacing small floats with integer maths
jtw_11 wrote: I get to approx 10^300 during the first pass... That would exceed the range of a 32 bit float, max is approx 10^^38. A 64 bit double is max approx 10^^308
Thursday, 15 April 2021 - 08:21
Another point not related to your original problem. Your temperature conversion (unsigned to signed) is suspect. You have the result already at this point, since temperature is...
Saturday, 10 April 2021 - 20:45
This may be a separate issue, but your use of hex2a(uint8_t*s, char*buff)is strange. s is pointer to array of uint8_t (with 8 or 9 entries by the looks of it), and you loop until...
Saturday, 10 April 2021 - 09:11
Questions regarding splitting project into multiple files !!!!
Heisen wrote:I see many times it's recommended to include .h file in it's own .c file but as I understand .h file is made for including in other .c files like main.c etc. What is...
Sunday, 4 April 2021 - 20:45
Trying to understand 32U4 USB control read: DOC 22.12
liudr wrote: So if the firmware anticipates no bulk OUT transactions on EP0   I'm a bit rusty on this, but Endpoint 0 is reserved for the default control pipe isn't it? It...
Friday, 26 March 2021 - 22:43