WORKING WITH HEXADECIMAL ADDRESSES
i working on data logger temperature measurement using 1 wire ic , 1 wire arduino library . working ok having difficulty programming hexadecimal address ic uses follows.:
1. wish declare following ic component address hex constant 28 b0 fe e 2 0 0 47
2. 1 wire examples suggest should declare constant follows
uint_8 insidethermometer[8]; with assignment statment :
insidethermometer = { 0x28, 0xb0, 0xfe, 0xe, 0x2, 0x0, 0x0, 0x47 };
i doing stupid keep getting warning , " error: expecting primary expression before '{' token", when compile program.
could help
john
1. wish declare following ic component address hex constant 28 b0 fe e 2 0 0 47
2. 1 wire examples suggest should declare constant follows
uint_8 insidethermometer[8]; with assignment statment :
insidethermometer = { 0x28, 0xb0, 0xfe, 0xe, 0x2, 0x0, 0x0, 0x47 };
i doing stupid keep getting warning , " error: expecting primary expression before '{' token", when compile program.
could help
john
when declaration , assignment combined in 1 statement, {} syntax works:
uint_8 insidethermometer[8] = { 0x28, 0xb0, 0xfe, 0xe, 0x2, 0x0, 0x0, 0x47 };
if declaration , assignment separate statements, individual elements of array need set. {} format can not used set multiple values.
uint_8 insidethermometer[8] = { 0x28, 0xb0, 0xfe, 0xe, 0x2, 0x0, 0x0, 0x47 };
if declaration , assignment separate statements, individual elements of array need set. {} format can not used set multiple values.
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > WORKING WITH HEXADECIMAL ADDRESSES
arduino
Comments
Post a Comment