Serves images taken on a FLIR Lepton connected to a Raspberry Pi SPI port to over HTTP.

go-lepton

Streams images taken on a FLIR Lepton connected to a Raspberry Pi SPI port to over via WebSockets via embedded HTTP server. It sends the raw data which is then processed as javascript.

+

Prerequisite Setup

Setup is fairly involved so it's in its dedicated SETUP.md page.

Installing

Building go-lepton on the Raspberry Pi v1 takes ~10s which is slow but still much faster than cross-compiling and transferring the file in.

go get github.com/maruel/go-lepton/cmd/lepton

Then run lepton.

Verification

Running the following command should have the corresponding output:

$ lepton -query
Status.CameraStatus: SystemReady
Status.CommandCount: 0
Serial:              0x12345
Uptime:              48m56.275s
Temperature:         30.75°C
Temperature housing: 26.34°C
Telemetry:           Enabled
TelemetryLocation:   Header
FCCMode.FFCShutterMode:          FFCShutterModeExternal
FCCMode.ShutterTempLockoutState: ShutterTempLockoutStateInactive
FCCMode.VideoFreezeDuringFFC:    Enabled
FCCMode.FFCDesired:              Enabled
FCCMode.ElapsedTimeSinceLastFFC: 48m56.285s
FCCMode.DesiredFFCPeriod:        5m0s
FCCMode.ExplicitCommandToOpen:   Disabled
FCCMode.DesiredFFCTempDelta:     3.00°K
FCCMode.ImminentDelay:           52

Performance

Reading the SPI port takes ~50% the CPU of a Raspberry Pi v1 running Raspbian. There's a rumor about DMA based transfer but for now that's the fastest that can be achieved.

Power

The FLIR Lepton takes ~150mW. The breakout board doesn't expose the necessary pins to put it in sleep mode. Sadly this means that if the Lepton goes into a bad mode, rebooting the Pi won't help.

Debug build

To debug cmd/lepton/static/root.html so that each HTTP request returns the file from disk, use:

go install -tags debug ./cmd/lepton
Owner
M-A
Mostly write state machines and manage human beings. The two are unrelated.
M-A
Similar Resources

kubetnl tunnels TCP connections from within a Kubernetes cluster to a cluster-external endpoint, e.g. to your local machine. (the perfect complement to kubectl port-forward)

kubetnl kubetnl (kube tunnel) is a command line utility to tunnel TCP connections from within a Kubernetes to a cluster-external endpoint, e.g. to you

Dec 16, 2022

Demo of skaffold's port-forwarding with ko builder (does not work)

