Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of p2_analogin by
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); } } }