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 oled_ssd1306_1-3inch
Fork of Nucleo_i2c_OLED1234 by
Revision 2:45b51e456076, committed 2017-11-02
- Comitter:
- mijimy
- Date:
- Thu Nov 02 08:16:07 2017 +0000
- Parent:
- 1:d349d4271837
- Commit message:
- RSM
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed-STM32F103C8T6.lib | Show diff for this revision Revisions of this file |
--- 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);
--- a/mbed-STM32F103C8T6.lib Sun Aug 27 06:15:47 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://mbed.org/users/hudakz/code/mbed-STM32F103C8T6/#e0edd7ea602a
