vishal soni
Published © MIT

Star Trek's Tricorder

The Tricorder is a famous handheld scanner from Star Trek, used in the show to gather data, run scans, and analyze surroundings.

BeginnerWork in progressOver 2 days622
Star Trek's Tricorder

Things used in this project

Hardware components

ESP32
Espressif ESP32
×1
Universal PCB
×1
SparkFun RGB LED Breakout - WS2812B
SparkFun RGB LED Breakout - WS2812B
×40
Filament PETG Grey
×1
Filament PETG Transluscent
×1
Machine Screw, M2
Machine Screw, M2
×8

Software apps and online services

ESP-IDF
Espressif ESP-IDF
VS Code
Microsoft VS Code
Fusion
Autodesk Fusion

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
sand paper

Story

Read more

Custom parts and enclosures

Tricorder 3D Files

This repository contains three versions of the tricorder 3D files. Please select one.

Code

checking ws2812b led rail

C/C++
espidf code
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "led_strip.h"

#define LED_GPIO   42
#define LED_COUNT  53

extern "C" void app_main(void)
{
    led_strip_config_t strip_config = {
        LED_GPIO,
        LED_COUNT,
        LED_PIXEL_FORMAT_GRB,
        LED_MODEL_WS2812
    };

    led_strip_rmt_config_t rmt_config = {
        RMT_CLK_SRC_DEFAULT,
        10 * 1000 * 1000,   // 10 MHz
        64,
        false
    };

    led_strip_handle_t strip;
    led_strip_new_rmt_device(&strip_config, &rmt_config, &strip);

    while (true) {
        for (int i = 0; i < LED_COUNT; i++) {

            // Turn OFF all LEDs
            for (int j = 0; j < LED_COUNT; j++) {
                led_strip_set_pixel(strip, j, 0, 0, 0);
            }

            // ORANGE color (R=255, G=80, B=0)
            led_strip_set_pixel(strip, i, 255, 80, 0);

            led_strip_refresh(strip);
            vTaskDelay(pdMS_TO_TICKS(600));
        }
    }
}

Credits

vishal soni
13 projects • 16 followers
Engineer ,Electronic Enthusiast

Comments