hemanthjv
Newbie level 4
- Joined
- Apr 24, 2013
- Messages
- 6
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,322
Hi
I need a help to develop a C code to read data from terminal in order to convert ascii to number. Do you know or where to find the information or any suggestion?
The terminal should accept a input from the user (Example : new temperature value) and convert into integer. This integer value will be transferred across the interface (RS232 interface) to the memory.
example : the message structure -
struct memoryTag1;
typedef struct memoryTag1{
char a[10]= {'+','0','2','6','.','5','E','A','\r'}; // first five bits is the new temperature value (+26.5), two bits (euipment name- EA), carriage reurn.
char b[10]= {'-','0','2','4','.','5','E','B','\r'};
char c[8]= {'+','0','2','0','E','C','\r'};
}Memory1;
thank you in advance.
I need a help to develop a C code to read data from terminal in order to convert ascii to number. Do you know or where to find the information or any suggestion?
The terminal should accept a input from the user (Example : new temperature value) and convert into integer. This integer value will be transferred across the interface (RS232 interface) to the memory.
example : the message structure -
struct memoryTag1;
typedef struct memoryTag1{
char a[10]= {'+','0','2','6','.','5','E','A','\r'}; // first five bits is the new temperature value (+26.5), two bits (euipment name- EA), carriage reurn.
char b[10]= {'-','0','2','4','.','5','E','B','\r'};
char c[8]= {'+','0','2','0','E','C','\r'};
}Memory1;
thank you in advance.