NOT Procedure to send CPM value to radmon

More
3 years 3 weeks ago - 3 years 3 weeks 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: 3 years 3 weeks ago by mw0uzo.

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

Time to create page: 0.108 seconds
Powered by Kunena Forum
Solar powered Raspberry Pi 4 server stats: CPU 34% Memory 15% Swap 18% CPU temp=69.1'C Uptime 63 Days