Close

Hackaday API

A project log for LAMEBOY - another ESP12 handheld

fully portable ESP12 project with battery charging and power muxing

davedarkodavedarko 08/31/2017 at 21:222 Comments

I've played around with the #Hackaday API to show me my likes. Yes, I'm one of those guys - I even noticed that it isn't the same like you can see on my profile page, since there the page likes are calculated in as well (bug is reported though).

At first I tried ArduinoJSON to extract the data, but then returned to char arrays and some brain-fu. Well some Strings are in as well, so it's not beautiful but get's results!

const char* skw = "skulls\":";
  int counter = 0;
  while (
    client.available() &&
    counter != 8
  ) {
    char json = client.read();
    if (json == skw[counter])
    {
      counter++;
    }
    else counter=0;
  }
  String skulls = client.readStringUntil(',');

Discussions

oshpark wrote 09/01/2017 at 01:54 point

1337 is not too far away ;)

  Are you sure? yes | no

davedarko wrote 09/01/2017 at 07:56 point

next goal is 1111, since I'm a child of November :)

  Are you sure? yes | no