skaffold port-forwarding : Ko builder vs docker builder When using ko builder (see folder ko/), port forwarding does not work (skaffold debug or skaff

Jan 6, 2022

Explore Docker registries and manipulate Docker images!

Explore Docker registries and manipulate Docker images!

L/S tags Utility and API to manipulate (analyze, synchronize and aggregate) images across different Docker registries. Example invocation $ lstags alp

Nov 25, 2022

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.

Packer Website: https://www.packer.io IRC: #packer-tool on Freenode Mailing list: Google Groups Packer is a tool for building identical machine images

Jan 8, 2023

k8s-image-swapper Mirror images into your own registry and swap image references automatically.

k8s-image-swapper Mirror images into your own registry and swap image references automatically.

k8s-image-swapper Mirror images into your own registry and swap image references automatically. k8s-image-swapper is a mutating webhook for Kubernetes

Dec 27, 2022

Vilicus is an open source tool that orchestrates security scans of container images(docker/oci) and centralizes all results into a database for further analysis and metrics.

Vilicus is an open source tool that orchestrates security scans of container images(docker/oci) and centralizes all results into a database for further analysis and metrics.

Vilicus Table of Contents Overview How does it work? Architecture Development Run deployment manually Usage Example of analysis Overview Vilicus is an

Dec 6, 2022

:recycle: Now you can easily rollback to previous deployed images whatever you want on k8s environment

EasyRollback EasyRollback is aim to easy rollback to previous images that deployed on k8s environment Installation You should have go installation fir

Dec 24, 2022

A Simple and Comprehensive Vulnerability Scanner for Container Images, Git Repositories and Filesystems. Suitable for CI

A Simple and Comprehensive Vulnerability Scanner for Container Images, Git Repositories and Filesystems. Suitable for CI

A Simple and Comprehensive Vulnerability Scanner for Containers and other Artifacts, Suitable for CI. Table of Contents Abstract Features Installation

Jan 1, 2023

A Kubernetes Mutating Webhook to automatically re-point pod images to mirrors

kubernetes-mimic Kubernetes Mimic is a Mutating Webhook that will watch for pod creation and update events in a Kubernetes cluster and automatically a

Nov 22, 2022
Comments
  • had to remove decimal places from a calculated array index

    had to remove decimal places from a calculated array index

    Problem: the browser's camera view was showing mostly black with a few randomly flickering scaled pixels.

    I tracked down this problem and did a quick fix by rounding the result for the 'intensity' variable which is used in a calculation for indexing the palette array. A number with non-zero digits after the decimal being used as an index resulted in 'undefined' from the palette array which was converted to '0', so black was the assigned value of the pixel(s).

    Now the images from the camera show up nicely in the browser.

A fake kube-apiserver that serves static data from files

Static KAS A fake kube-apiserver that serves static data from an Openshift must-gather. Dynamically discovers resources and supports logs. Requires go

Nov 19, 2022
An image server which automatically optimize non webp and avif images to webp and avif images

go-imageserver go-imageserver is an image server which automatically optimize no

Apr 18, 2022
Open URL in your local web browser from the SSH-connected remote environment.

opener Open URL in your local web browser from the SSH-connected remote environment. How does opener work? opener is a daemon process that runs locall

Oct 20, 2022
Network scanner for Raspberry Pi
Network scanner for Raspberry Pi

╔═╗╦═╗╔═╗╦ ╠═╣╠╦╝╠═╝║ ╩ ╩╩╚═╩ ╩ Basic network scanner for Raspberry Pi Install Note: Prebuilt binaries (32-bit) doesn't require Go. Prereq

Jun 13, 2022
Raspberry Pi Archlinux Automated Offline Installer with Wi-Fi. Windows, Mac and more features coming.
Raspberry Pi Archlinux Automated Offline Installer with Wi-Fi. Windows, Mac and more features coming.

Raspberry Pi Archlinux Automated Installer with Wi-Fi. Windows, Mac and more features coming. Download Go to releases page and download the zip file f

Nov 22, 2022
[WIP] Cheap, portable and secure NAS based on the Raspberry Pi Zero - with encryption, backups, and more

PortaDisk - Affordable Raspberry Pi Portable & Secure NAS Project Project Status: Early work in progress. web-unlock is still not ready for production

Nov 23, 2022
Go bindings for Raspberry Pi PWM library for WS281X LEDs

go-rpi-ws281x golang binding for rpi_ws281x, userspace Raspberry Pi PWM library for WS281X LEDs. Supports any Raspberry and WS2812, SK6812RGB and SK68

Dec 30, 2022
Go binding for rpi-rgb-led-matrix an excellent C++ library to control RGB LED displays with Raspberry Pi GPIO.
Go binding for rpi-rgb-led-matrix an excellent C++ library to control RGB LED displays with Raspberry Pi GPIO.

go-rpi-rgb-led-matrix Go binding for rpi-rgb-led-matrix an excellent C++ library to control RGB LED displays with Raspberry Pi GPIO. This library incl

Dec 30, 2022
Turn your Go program(s) into an appliance running on the Raspberry Pi 3 or 4 (or on amd64 PCs!)

Overview gokrazy packs your Go application(s) into an SD card image for the Raspberry Pi 3 or 4 which — aside from the Linux kernel and proprietary Ra

Jan 3, 2023
HTTP load testing tool and library. It's over 9000!
HTTP load testing tool and library. It's over 9000!

Vegeta Vegeta is a versatile HTTP load testing tool built out of a need to drill HTTP services with a constant request rate. It can be used both as a

Dec 30, 2022