EEML<\/a> dentro del directorio LIBRARIES del PROCESSING, es la encargada del env\u00edo y recepci\u00f3n de informaci\u00f3n por internet.<\/p>\n[sourcecode language=\u00bbpy\u00bb]<\/p>\n
\/\/ Processing control pinguino+PACHUBE
\n\/\/ Walii.es pinguino.walii.es 2010
\nimport hypermedia.pinguino.*; \/\/ import library
\nint val0,val1,val2,val3,val4,val5,val6,val7;
\nPinguino board; \/\/ pinguino object
\nimport eeml.*; \/\/ librer\u00eda para env\u00edo\/recepci\u00f3n de datos a internet
\nfloat lastUpdate;
\nint myValue;
\nDataOut dOut;
\nvoid setup()
\n{
\nboard = new Pinguino( this ); \/\/ connect to Pinguino board
\n\/\/dOut = new DataOut(this, 5210);
\n\/\/si quieren hacer una prueba local descomentar
\ndOut = new DataOut(this, "SU PROPIO FEED\/feeds\/8231.xml", "nuestra clave de FEED");
\ndOut.addData(0,"light sensor, LDR, light level"); \/\/identificacion de feedID
\n}
\nvoid draw()
\n{
\nval0=board.analogRead(13); \/\/lee el puerto
\nprintln(val0); \/\/imprimer el valor en la consola
\n\/\/cada 5 segundos se hace un update de los datos
\n\/\/si la respuesta es "200" est\u00e1 todo bien
\n\/\/si la respuesta es "400" no hemos llegado a la pagina
\nif ((millis() – lastUpdate) > 5000){
\nprintln("ready to PUT: ");
\ndOut.update(0, val0);
\nint response = dOut.updatePachube();
\nprintln(response);
\nlastUpdate = millis();
\n}
\n}<\/p>\n
[\/sourcecode]<\/p>\n
LISTO, con esto tendremos transmitiendo nuestro ping\u00fcino a travez de PROCESSING, pudiendo hacerse con PYTHON o Perl, en la web de PACHUBE indica como.<\/p>\n","protected":false},"excerpt":{"rendered":"
HOla Buenos d\u00edas. Hoy tras un par de d\u00eda con PROCESSING, he visto que podemos enviar datos por red utilizando diferentes tipos de librer\u00edas, y…<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,4,6],"tags":[],"_links":{"self":[{"href":"https:\/\/pinguino.walii.es\/index.php?rest_route=\/wp\/v2\/posts\/150"}],"collection":[{"href":"https:\/\/pinguino.walii.es\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pinguino.walii.es\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pinguino.walii.es\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pinguino.walii.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=150"}],"version-history":[{"count":9,"href":"https:\/\/pinguino.walii.es\/index.php?rest_route=\/wp\/v2\/posts\/150\/revisions"}],"predecessor-version":[{"id":151,"href":"https:\/\/pinguino.walii.es\/index.php?rest_route=\/wp\/v2\/posts\/150\/revisions\/151"}],"wp:attachment":[{"href":"https:\/\/pinguino.walii.es\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pinguino.walii.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pinguino.walii.es\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}