Datasheet
Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
A more complex example (to add on taskFlyport.c):
#include “taskFlyport.h”
void FlyportTask()
{
const int maxBright = 37; //here we set max % of brightness
const int minBright = 2; //and here the min %
float bright = (float)maxBright;
PWMInit(1,1000,maxBright);
PWMOn(p5, 1);
while(1)
{
for (bright = maxBright; bright > minBright; bright--)
{
PWMDuty(bright, 1);
vTaskDelay(1); //used to slow down the effect
}
for (bright = minBright; bright < maxBright; bright ++)
{
PWMDuty(bright, 1);
vTaskDelay(1); //used to slow down the effect
}
}
}
For more information about PWM and its application:
http://en.wikipedia.org/wiki/Pulse-width_modulation
21










