Spark Core, First thoughts

I just got my hands on my long waited Spark Core!

It is a tiny Arduino board with a built in WiFi module. Besides that and the obvious possibilities of the Core, there is an API making it possible for the Core to talk to the internet.

Let’s say I want to check the status of the Hackerspace of Patras (0 or 1).

This simple bash script that runs on my computer does just that:


while true; do
  sleep 5
  st=$(curl -s
  echo "$st"
  if(( "$st" == "0")); then
    echo "P-Space is closed!"
    echo "P-Space is open"

curl         -d access_token=ACCESS_TOKEN_GOES_HERE -d args="$st"done

What it does is to check the status and send it to the core with a request.The most important line is the curl command. That makes the request to the core.

Let’s put some code on our Core too!

int status(String args) {
  int status;
  if(args == "1"){

  return status;

void setup() {
  Spark.function("status", status);

void loop() {


This one sets pins D6D7 as outputs and makes the function status available to the cloud!

See it in action:

That makes everything easier! No need to start an HTTP server on the arduino (you could if you wanted).

It looks amazing for a device so small! Don’t you think?

About Me

My name is Tasos Sangiotis and I work at Arpedon, an engineering company. This website is a collection of posts, essays and photos. They are mainly about travel, food and technical stuff. Occasionally I shoot photos. They are mostly on Instagram. If you choose to wander this wasteland do so with caution. Consider this your final warning. To contact me use [email protected]