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 QEI HIDScope biquadFilter MODSERIAL FXOS8700Q FastPWM
main.cpp
- Committer:
- MatthewMaat
- Date:
- 2019-09-20
- Revision:
- 11:de4a85703169
- Parent:
- 10:e1eb73e19540
- Child:
- 12:7f280a661e71
File content as of revision 11:de4a85703169:
#include "mbed.h"
//#include "HIDScope.h"
//#include "QEI.h"
#include "MODSERIAL.h"
//#include "BiQuad.h"
#include "FastPWM.h"
#include <iostream>
MODSERIAL pc(USBTX, USBRX);
PwmOut pout(A5);
AnalogIn ain(A0);
Ticker Theticker;
volatile char c='x';
volatile int color=0;
void Take_Measurement(void)
{
pc.printf("%f",ain*100.0f);
}
int main()
{
Theticker.attach(Take_Measurement,0.5);
pc.baud(115200);
pout.write(0.5);
while (true) {
wait_ms(500);
}
}
