Skip to content

Instantly share code, notes, and snippets.

View manashmandal's full-sized avatar
👨‍💻
Probably Coding || ! Probably Coding

Manash Kumar Mandal manashmandal

👨‍💻
Probably Coding || ! Probably Coding
View GitHub Profile
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SerialPort.h"
using namespace std;
//String for getting the output from arduino
char output[MAX_DATA_LENGTH];
#define BAUD 9600
void setup(){
Serial.begin(BAUD);
}
void loop(){
Serial.println("Hello From Arduino");
delay(5000);
}
//This code snippet will help you to read data from arduino
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SerialPort.h"
using std::cout;
using std::endl;
#include "SerialPort.h"
SerialPort::SerialPort(char *portName)
{
this->connected = false;
this->handler = CreateFileA(static_cast<LPCSTR>(portName),
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
#ifndef SERIALPORT_H
#define SERIALPORT_H
#define ARDUINO_WAIT_TIME 2000
#define MAX_DATA_LENGTH 255
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
@manashmandal
manashmandal / corresponding_arduino.ino
Last active April 16, 2016 19:50
Processing Ketai Bluetooth Test
#include <SoftwareSerial.h>
#define RX 10
#define TX 11
#define BAUD 9600
#define L_DELAY 1000
SoftwareSerial bt(RX , TX);
void setup() {
#include "qmainwidget.h"
#include "ui_qmainwidget.h"
QMainWidget::QMainWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::QMainWidget)
{
ui->setupUi(this);
}
#ifndef QMAINWIDGET_H
#define QMAINWIDGET_H
#include <QWidget>
#include <QListWidget>
#include <QListWidgetItem>
#include <QDebug>
#include "thewidgetitem.h" //Since we want to use the "TheWidgetItem" widget as the QListWidgetItem
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QMainWidget</class>
<widget class="QWidget" name="QMainWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>459</width>
<height>329</height>
#include "thewidgetitem.h"
#include "ui_thewidgetitem.h"
TheWidgetItem::TheWidgetItem(QWidget *parent) :
QWidget(parent),
ui(new Ui::TheWidgetItem)
{
ui->setupUi(this);
}