Saludos cordiales
Me encuentro sufriendo con el ejemplo que viene en la librería Ethercard de Twitter.
// Twitter client sketch for ENC28J60 based Ethernet Shield. Uses supertweet.net
// as an OAuth authentication proxy. Step by step instructions:
//
// 1. Create an account on www.supertweet.net by logging with your twitter
// credentials.
// 2. You'll be redirected to twitter to allow supertweet to post for you
// on twitter.
// 3. Back on supertweet, set a password (different than your twitter one) and
// activate your account clicking on "Make Active" link in from the table.
// 4. Wait for supertweet email to confirm your email address - won't work
// otherwise.
// 5. Encode "un:pw" in base64: "un" being your twitter username and "pw" the
// password you just set for supertweet.net. You can use this tool:
// http://tuxgraphics.org/~guido/javascript/base64-javascript.html
// 6. Paste the result as the KEY string in the code bellow.
//
// Contributed by Inouk Bourgon <contact@inouk.imap.cc>
// http://opensource.org/licenses/mit-license.php
#include <EtherCard.h>
// supertweet.net username:password in base64
#define KEY "ZXNhZmVzZW4xOjEyMzQ1Ng=="
#define API_URL "/1.1/statuses/update.json"
// ethernet interface mac address, must be unique on the LAN
byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
char website[] PROGMEM = "api.supertweet.net";
byte Ethernet::buffer[700];
Stash stash;
uint8_t runTime;
static void sendToTwitter () {
// generate two fake values as payload - by using a separate stash,
// we can determine the size of the generated message ahead of time
byte sd = stash.create();
stash.println("status=@inoukb my #Arduino tweets :-)");
stash.save();
// generate the header with payload - note that the stash size is used,
// and that a "stash descriptor" is passed in as argument using "$H"
Stash::prepare(PSTR(API_URL),website, PSTR(KEY), stash.size(), sd);
// send the packet - this also releases all stash buffers once done
ether.tcpSend();
}
void setup () {
Serial.begin(9600);
Serial.println("\n[webClient]");
if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)
Serial.println( "Failed to access Ethernet controller");
if (!ether.dhcpSetup())
Serial.println("DHCP failed");
ether.printIp("IP: ", ether.myip);
ether.printIp("GW: ", ether.gwip);
ether.printIp("DNS: ", ether.dnsip);
if (!ether.dnsLookup(website))
Serial.println("DNS failed");
ether.printIp("SRV: ", ether.hisip);
sendToTwitter();
}
void loop () {
ether.packetLoop(ether.packetReceive());
}
La key que observan es valida y corresponde al usuario esafesen1 de Twitter con clave 123456 en supertweet.net. Cuando descargo el código al Arduino veo que este se conecta a la red, encuentra el servicio de supertweet.net pero no veo los tweets.
He estado buscando mucho en Internet para ver si existen, usando la libreria Ethercard.h, otras alternativas para publicar tweets pero no las he encontrado. Todas dependen de la conexión hacia supertweet.net.
A alguien le ha servido?. Alguien podría indicarme que podría estar haciendo mal. La verdad estoy a punto de arrojar la tarjeta por la ventana y comprarme la Ethernet Shield, la cual trabaja con otro chip y la cual posee cientos de ejemplos diferentes.
Quedo al pendiente
Muchas gracias!!!!!!