mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
re-orginasation
This commit is contained in:
@@ -1,18 +1,28 @@
|
|||||||
#include "CKobuki.h"
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include "graph.h"
|
#include "KobukiDriver/graph.h"
|
||||||
|
#include "MQTT/MqttClient.h"
|
||||||
|
#include "KobukiDriver/CKobuki.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
CKobuki robot;
|
CKobuki robot;
|
||||||
int movement();
|
int movement();
|
||||||
int checkCenterCliff();
|
int checkCenterCliff();
|
||||||
|
|
||||||
int main()
|
void setup(){
|
||||||
{
|
|
||||||
unsigned char *null_ptr(0);
|
unsigned char *null_ptr(0);
|
||||||
robot.startCommunication("/dev/ttyUSB0", true, null_ptr);
|
robot.startCommunication("/dev/ttyUSB0", true, null_ptr);
|
||||||
|
MqttClient client("mqtt://localhost:1883", "raspberry_pi_client", "ishak", "kobuki");
|
||||||
|
client.connect();
|
||||||
|
client.subscribe("home/commands");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
|
||||||
// thread mv(movement);
|
// thread mv(movement);
|
||||||
// mv.join(); //only exit once thread one is done running
|
// mv.join(); //only exit once thread one is done running
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user