first commit
This commit is contained in:
commit
a5a0434432
1126 changed files with 439481 additions and 0 deletions
22
Software/CSharp/GrovePi/Sensors/GasSensorMQ2.cs
Normal file
22
Software/CSharp/GrovePi/Sensors/GasSensorMQ2.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
|
||||
namespace GrovePi.Sensors
|
||||
{
|
||||
public interface IGasSensorMQ2
|
||||
{
|
||||
int SensorValue();
|
||||
}
|
||||
|
||||
internal class GasSensorMQ2 : Sensor<IGasSensorMQ2>, IGasSensorMQ2
|
||||
{
|
||||
public GasSensorMQ2(GrovePi device, Pin pin) : base(device,pin,PinMode.Input)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int SensorValue()
|
||||
{
|
||||
return Device.AnalogRead(Pin);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue