# Navigator Library!

**URL:** <https://discuss.bluerobotics.com/t/navigator-library/14838>\
**Category:** BlueOS\
**Tags:** news, raspberry, navigator\
**Created:** [August 7, 2023, 7:08pm UTC](https://discuss.bluerobotics.com/t/navigator-library/14838 "2023-08-07T19:08:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [August 7, 2023, 7:08pm UTC](https://discuss.bluerobotics.com/t/navigator-library/14838/1 "2023-08-07T19:08:08Z")

</div>

Hello Blue Robotics Community! 👋

We’re beyond excited to introduce you to the [**Navigator Library**](https://github.com/bluerobotics/navigator-lib) - a game-changer for all who wish to harness the full potential of the [Navigator](https://bluerobotics.com/store/comm-control-power/control/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](https://github.com/bluerobotics/navigator-rs) crafted just for you.

# 🚀 How to use it

Check the project [README](https://github.com/bluerobotics/navigator-lib#readme) for details about how to install, use and create your own project from the beginning. But here are some minimal examples:

### 🐍 Python

```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++

```cpp
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

```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! 🌊

---

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [August 7, 2023, 7:08pm UTC](https://discuss.bluerobotics.com/t/navigator-library/14838/2 "2023-08-07T19:08:17Z")

</div>

Unlisted on August 7, 2023, 7:08pm UTC



---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [August 8, 2023, 4:17am UTC](https://discuss.bluerobotics.com/t/navigator-library/14838/3 "2023-08-08T04:17:03Z")

</div>

Listed on August 8, 2023, 4:17am UTC



---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [August 8, 2023, 4:19am UTC](https://discuss.bluerobotics.com/t/navigator-library/14838/4 "2023-08-08T04:19:04Z")

</div>

Pinned on August 8, 2023, 4:19am UTC


