[SOLVED] "Camera not detected" error

dexteros
picamera

#1

Hardware: GoPiGo 3, DexterOS v 2.2.0, correctly installed Raspberry Pi camera (tried both supplied cables), small silver USB drive installed and demonstrated able to store and open program files.

While in Bloxter Camera lesson:
Case A: program consists only of “move forward 1 inch.” Program runs correctly.
Case B: program consists of “move forward 1 inch” followed by “take photo.” Program fails to run (GoPiGo does not move) and Output window pops open with “Camera not detected” error.

It looks to me like there’s a flaw or mismatch in the packages that Python loads whenever there’s a camera-related block in the Bloxter program. Advice?


#2

Hi @WayneM,

Does the camera’s LED turn red when you take a photo?

Also, what does raspistill -o sample.jpeg do when you run it within a terminal window (in JupyterLab).

Thank you!


#3

Does the camera’s LED turn red when you take a photo?

No. I wasn’t aware that the camera had an LED

Also, what does raspistill -o sample.jpeg do when you run it within a terminal window (in JupyterLab).

Here’s a screen grab from my iPad. Thanks for quick response!


#4

Thanks for the screenshot.
The camera can be quite finicky at times. Is this test done on a freshly booted robot?

And yes, the camera has an LED when it takes a photo.

May I ask which version of DexterOS you’re using ?

Cleo


#5

Robot has been rebooted multiple times. Using DexterOS V 2.2.0, the version that was packed with the GPG when I received it a few days ago. I assume the same version is on the micro-SD as on the standard SD.

I can’t seem to be able to run “sudo raspi-config” from Jupyter (keeps asking for password, and won’t accept ‘Jupyter’) or from notebook (responds with syntax error).


#6

Within DexterOS, system configuration is off-limit, unfortunately.

Since you are familiar with the Raspberry Pi, you may prefer Raspbian for Robots which will give you full access to the OS - and test the camera.

I’ve double checked DexterOS 2.2 and by default the camera is enabled. I suspect an issue with your specific camera.

Cleo


#7

Ok, here’s a test to check if the camera is enabled or not.

In the Python section, start up the terminal. Enter
grep start_x=1 /boot/config.txt

if it returns start_x=1 then the camera is indeed enabled. If it returns nothing then for some reason, it got disabled on your card. The good news is that you can take the SD card out of the Raspberry Pi, into a laptop, and edit the config.txt file in the /boot folder.
Make sure to edit with a code editor!!!

Look for this little piece of code and make sure start_x=1 is added.

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
start_x=1
gpu_mem=128

Cleo
who needs raspi-config anyway ? :smiley:


#8

Thanks for the suggestion, Cleo! The camera is indeed enabled on my DexterOS microSD.

My next step will be to buy another Raspberry Pi camera locally, substitute it for the one I received from Dexter, and see if it works. If it does, I’ll return the presumably faulty one to Dexter. If the new camera also fails to work, I’ll have to blame the Raspberry Pi board itself. I’ve already connected the camera with both cables that were supplied with the camera, so I think I can rule out connection issues.

Do you agree with my troubleshooting logic?


#9

Valid logic however I would add that connection issues are still a possibility. It’s very easy to think the cable is in properly when it’s not. Those cables have to be inserted so that the blue part barely shows, and is horizontal.
Also those cables are known to break internally, so that’s another possibility.

Before moving on, I would troubleshoot with a regular Pi and regular Raspbian, if that’s a possibility for you.

Cleo


#10

Also check that the blue is facing the audio jack at the RPi end


#11

Beginners like me have to defer to the experts, so I, for the third or fourth time, disconnected and reconnected the camera to the GPG board. I used each of the two camera cables that came with my camera. Blue parts barely visible, and facing the correct way.

Got the same error each time.

I suppose it’s possible, but I’d say unlikely, that two different, randomly-packed cables would both be faulty. Anyhow, I still plan to try a new camera. I’ll report the result in this thread.


#12

I did buy a new Raspberry Pi camera, which came with a new (slightly different) cable. Here are the results.

New camera on old cable - “Camera not detected”
New camera on new cable - “Camera not detected”
Old camera on new cable - “Camera not detected”

Cleo said, “Before moving on, I would troubleshoot with a regular Pi and regular Raspbian, if that’s a possibility for you.” But I have only the hardware that was part of my GPG3 purchase from Dexter (plus Mac and iPad), so I’d need more guidance on that.

I’m disappointed that I can’t use the camera on my GPG, but I will proceed with the distance sensor, which does work. In my mind, the camera problem appears to lie in the Raspberry Pi 3 board. I’d be happy if Dexter would send a new Pi board, which I would swap with the original and then return the original. Or…what do you propose?


#13

I’m really sorry, this is very disappointing.

Before we proceed with the Raspberry Pi replacement, can you share some photos of the camera connections? Both on the board, and at the camera level. Just to be sure we’re not overlooking something.

Thanks,
Cleo


#14

Hi @WayneM,

In addition to what @cleoqc has said, do you think you could give the PiCamera another chance with a pure distribution of Raspbian? The only things you’d have to do on a fresh image are:

  1. Enable the PiCamera.

  2. Run raspistill -o test.jpeg.

If this doesn’t work, then there’s something wrong with the connection between the camera and the Pi.

Thank you!


#15

RobertLucian’s suggestion was spot on! After dredging an ancient USB-wired keyboard from my basement, and recabling my entertainment system, I was able to run raspistill -o test.jpeg on the Pi. It gave me 2-3 seconds of video feed from the camera! So the camera’s good and its connection to the Pi is good.

Then, for no rational reason, I reconfigured the robot with the DexterOS V 2.2.0 SD card, and verified that I still got the “Camera not detected” error.

What’s my next step? Should I download and flash a fresh DexterOS image onto my spare SD card, and try it in the robot?


#16

Hi @WayneM,

Luckily, you didn’t stumble upon a PS/2 keyboard in your basement - that would have been a pain :wink:

So, we can definitely rule out a problem with the link between the two of them. Following this, this would be my course of action:

  1. Rip the image you have that doesn’t work and put it somewhere so I can download it and test it with mine. Since we don’t want any “external noise”, a signature for the image would be very well welcome (think MD5).

  2. At the same time, flash a different card with a new version of DexterOS v2.2.0 and see if it works.

And last but not least, can you tell me what is the version of your PiCamera?

Thank you!


#17

I have no idea what RobertLucian means in his suggestion no. 1. How can I rip an image that never appears? But never mind that, his suggestion no. 2 (which I also proposed) did the trick.

After downloading DexterOS v 2.2.0 and burning it onto a new microSD, the camera function worked normally. I’m annoyed that Dexter sent me a damaged microSD, and frustrated that it took me a week, and extra expense, to fix the problem. But I’m glad to be back on track with my GPG3.


#18

@WayneM

We’ve never had issues with the camera before. I’m glad it now works and your GPG3 is up and running. I’ve contacted you via private messages.

Cleo


#19

This topic was automatically closed after 8 days. New replies are no longer allowed.