Download picasa web albums photos automatically. This application requires mpod mother board. See also http://mbed.org/users/geodenx/notebook/mpod/

Dependencies:   BlinkLed HTTPClient EthernetInterface FatFileSystemCpp MSCFileSystem mbed-rtos mbed

Download picasa web albums photos automatically.
This application requires mpod mother board.

Picasaウェブアルバムから、自動的に写真をダウンロードして、ディジタルフォトフレームに表示します。
動作させるには mpod マザーボード が必要です。
プログラムの中で、ご自分のアルバムのRSSファイルへのURLを指定してからご利用下さい。

album description edit information description

Committer:
togayan
Date:
Tue Aug 28 14:41:17 2012 +0000
Revision:
5:66c3398a14c9
Parent:
0:dfd5cfea7112
Large RSS can be read.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
togayan 5:66c3398a14c9 1 #include "BlinkLed.h"
togayan 5:66c3398a14c9 2
togayan 5:66c3398a14c9 3 BlinkLed::BlinkLed(PinName pin, float dutyChangeStep, const char* name) :
togayan 5:66c3398a14c9 4 led(pin, name),
togayan 5:66c3398a14c9 5 dutyChangeStep(dutyChangeStep),
togayan 5:66c3398a14c9 6 continueBlink(false),
togayan 5:66c3398a14c9 7 thread(0)
togayan 5:66c3398a14c9 8 {
togayan 5:66c3398a14c9 9 }
togayan 5:66c3398a14c9 10
togayan 5:66c3398a14c9 11 BlinkLed::~BlinkLed()
togayan 5:66c3398a14c9 12 {
togayan 5:66c3398a14c9 13 }
togayan 5:66c3398a14c9 14
togayan 5:66c3398a14c9 15 void BlinkLed::startBlink()
togayan 5:66c3398a14c9 16 {
togayan 5:66c3398a14c9 17 if(continueBlink == false)
togayan 5:66c3398a14c9 18 {
togayan 5:66c3398a14c9 19 continueBlink = true;
togayan 5:66c3398a14c9 20 thread = new Thread(blink, this, osPriorityNormal, 128, NULL);
togayan 5:66c3398a14c9 21 }
togayan 5:66c3398a14c9 22 }
togayan 5:66c3398a14c9 23
togayan 5:66c3398a14c9 24 void BlinkLed::finishBlink()
togayan 5:66c3398a14c9 25 {
togayan 5:66c3398a14c9 26 if(continueBlink == true)
togayan 5:66c3398a14c9 27 {
togayan 5:66c3398a14c9 28 continueBlink = false;
togayan 5:66c3398a14c9 29 led = 0.0;
togayan 5:66c3398a14c9 30 thread->terminate();
togayan 5:66c3398a14c9 31 delete thread;
togayan 5:66c3398a14c9 32 }
togayan 5:66c3398a14c9 33 }
togayan 5:66c3398a14c9 34
togayan 5:66c3398a14c9 35 void BlinkLed::blink(void const *argument)
togayan 5:66c3398a14c9 36 {
togayan 5:66c3398a14c9 37 BlinkLed* blinkLed = (BlinkLed*)argument;
togayan 5:66c3398a14c9 38
togayan 5:66c3398a14c9 39 bool up = false;
togayan 5:66c3398a14c9 40 float brightness = 0.0;
togayan 5:66c3398a14c9 41 while (blinkLed->continueBlink == true)
togayan 5:66c3398a14c9 42 {
togayan 5:66c3398a14c9 43 if(brightness <= 0.0)
togayan 5:66c3398a14c9 44 {
togayan 5:66c3398a14c9 45 up = true;
togayan 5:66c3398a14c9 46 }
togayan 5:66c3398a14c9 47 else if(1.0 <= brightness)
togayan 5:66c3398a14c9 48 {
togayan 5:66c3398a14c9 49 up = false;
togayan 5:66c3398a14c9 50 }
togayan 5:66c3398a14c9 51
togayan 5:66c3398a14c9 52 float dutyChangeStep = blinkLed->dutyChangeStep;
togayan 5:66c3398a14c9 53 brightness += ((up)?(dutyChangeStep):(-dutyChangeStep));
togayan 5:66c3398a14c9 54 blinkLed->led = brightness;
togayan 5:66c3398a14c9 55
togayan 5:66c3398a14c9 56 Thread::wait(20);
togayan 5:66c3398a14c9 57 }
togayan 5:66c3398a14c9 58 }