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: X_NUCLEO_IKA01A1 mbed
main.cpp
- Committer:
- hemddabral
- Date:
- 2016-03-17
- Revision:
- 0:d37da39974bc
- Child:
- 1:11bd651c65b7
File content as of revision 0:d37da39974bc:
#include "mbed.h" #include "x_nucleo_ika01a1_class.h" Serial pc(USBTX, USBRX); DigitalOut myled(LED1); int main() { X_NUCLEO_IKA01A1 *analog_expansion_board = X_NUCLEO_IKA01A1::Instance(); analog_expansion_board->Init(); TSV734 *led_Driver = analog_expansion_board->tsv734; led_Driver->Configure(1000); float dutyCycle_us = 0; while(1) { pc.printf("\nwhile loop\n"); dutyCycle_us += 10; pc.printf("\nLED Driver: duty cycle: %u percent \n", led_Driver->SetDutyCycle(dutyCycle_us)); if(dutyCycle_us>=100) dutyCycle_us -= 100; myled = !myled; wait(1); } }