Hello,
Im trying to make Roblox and Arduino talk to each other, i made series of atempst but failed…
Now i will use ThingSpeak as web server to send data.
How do i send data to ThingSpeak with HTTP service???
Can i send text data or just analog values to decode later?
Hello again,
This is helping a bit, i can send any data i want and that is good, i dont have to use A/D converter,
but still im not best into HTTP service… Can you make some exmalple for me? Im trying to send text values (i have loop that reads data from table so its like
1 Wood
1 24
2 Sand
2 5
3 Iron
3 20)
for index, v in pairs(database2) do
print(index,v)
end
local HttpService = game:GetService("HttpService")
local dataFields = {
["api_key"] = "FILL THIS WITH YOUR API KEY";
["Wood"] = 52;
["Sand"] = 43;
}
dataFields = HttpService:JsonEncode(dataFields)
-- Make the request
local response = HttpService:PostAsync("https://api.thingspeak.com/update.json", data, Enum.HttpContentType.ApplicationUrlEncoded, false)
local HttpService = game:GetService("HttpService")
local dataFields = {
["api_key"] = "FILL THIS WITH YOUR API KEY";
["Wood"] = 52;
["Sand"] = 43;
}
dataFields = HttpService:JsonEncode(dataFields)
-- Make the request
local response = HttpService:PostAsync("https://api.thingspeak.com/update.json", data, Enum.HttpContentType.ApplicationJson, false)
local HttpService = game:GetService("HttpService")
local dataFields = {
["api_key"] = "FILL THIS WITH YOUR API KEY";
["Wood"] = 52;
["Sand"] = 43;
}
local data = HttpService:JSONEncode(dataFields)
-- Make the request
local response = HttpService:PostAsync("https://api.thingspeak.com/update.json", data, Enum.HttpContentType.ApplicationJson, false)
ok im confused right now, what should we add?
go to https:// thingspeak. com/channels /1176993/ to see what im talking about, and remove spaces, i just added them for fast reply
so if you can see im trying to send some data there but none appears,
should i try
“field1”: FIELD1_VALUE,
“field2”: FIELD2_VALUE,
“field3”: FIELD3_VALUE,
“field4”: FIELD4_VALUE,