Étape 4: logiciels
Pseudo-code :
Set up HTTP connection set up serial port Get the HTML of the list of tweets Extract the contents of the title tags and store in an array loop { await a serial message if "status" { if >3 minutes have elapsed since last request { reset twitter request timer get the HTML list of tweets for each tweet in the new list { if it is not the same as the first tweet on the current list, add it to the beginning of the list } } If there are new tweets write "T" and the number of new tweets else write "t" } if "tweet" { if there are new tweets { write the first tweet in the list } else { write the next tweet in the list, or return to the first if we have reached the end } } }
Encore une fois, mon code source est en désordre, douteuse conçu et mal commenté, donc j’ai le joint comme un fichier texte. Il ne fonctionne pas sauf si vous installez les bibliothèques appropriées (LWP::UserAgent et Win32::SerialPort, je crois), et je ne me souviens même pas comment je les ai installé. YMMV.