sdf
Dependencies: mbed C12832 Servo RangeFinder Pulse
moistureSensor/MoistureSensor.cpp
- Committer:
- asimelfadil
- Date:
- 2022-02-23
- Revision:
- 0:4db5f0f5faa0
File content as of revision 0:4db5f0f5faa0:
#include <mbed.h> #include <MoistureSensor.h> moisture_sensor::moisture_sensor(PinName pin) : _pin(pin) { // _pin(pin) means pass pin to the AnalogIn constructor } moisture_sensor::~moisture_sensor () { } float moisture_sensor::read() { //read moisture sensor return _pin.read(); } /* float moisture_sensor:getCurrentmoisture_sensor() { currentMoistureSensor = Moisturelevelreading.read() return Moisture_Sensorreading; } */