Thanks to Zoltan Hudak publish the way to use STM32F103c8t6 on mbed. Now, this example can let you use it with a encoder.

Dependencies:   QEI mbed-STM32F103C8T6 mbed

Fork of STM32F103C8T6_Hello by Zoltan Hudak

main.cpp

Committer:
hudakz
Date:
2016-07-02
Revision:
3:c6a589f444b9
Parent:
1:1dd12d8c840d
Child:
4:a81f44fc487e

File content as of revision 3:c6a589f444b9:

#include "PinNames.h"   // Pin name definitions for the STM32F103C8T6 board
#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        // The on-board LED is connected to pin PC_13 and, via a resistor, to +3V3. 
        // So to turn the LED on or off we have to set it to 0 or 1 respectively
        myled = 0; // turn the LED on
        wait(0.2); // 200 ms
        myled = 1; // turn the LED off
        wait(1.0); // 1 sec
    }
}