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.
Fork of analoghalls5 by
throttle.cpp
00001 #include "includes.h" 00002 #include "sensors.h" 00003 00004 Throttle::Throttle(PinName pin, float min, float max) { 00005 _in = new AnalogVoltageSensor(pin, 1.0f); 00006 _min = min; 00007 _max = max; 00008 } 00009 00010 float Throttle::GetThrottle() { 00011 float v = _in->GetVoltage(); 00012 return (v - _min) / (_max - _min); 00013 }
Generated on Fri Jul 15 2022 12:15:05 by
1.7.2
