- Notifications
You must be signed in to change notification settings - Fork0
Library implementing the RBController protocol by RoboticsBrno.
License
NotificationsYou must be signed in to change notification settings
RoboticsBrno/RB3201-RBProtocol-library
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A library faciliating communication with RbController Android app:https://play.google.com/store/apps/details?id=com.tassadar.rbcontroller
#include<esp_log.h>#include<lwip/sockets.h>#include<string.h>#include<freertos/FreeRTOS.h>#include<freertos/task.h>#include<esp_system.h>#include"rbprotocol.h"#include"rbwebserver.h"voidonPktReceived(const std::string& command, rbjson::Object *pkt) {if(command =="joy") {printf("Joy:"); rbjson::Array *data = pkt->getArray("data");for(size_t i =0; i < data->size(); ++i) { rbjson::Object *ax = data->getObject(i);printf("#%d %6lld %6lld |", i, ax->getInt("x"), ax->getInt("y")); }printf("\r"); }elseif(command =="fire") {printf("\n\nFIRE THE MISSILESS\n\n"); }}extern"C"voidapp_main() {// Create web server, serves static files from the spiffs memoryrb_web_start(80); rb::Protocolprot("Foo","Bar","The very best bar", &onPktReceived); prot.start();printf("Hello world!\n");int i =0;while(true) {vTaskDelay(1000 / portTICK_PERIOD_MS);if(prot.is_possessed()) { prot.send_log("Tick #%d\n", i++); } }}
About
Library implementing the RBController protocol by RoboticsBrno.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.