SEU10f / Mbed 2 deprecated p3_modexy

Dependencies:   mbed

Fork of p2_analogin by Sergio Moyano

hello.cpp

Committer:
Sersd
Date:
2015-09-29
Revision:
1:21ceeb2d4501
Parent:
0:00529fca1abf

File content as of revision 1:21ceeb2d4501:

// Flash an LED while a DigitalIn is true
 
#include "mbed.h"


PwmOut pwmx(p26);
PwmOut pwmy(p21);


float pointx[] = {(0.00),(0.01),(0.02)};
float pointy[] = {(0.00),(0.02),(0.00)};

int main() {
    
 //   Matrix myMatrix(4,2);
 //   Matrix anotherMatrix;
 
    // Fill Matrix with data.
 //   myMatrix << 2  << 2  << 3
 //            << 4  << 5  << 6;
             
    pwmx.period(0.02f);  // 4 second period
    pwmy.period(0.02f); 
                
    while(1) {
       for(int i=0;i<3;i++){ 
           pwmx.pulsewidth(pointx[i]); 
           pwmy.pulsewidth(pointy[i]); 
           wait(0.02f);
        }
    }
    
    
}