Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "mainwindow.h"
- #include "ui_mainwindow.h"
- #include<wiringPi.h>
- MainWindow::MainWindow(QWidget *parent) :
- QMainWindow(parent),
- ui(new Ui::MainWindow)
- {
- ui->setupUi(this);
- wiringPiSetup();
- pinMode(0,OUTPUT);
- }
- MainWindow::~MainWindow()
- {
- delete ui;
- }
- void MainWindow::on_pushButton_clicked()
- {
- static bool state=false;
- digitalWrite(0,state);
- state=~state;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement