Library for board RB3201-RBControl based on ESP32.
Library documentation.
Arduino compatible. Available on the PlatformIO.
Example
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <esp_system.h>
#include <stdio.h>
extern "C" void app_main() {
man.install();
man.setMotors()
.pwmMaxPercent(0, 70)
.pwmMaxPercent(1, 70)
.pwmMaxPercent(2, 28)
.pwmMaxPercent(3, 45)
.set();
man.leds().yellow();
int i = 0;
const auto& bat = man.battery();
while(true) {
vTaskDelay(1000 / portTICK_PERIOD_MS);
printf("Tick #%d, battery at %d%%, %dmv\n", i++, bat.pct(), bat.voltageMv());
}
}
static Manager & get()
Get manager instance.
Definition: RBControl_manager.hpp:64
Testing the library during development
When you want to test the library, when you making some change in the library, use command pio ci
in the command line/shell:
pio ci --lib="." -C "platformio.ini" examples/motors
For testing you can use any project in the folder examples
. Just replace the examples/motors
with some other project.