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.
BrzinaVrtnje.cpp
00001 #include "BrzinaVrtnje.h" 00002 #include "mbed.h" 00003 #include "TextLCD.h" 00004 Ticker ticker1; 00005 Timer timer1; 00006 float brzina; 00007 TextLCD lcd(p19, p20, p21, p22, p23, p24); 00008 BrzinaV::BrzinaV(PinName pin1):int1(pin1) 00009 { 00010 timer1.start(); 00011 void mjerenje(); 00012 void ispis(); 00013 ticker1.attach(&ispis,1.0); 00014 int1.rise(&mjerenje); 00015 }; 00016 void mjerenje() 00017 { 00018 brzina = 2055.0/timer1.read_ms(); 00019 timer1.reset(); 00020 } 00021 00022 void ispis() 00023 { 00024 lcd.cls(); 00025 lcd.printf("Brzina: %.2f",brzina); 00026 }
Generated on Thu Sep 1 2022 12:39:44 by
1.7.2