er

Dependencies:   mbed oled_ssd1306_1-3inch

Fork of Nucleo_i2c_OLED1234 by joseph chen

Revision:
2:45b51e456076
Parent:
1:d349d4271837
--- a/main.cpp	Sun Aug 27 06:15:47 2017 +0000
+++ b/main.cpp	Thu Nov 02 08:16:07 2017 +0000
@@ -1,4 +1,4 @@
-#include "stm32f103c8t6.h"
+
 #include "mbed.h"
 #include "I2C_SSD1306Z.h" 
 #include "logo.h"
@@ -6,10 +6,10 @@
 I2C i2c(I2C_SDA, I2C_SCL);
 
 
-InterruptIn speedsig(PB_4); //define and name the interrupt input
-InterruptIn rpmsig(PB_5); //define and name the interrupt input
-DigitalOut pulse(PC_13);
-DigitalOut pulse1(PB_3);
+InterruptIn speedsig(D2); //define and name the interrupt input
+InterruptIn rpmsig(D3); //define and name the interrupt input
+DigitalOut pulse(D13);
+DigitalOut pulse1(D12);
 float t_period = 0;                   // This is the period between interrupts in microseconds
 Timer t,tr;
 long timing,timingr,oldvalue,oldtiming,speed=0;
@@ -54,9 +54,7 @@
 int main()
 {
    char buffer [20];
-   confSysClock();     //Configure system clock (72MHz HSE clock, 48MHz USB clock)
-    
-    speedsig.fall(&ISR1); // attach the address of the ISR function to the
+   speedsig.fall(&ISR1); // attach the address of the ISR function to the
     speedsig.rise(&ISR2); // attach the address of the ISR function to the   
     rpmsig.rise(&ISR3); // attach the address of the ISR function to the  
     wait(0.5);