Pages: 1 [2]   Go Down
Author Topic: Twittering with Arduino+Ethernet Shield  (Read 2589 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh great...so it was posting twice.
Its working perfectly now.
Had to do the posting part in void loop.
Thanks for your help guys.
Logged

Chicago
Offline Offline
Full Member
***
Karma: 0
Posts: 113
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Peter
I think that after the Ardunio programs it resets and runs his code. Then he is watching it via serial monitor to debug and that is why he is double posting or tweeting that will give you a 403 since he is sending the same message. He will need to change his tweet some too since he can't keep sending the same thing.
Maybe read millis
Code:
unsigned long time;
 
time = millis();
  //prints time since program started
 client.println(time);
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh great...so it was posting twice.
Its working perfectly now.
Did the posting bit in void loop
Thanks guys for your help.
Logged

USA
Offline Offline
Full Member
***
Karma: 0
Posts: 238
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using my universities network so due to restrictions, I cannot use DHCP to automatically assign the IP hence iam doing it manually.
Ok i declared the DNS server IP:

IPAddress myDns(168, 126, 63, 1);
Ethernet.begin(mac, ip, myDns);

It gives the following result:

117.17.80.199
255.255.255.0
117.17.80.1
168.126.63.1
connecting ...
HTTP/1.0 403 Forbidden
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache
Vary: Accept-Encoding
Date: Thu, 24 Jan 2013 01:19:45 GMT
Server: Google Frontend

Error 403 - Status is a duplicate.
failed : code 403

what might be wrong now?

There maybe a problem in the future if some other computer starts using that assigned IP assigned.  It would be nice if the university would give you another IP address for your *second* computer.
Logged

Pages: 1 [2]   Go Up
Jump to: