PGD Home

Project 136: Thermal Imager Project Update 7: FLIR Lepton + Arduino Due Integration Part 2

by on Sep.22, 2015, under Inventions, Tutorials

I have made some progress with the integration of the Lepton Module wth the Arduino Due. I found out that I was wiring Sda and Scl to the wrong pins of the Due board, I should have had them wired to Pinds 20 and 21, and I was wiring them to the “SCL1” and “SDA1” pins.

I can now get the Serial numbers and setup information out of the lepton, such as:

beginTransmission
reg:2==0x6 binary:110
SYS Camera Customer Serial Number
reg:2==0x7 binary:111
busy
reg:2==0x6 binary:110
reg:6==0x20 binary:100000
payload_length=32
FFFFFF7E
FFFFB57F
5D5E
5CFD
FFFFF4D7
FFFFD7EB
FFFF96F5
7D47
FFFFDCD7
7570
55F9
7CFF
5CFF
FFFFDEEB
3D94
FFFFD55C
SYS Flir Serial Number
reg:2==0x7 binary:111
busy
reg:2==0x6 binary:110
reg:6==0x8 binary:1000
payload_length=8
FFFFF017

However I am still getting garbled data over the SPI bus. I can’t seem to get it to work at all, no matter what I try. Is there anything obvious that I could be missing here?

In an attempt to make my code as simple as possible, I created this sketch:

#include “SPI.h”;

int data[164];

void setup()
{
Serial.begin(9600);

pinMode(10, OUTPUT);

SPI.setDataMode(SPI_MODE3);
SPI.setClockDivider(0);
SPI.begin();

Serial.println(“setup complete”);
delay(1000);

for (int i = 0; i < 164; i++) {
digitalWrite(10, LOW);
int response1 = SPI.transfer(0xFF);
data[i] = response1;
digitalWrite(10, HIGH);

}

for (int i = 0; i < 164; i++) {
int response1 = data[i];
Serial.print(i);
Serial.print(” “);
Serial.println(response1);
}
}

void loop()
{
}

But I am just getting a string of mostly 0’s, with some other numbers in there.

I am making progress, I aim to have a simple thermal scanner prototype working this week.

The images below are of the FLIR Lepton Camera, and the camera wired up (correctly, as far as I know) to the Due.

 

 

DSC_0685 DSC_0695 DSC_0693

Facebooktwitterredditpinterestlinkedinmail

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!