General area when it fits no where else

Moderator: Mmiscool

User avatar
By Nick McBride
#35775 I'm trying to use the SENDTS function to send ThingSpeak a floating point number (a temperature value actually)

When I do this: SENDTS("APIKEYHERE",1,tempF), the data doesn't get logged on ThingSpeak. But, when I use SENDTS("APIKEYHERE",1,"1"), the value does get logged (as it's a hard coded string). Is there a way to convert an integer to a string so this value can be sent? I also tried this: SENDTS("APIKEYHERE",1,"'" & tempF & "'"), but no dice.
User avatar
By Mmiscool
#35814 Can you let the full code. It should be working with vatlriables for any functions parameter.
User avatar
By Jokkepappa
#35819 Funny enough for me when i tried yesterday:
Code: Select alltemp 0 curr
    SENDTS(APIKEY,1,curr)

Worked perfectly but then
Code: Select allSENDTS(APIKEY,2,"1")


Did not. But i think in my case, as i tried to send them quickly eachother ThingSpeak api did not record it because there is time limit that you can only upload data every 15sec.
User avatar
By Nick McBride
#35903 I'm using the Themometer example from the BASIC website, but here's my modification for the [refresh] subroutine with trying to send the data to ThingSpeak.


[refresh]
tempF = 0
temp 0 curr
let tempF = curr * 1.8
let tempF = tempF + 32
SERIALPRINTLN tempF
SENDTS("6DWOBDYDGIPQP4AC",1,tempF)
if tempF < setp then goto [on2] else goto [off2]
Wait


The result on the thingspeak side is NAN.

If I use:
bla = "api.thingspeak.com/update?key=6DWOBDYDGIPQP4AC&field1=" & tempF
print wget(bla)
cls

This works fine.