Pages: [1]   Go Down
Author Topic: Interrupt running delay  (Read 611 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


i have a program that runs on the arduino , it sends a get request to a php script on a webserver which then, sends back a batch of data back to the arduino like : 12-10-2011,17:23:03,@user,#command,message

my loop starts, then waits for 15 seconds and goes and checks twitter for the last command and gets it back, if the user&command is the same as the last, dont do nothing. if its a new command or user, execute the command . for example

@bob said:  @shitake #led1 i hope it looks cool  would make my arduino know that, bob wants it to turn led1 to "on", and that the message he wants to deliver is "i hop...."

ok this works FINE.

at first i was having the get request triggered by a button. i now want to use them both together for further experimentation and extendability.

how can i implement some kind of timer, which triggers a specific function after n amount of time??

thx for reply.
« Last Edit: February 10, 2011, 02:22:36 pm by shitake » Logged

New Hampshire
Offline Offline
God Member
Karma: 17
Posts: 781
There are 10 kinds of people, those who know binary, and those who don't.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The MsTimer2 library should do what you want.

Pages: [1]   Go Up
Jump to: