NOT Procedure to send CPM value to radmon
5 years 3 months ago - 5 years 3 months ago #4499
by mw0uzo
Replied by mw0uzo on topic NOT Procedure to send CPM value to radmon
The problem is in the conversion from char* arrays and int to string conversions.
C is not like higher level languages. You need to convert types carefully and provide the right pointers to data etc.
Replace all lines with hard coded strings to see if it works to send a value of 20CPM to radmon. Once that is confirmed working...
Then slowly bring in your converted values. E.g. use itoa() or String types to convert from integers to string. Look up Arduino string and integer conversions and how to pass the results around in functions. It is not completely straightforward as you have complete control over what is actually happening in the conversion process. You may have to provide a buffer to do the conversion in and pass the address of that buffer in functions.
I'm a bit rusty on C due to not having programmed in it for a while - I have done all this before, but I do not remember in detail these things unless they're important to current work. These hints should get you going
It would also be wise to get the generation of the HTTP request dumped out to the serial monitor so you can see exactly what is happening in the conversion processes and what is being sent to radmon.org
C is not like higher level languages. You need to convert types carefully and provide the right pointers to data etc.
Replace all lines with hard coded strings to see if it works to send a value of 20CPM to radmon. Once that is confirmed working...
Then slowly bring in your converted values. E.g. use itoa() or String types to convert from integers to string. Look up Arduino string and integer conversions and how to pass the results around in functions. It is not completely straightforward as you have complete control over what is actually happening in the conversion process. You may have to provide a buffer to do the conversion in and pass the address of that buffer in functions.
I'm a bit rusty on C due to not having programmed in it for a while - I have done all this before, but I do not remember in detail these things unless they're important to current work. These hints should get you going
It would also be wise to get the generation of the HTTP request dumped out to the serial monitor so you can see exactly what is happening in the conversion processes and what is being sent to radmon.org
Last edit: 5 years 3 months ago by mw0uzo.
Please Log in or Create an account to join the conversation.
Moderators: Gamma-Man
Time to create page: 0.241 seconds