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: 4DGL-uLCD-SE DebounceIn Motordriver PinDetect SDFileSystem mbed-rtos mbed
solenoid.h
00001 #include "mbed.h" 00002 //Solenoid Hello World 00003 //Non blocking with auto off and min off-time delay using timer interrupt and timer setup by class 00004 class Solenoid 00005 { 00006 public: 00007 Solenoid (PinName pin, float ondelay=0.5, float offdelay=2.0); 00008 void write(bool state); 00009 Solenoid& operator= (bool value); 00010 00011 private: 00012 void Solenoid_Off_Int(); 00013 DigitalOut _pin; 00014 Timeout tint; 00015 Timer offtimer; 00016 float ontime; 00017 float offtime; 00018 };
Generated on Sat Jul 16 2022 00:54:10 by
1.7.2