el transfer para los circuitos diy 2016-03-25 19:07 GMT-05:00 Miguel Vargas <[email protected]>:
> como era el asunto con hacer el transfer y papel fotosensible?.... uber > podria enviarnos info por este lado?... mil gracias.... > > hoy estuve en plan semana santa... pero sabado hay camello? > > 2016-03-25 17:09 GMT-05:00 brolin <[email protected]>: > >> Hola, >> >> estuvimos trabajando con Uber en estos días pillando cómo se hace un post >> a un API. Lo estábamos intentando con ubidots. >> >> Este curl : curl -XPOST -H 'Content-Type: application/json;' -H >> 'X-Auth-Token: AUTH_TOKEN' -d '{"value": 23}' >> http://things.ubidots.com/api/v1.6/variables/ID_VARIABLE/values >> >> en arduino se escribe así: >> >> String url = "http://things.ubidots.com/api/v1.6/variables/" ID_VARIABLE >> "/values"; >> http.begin(url); >> http.addHeader("Content-Type", "application/json"); >> http.addHeader("X-Auth-Token", AUTH_TOKEN); >> int content_length =0; >> String payload = String("{ \"value\": " + String(millis()/1000) + "}"); >> //content_length = payload.length(); >> //http.addHeader("Content-Length ", String(content_length)); >> int httpCode = http.POST(payload); >> if(httpCode > 0) { >> String payload = http.getString(); >> Serial.println(payload); >> } >> else { >> Serial.print("[HTTP] failed, error: >> ");Serial.println(http.errorToString(httpCode).c_str()); >> } >> http.end(); >> >> El código se subió acá https://github.com/unloquer/postUbidots/ >> >> Por otro lado Uber diseñó unas tarjeticas para el ESP, un nodemcu local :D >> Hay que mandarlas a hacer a colcircuitos >> >> >> Saludos, >> - >> b >> >> _______________________________________________ >> unloquer mailing list >> [email protected] >> https://lists.aktivix.org/mailman/listinfo/unloquer >> >> >
_______________________________________________ unloquer mailing list [email protected] https://lists.aktivix.org/mailman/listinfo/unloquer

