AR1820HS + Raspberry Pi 3

Published by Cecilia on

Home Forums Arducam SPI Cameras AR1820HS + Raspberry Pi 3

Viewing 4 reply threads
  • Author
    Posts
    • #22280
      Cecilia
      Participant

      Hello, I’m setting up a AR1820SH camera, to test out the module together with a 20mm lens I need to work with.

      I’m stumbling on three obstacles I’m not able to overcome:

      1 – I’m trying the examples suggested in the “read me” GitHub rep:
      https://github.com/ArduCAM/MIPI_Camera/blob/master/RPI/README.md

      Once running each of them I get an Import Error saying No module named arducam_mipicamera

      This happens even if I previously installed the libarducam_mipicamera.so, as prompted in the instructions, through the commands:

      sudo pip install v4l2

      sudo pip install numpy

      sudo apt-get install python-opencv

      Am I missing something? Is the library updated?

      2 – When trying to run the opencvGui I get an error message stating:

      Unable to init server: Could not connect: Connection refused
      (Arducam mipi camera controller:995): Gtk-WARNING **: 16:42:35.957: cannot open display:

      3 – This last might be a simple one:
      when I start the camera preview by typing ./arducamstill -t 0, how do I stop it?
      I usually interrupt the programs via terminal, by typing ctrl + c, but in this case it seems like having no effect.

      Whoever would like to help, I’d very much appreciate so !

      Thanks in advance.

    • #22289
      bin
      Keymaster

      Hi,

      Don’t worry and I will try my best to help you.

      1 – I’m trying the examples suggested in the “read me” GitHub rep:
      https://github.com/ArduCAM/MIPI_Camera/blob/master/RPI/README.md

      Once running each of them I get an Import Error saying No module named arducam_mipicamera

      A: Please ensure you have done the following commands to install the arducam_mipicamera lib

      cd MIPI_Camera/RPI

      make install

       

      2 – When trying to run the opencvGui I get an error message stating:

      Unable to init server: Could not connect: Connection refused
      (Arducam mipi camera controller:995): Gtk-WARNING **: 16:42:35.957: cannot open display:

      A2:The opencv display need to a display screen. Please run the demo on the local instead of remote terminal.

       

      3 – This last might be a simple one:
      when I start the camera preview by typing ./arducamstill -t 0, how do I stop it?
      I usually interrupt the programs via terminal, by typing ctrl + c, but in this case it seems like having no effect.

      A: You should push CTRL+C double time to exit the demo, the first time is to exit camera and the second is to exit keyboard detected. I have not find a good way to exit at the same time.

      Let me know if you need more help.

       

    • #24692
      Cecilia
      Participant

      Hello,

      My apologies for my delay in getting back to you.

      Firstly, many thanks for your prompt and on point reply.
      Everything you suggested seemed to work, a part from the issue highlighted in question number 1:
      “Once running each of them I get an Import Error saying: No module named arducam_mipicamera”

      I keep being given the same ImportError, even if I went through the arducam_mipicamera lib installation once again. This happens all the times I try to run one of the python examples you provided in your GitHub repository.

      This last time I was working on the example called capture.py. I tried both saving it within the MIPI_Camera/RPI folder and on the Desktop, and running them respectively, but no luck.

      When following the commands:

      cd MIPI_Camera/RPI

      make install

      I’m given this message:
      sudo install -m 644 lib/libarducam_mipicamera.so /usr/lib/

      I’m now wondering if the library has actually been successfully installed?

      Thanks in advance for your help,
      c.

    • #24698
      bin
      Keymaster

      Hello,

      Yes, you are right. The lib has been installed successfully. Now Can you test the C code firstly?

      Firstly, you can test the arducamstill demo to ensure the camera and the library are normal.

       

    • #24716
      Cecilia
      Participant

      Hi,

      So I can confirm that the ./ arducamstill commands work correctly. I can in fact run through all the examples you provide in the introduction documentation.

      Regarding the .c code, they all seem to have issues in the code. For example, if I run
      ~/MIPI_Camera/RPI $ python preview.c

      I’m prompted an SintaxError stating:

      File “preview.c”, line 11

      int main(int argc, char **argv) {

      ^

      SyntaxError: invalid syntax

      Is the one I can find in the GH repo the latest version of the code?

      Thanks!

Viewing 4 reply threads
  • You must be logged in to reply to this topic.