Display sine wave on lcd

20 Apr 2018

Hello

I'm trying to create a single cycle sine wave and have it displayed inside a rectangle on the c12832 lcd (of the lpc1768). I want its phase to be controlled by an analog input, so that when the input changes, the sine wave changes accordingly.

#include "mbed.h"
#include "C12832.h"
#include "rtos.h"
#define PI 3.14159

void thread3()
{
    while(true)  {
        float phi = pot2.read();
        lcd.rect(100,0,127,20,1); //draw rect 
       ....// sine wave should be drawn inside rect
    }
}

int main()
{
// start threads
}

Any help would be appreciated! Thank you