Hello Blue Robotics Community!
We’re beyond excited to introduce you to the Navigator Library - a game-changer for all who wish to harness the full potential of the Navigator board!
Whether you’re a Python aficionado or a C++ guru, the Navigator Library is tailored for you. This library will empower you to light up LEDs, test temperatures, and sample the onboard sensors, all with simple functions!
For our Rust enthusiasts, don’t feel left out! Dive into the navigator-rs library crafted just for you.
How to use it
Check the project README for details about how to install, use and create your own project from the beginning. But here are some minimal examples:
Python
import bluerobotics_navigator as navigator
navigator.init()
# Turning on LED!
navigator.set_led(navigator.UserLed.Led1, True)
# Reading onboard temperature!
print(f"Temperature: {navigator.read_temp()}")
# Set connected RGB LED to blue
navigator.set_neopixel([[0, 0, 255]])
C++
int main() {
printf("Initializing navigator module.\n");
init();
printf("Turning on LED!\n");
set_led(UserLed::Led1, true);
printf("Temperature: %f\n", read_temp());
printf("Pressure: %f\n", read_pressure());
ADCData adc = read_adc_all();
printf("Reading ADC Channels: 1 = %f, 2 = %f, 3 = %f, 4 = %f\n",
adc.channel[0], adc.channel[1], adc.channel[2], adc.channel[3]);
Rust
fn main() {
let mut nav = Navigator::new();
println!("Setting up your navigator, ahoy!");
nav.init();
nav.set_pwm_channel_value(PwmChannel::All, 0);
println!("{:#?}", nav.fmt_debug());
}
Why a Navigator Library?
The Navigator board has huge potential, and we want to unlock the hardware capabilities for a new range of users. Whether you’re developing a new solution, interacting with your ROV hardware, or just experimenting, this library paves the way for endless possibilities. Now, you can create your own application without dealing with MAVLink messages or ArduSub firmware - your code can access the hardware directly!
We’re looking forward to the waves you make with this new library!