This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
qEcho/source/led.cpp

23 lines
258 B
C++
Raw Permalink Normal View History

#include "led.h"
#include <wiringPi.h>
#include <iostream>
Led::Led(unsigned int pin)
: m_pin(pin)
{
wiringPiSetup();
pinMode(m_pin, OUTPUT);
}
void Led::on() const
{
digitalWrite(m_pin, HIGH);
}
void Led::off() const
{
digitalWrite(m_pin, LOW);
}