Navigator Developer Guide

The Navigator Library and Navigator Web Assistant

Hello Blue Robotics Community!

We’re beyond excited to introduce you to the Navigator Library and Navigator Web Assistant—game-changers for all who wish to harness the full potential of the Navigator Flight Controller.

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.

Navigator Web Assistant is a web server that enables using the Navigator hardware with web technologies. You can run it directly on the Raspberry Pi and control your hardware from a web page, or create your own application using REST APIs and WebSockets.

Using the Navigator Library

Check the project README for details about how to install, use and create your own project from the beginning. Here are some quick 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());
}

Using Navigator Web Assistant

The easiest way to try Navigator Web Assistant is by installing its BlueOS Extension from the BlueOS Extensions manager. Please check out this post and the GitHub project page for more information and examples.

Why the Navigator

The Navigator Flight Controller 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, these tools pave 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!🌊