Compare commits
2 commits
f469f012f8
...
82d7ab5e6f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82d7ab5e6f | ||
|
|
97dc1dbaa7 |
|
|
@ -16,10 +16,10 @@ namespace Proculite.GpioRest.Controllers
|
|||
[HttpGet("pin-value/{pinNumber}")]
|
||||
public IActionResult PinValue(int pinNumber)
|
||||
{
|
||||
if(!ModelState.IsValid)
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest();
|
||||
|
||||
return Ok(_gpioService.CurrentPinValue(pinNumber));
|
||||
|
||||
return Ok(_gpioService.CurrentPinValue(pinNumber).ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ namespace Proculite.GpioRest.Services
|
|||
}
|
||||
|
||||
_gpioController.OpenPin(pin, pinMode, PinValue.Low);
|
||||
Thread.Sleep(200);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue