NOT Procedure to send CPM value to radmon

More
4 years 9 months ago - 4 years 9 months ago #4499 by mw0uzo
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
Last edit: 4 years 9 months ago by mw0uzo.

Please Log in or Create an account to join the conversation.

Moderators: Gamma-Man
Time to create page: 0.110 seconds
Powered by Kunena Forum
Everything's free. Please support us by considering a donation. Log in first!
Solar powered Raspberry Pi 4 server stats: CPU 46% Memory 13% Swap 16% CPU temp=55.5'C Uptime 47 Days