I've been trying to set up a Lepton Thermal Camera (breakout v1.4) with a Raspberry Pi Zero W, and a Raspberry Pi 3. I've been following a number of guides but most recently this one.

Once I run

sudo ./raspberrypi_video

I get a pop up screen with black and a red square in the upper left corner. I am able to click the 'FFC' button, which causes the FLIR's shutter to close and open.

I've also tried running

sudo ./raspberrypi_overlay -a 155


sudo ./raspberrypi_capture output.png

but running either has an unresponsive result. The terminal's command line (using a flashed raspberry pi's GUI) remains empty and I have to press ctrl-c to cancel it. For example, when running sudo ./raspberrypi_capture output.png, I get the output:

spi_mode: 0
bits per word: 8
max speed: 160000000 Hz (16000 KHz)

And then it just hangs there.

Lastly, when I make and run

sudo ./raspberrypi_qt

I get the error message

Error transferring SPI packet

and an all-red popup window.

To troubleshoot these issues, I've taken out & put the Lepton camera back in to it's breakboard, experimented with which pin the CS should be in (tried #26, #24, AKA CE0, CE1), and tweaked the LeptonThread.cpp file as discussed in some answers here.

One user asked a similar question (using the same tutorial as above) and one response was that the wiring was wrong, but did not offer an alternative wiring guide. My wiring hookup is the same as in the above's walkthrough, so if it is indeed wrong, a correct wiring setup is much appreciated.

Other guides I have followed without success include: Groupgets, Google Groups, Appropedia. I have been trying to make this work with both LeptonModule (C and C++) and pylepton (Python). Any further advice or troubleshooting ideas is greatly appreciated


Your hint about trying other pin for CS helps me a lot.

The documentation say to connect CS to 26 but it works on my Raspberry3 when I connect to 24 (aka CEO instead of CE1).

Can save you hours of research and doubts...

  • 1
    I'm glad changing the CS pin worked for you. At this point, we have already stepped away from using the FLIR as we think it was an issue with the camera and will look into buying a new one when we can.
    – Henrik
    May 5 '20 at 3:50

It seems very crazy, but when I changed the jumper wires with the short ones(shortest), I did not get this error anymore

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.