Back to

Use Arduino as device

Hi all,
is there any guide that describes how to use a standard Arduino (plus Eth Shield or an Arduino YUN) instead of the SCK?

Hi @pitusso,
The SmartCitizen GITHUB site ( has most of what you’ll need, but since I haven’t built one from scratch, I’m not sure if it has everything. The SCK 1.0 was based on the Arduino Leonardo, and the SCK 1.1 on the Arduino Lilypad. I don’t have enough experience using the Arduino IDE ( to know what the difference is, but but I’m guessing that there is one, and it will be slightly different from an UNO or YUN as well.

Thanks @rohwer for your reply.
I already looked at the source code posted in the github repo, and it’s optimized for the specific hw.

I think that a simple example (here: on how to POST data using API, should be enought.
Is there documentation about that?


I’m not sure I understand your question. If you’re trying to visualize the date on another platform, check out this forum discution: Sorry if this isn’t what your looking for.

maybe i didn’t explain well what i mean!
In the API page, there are a lot of example on how to retrieve data from SmartCitizen.
I wonder how i can post data in SmartCitizen using API instead.

Sorry, but that’s beyond my level of programming knowledge. @aitoraloa or @mdeheras might know which bits of code you can use or if you will need to write new code from scratch.

Hi and thanks.
It’s not a problem for me write code, but i’d like to have an example of the API post!

E.g.: with this url i can retrieve the latest data:
and output format is in json.
Which url to use to post data?

This is the best I can find to answer your question:

I found it at: , toward the bottom of the code (Line 215).

// Basic Server Posts to the SmartCitizen Platform - EndPoint:
static char* WEB[8]={”,
"PUT /add HTTP/1.1
"User-Agent: SmartCitizen
"X-SmartCitizenMacADDR: ",
"X-SmartCitizenApiKey: ",
"X-SmartCitizenVersion: ",
"X-SmartCitizenData: "};

@rohwer it seems exactly what i need to start!
Thanks a lot

@rohwer i found also this thread:
that is very helpful on what i’m doing.
I’m testing the api post using curl indeed.