arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Battery LED w/ Teensy LC

[WIP]

hashtag
Introduction

This "Project Guide" is written to show some of the capabilites of NavQ. In conjunction with a Teensy LC and a strip of WS2812B LEDs, you can add a forward-facing battery indicator light to your drone.

The battery on my drone is quite low!

hashtag
Prerequisites

hashtag
Software

The software needed to run this project on your NavQ is as follows:

  1. ROS Noetic

  2. MAVROS

You can install this software using the guides here:

hashtag
Hardware

The hardware needed is the same as the hardware from the I2C guide here:

hashtag
Code

At the moment, we're just going to paste the code here, and a more detailed guide will be written later.

hashtag
Teensy code

This code should be uploaded to the Teensy using the Arduino IDE.

hashtag
NavQ code

The ROS node should be placed in the home folder ('/home/navq/')

The service file should be located in /etc/systemd/system/.

The Launch script should be located in /usr/local/bin/.

hashtag
Making the ROS node run on boot

Once all of the necessary files are placed in their respective directories, you need to make the systemd service run at boot. To do this, run in the terminal:

ROS1chevron-right
Controlling your drone from NavQ using MAVROSchevron-right
I2Cchevron-right
file-archive
789B
batt_led.zip
archive
arrow-up-right-from-squareOpen
Teensy batt_led code
file-download
951B
batt_led.py
arrow-up-right-from-squareOpen
ROS node
file-download
157B
batt_led.service
arrow-up-right-from-squareOpen
"systemd" service file
file-download
223B
batt_led.sh
arrow-up-right-from-squareOpen
Launch script
$ sudo systemctl enable batt_led