Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Speed(void) {
- duration = pulseInLong(Pomiar_Predkosci, LOW); //pomiar czasu 1 obrotu koła w us
- if (duration > 1000) {
- lok++;
- czas_e = czas_e + duration;
- }
- count = 36 * duration / 10000; //przeliczenie czasu na godzinę(skrócona zależność)
- count1 = 1000 * d_kola / count; //obliczenie prędkosci w km/h
- sprintf(m_str, "%d", count1); //konwersja liczby do char (stringu)
- m1_str = String(m_str); //zamiana char na string
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement