Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Lepton 3.5 #6

Open
brycheiniog opened this issue Oct 31, 2018 · 2 comments
Open

Support for Lepton 3.5 #6

brycheiniog opened this issue Oct 31, 2018 · 2 comments

Comments

@brycheiniog
Copy link

Hi,

Has this been tried with a Lepton 3.5 sensor? I have the library working nicely on a Pi 3 Model B with a Lepton 2.5 sensor, but with the 3.5 sensor I just get repeated connect/disconnect messages. The sensor works fine in a PureThermal2 board. This is the quick test code I threw together to illustrate the problem:

        LeptonCamera cam;
	cam.start();
	printf("Dimensions: %dx%d  Type: %d\r\n",cam.width(),cam.height(),cam.LeptonVersion());

	while(1){
		if (cam.hasFrame())
			printf("Got frame!!!\r\n");
		usleep(1000);
	}

This is the output from the Lepton 3.5:

Open SPI port: 0, with address 3
Dimensions: 160x120  Type: 1
Close SPI port: 0, with address 3
Open SPI port: 0, with address 3
Close SPI port: 0, with address 3
Open SPI port: 0, with address 3
Close SPI port: 0, with address 3
Open SPI port: 0, with address 3
Reboot lepton sensor...
Close SPI port: 0, with address 3
Close I2C port: 1, with address 42
Open I2C port: 1, with address 42
Open SPI port: 0, with address 3
Close SPI port: 0, with address 3
Open SPI port: 0, with address 3
Close SPI port: 0, with address 3
Open SPI port: 0, with address 3
Close SPI port: 0, with address 3
Open SPI port: 0, with address 3
Reboot lepton sensor...
Close SPI port: 0, with address 3
Close I2C port: 1, with address 42

Any suggestions?

@brycheiniog
Copy link
Author

Just to follow up. Everything worked fine when running the Lepton3-dev branch of pylepton so I dug into that code base and found they were running the SPI clock at 18MHz rather than the 32MHz specified in LeptonCommon.h.

Reducing the SPI Clock to the same 18MHz setting seems to have resolved all my problems. It might be worth suggesting this in the readme if you experience lots of resync attempts.

@gar-syn
Copy link

gar-syn commented Mar 11, 2019

To add to this, I tested the program on the Raspberry Pi 3B+with a Lepton 3.5 and the clock setting of 32MHz works fine, 18MHz doesn't working well at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants