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: camera mbed tsi_sensor
Fork of Car2 by
main.cpp
- Committer:
- zamatthews
- Date:
- 2017-02-10
- Revision:
- 0:b761ef827157
- Child:
- 1:63c28aae78c9
File content as of revision 0:b761ef827157:
#include "mbed.h" #include "tsi_sensor.h" /* This defines will be replaced by PinNames soon */ #if defined (TARGET_KL25Z) || defined (TARGET_KL46Z) #define ELEC0 9 #define ELEC1 10 #elif defined (TARGET_KL05Z) #define ELEC0 9 #define ELEC1 8 #else #error TARGET NOT DEFINED #endif int main(void) { PwmOut led(LED_GREEN); TSIAnalogSlider tsi(ELEC0, ELEC1, 40); while (true) { led = 1.0 - tsi.readPercentage(); wait(0.1); } }