element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Pi IoT
  • Challenges & Projects
  • Design Challenges
  • Pi IoT
  • More
  • Cancel
Pi IoT
Blog [Pi IoT] Plant Health Camera #6 - Putting the slave Pi to work
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: gpolder
  • Date Created: 29 Jul 2016 7:56 PM Date Created
  • Views 1457 views
  • Likes 4 likes
  • Comments 5 comments
  • pi 3
  • file_server
  • pi camera v2
  • sshfs
  • file_sharing
  • pi noir v2
Related
Recommended

[Pi IoT] Plant Health Camera #6 - Putting the slave Pi to work

gpolder
gpolder
29 Jul 2016

Now the Pi 3 is running well, with the camera and OpenCV, we need to install the second camera and Pi as slave system.

 

Previous posts:

[Pi IoT] Plant Health Camera #5 - OpenCV

[Pi IoT] Plant Health Camera #4 - Putting the parts together

[Pi IoT] Plant Health Camera #3 - First steps

[Pi IoT] Plant Health Camera #2 - Unboxing

[Pi IoT] Plant Health Camera #1 - Application

 

Setup the Raspberry Pi B+

The in the kit supplied Raspberry Pi B+ is used as slave camera unit. I placed it in the grey Smarti Pi 'LEGO' case.

Raspbian is installed from a NOOBS image which I put on a 16G SD card.

image

imageimage

After installation it automatically boots into graphical mode. I made some changes using the Configuration tool.

imageimage

As hostname I use pi1iot (the other ones hostname is pi3iot). Since we don't need the graphical user interface the Boot option is changed to CLI (Command Line Interface). Also Auto Login is disabled. In the interfaces tab the Camera is enabled, and in the Localization tab the proper timezone is set.

 

Connecting the cameras

The standard camera cable is too short to connect to the Pi 3, therefore I ordered a longer (30 cm) cable.

image

The two cameras are placed next to each other on the LEGO cover of the second Pi.

image

For the time being the second Pi is connected via ethernet.

image

 

 

 

Connecting the slave Pi

The slave Pi is connected by using the SSHFS file sharing protocol which allows you to mount a Raspberry Pi's filesystem over an SSH session. This works very convenient. In order to set this up I first had to install SSHFS on the client system, the Pi 3 in this case:

pi@pi3iot:~ $ sudo apt-get install sshfs

 

Then I created a mount point:

pi@pi3iot:~ $ mkdir pi1iot_share

 

And mounted the seconds pi home directory (user pi):

pi@pi3iot:~ $ sshfs pi@192.168.2.58: pi1iot_share/
The authenticity of host '192.168.2.58 (192.168.2.58)' can't be established.
ECDSA key fingerprint is 12:70:32:f1:cb:45:19:7e:3a:9f:f2:f3:d4:57:5a:c1.
Are you sure you want to continue connecting (yes/no)? yes
pi@192.168.2.58's password: 
pi@pi3iot:~ $

 

Now I logon on the second Pi and take a photo:

pi@pi3iot:~ $ ssh pi@192.168.2.58
pi@192.168.2.58's password: 

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Jul 29 19:00:17 2016 from gerrit.fritz.box
pi@pi1iot:~ $ 
pi@pi1iot:~ $ mkdir planthealthcam
pi@pi1iot:~ $ cd planthealthcam/
pi@pi1iot:~/planthealthcam $ raspistill -o cam.jpg
pi@pi1iot:~/planthealthcam $ ls -al
total 3244
drwxr-xr-x  2 pi pi    4096 Jul 29 19:21 .
drwxr-xr-x 19 pi pi    4096 Jul 29 19:00 ..
-rw-r--r--  1 pi pi 3311007 Jul 29 19:21 cam.jpg
pi@pi1iot:~/planthealthcam $

 

Finally logoff the second pi. We are back at the Pi 3. The image can be found on the mounted share.

pi@pi1iot:~ $ logout
Connection to 192.168.2.58 closed.
pi@pi3iot:~ $ 
pi@pi3iot:~ $ ls -al pi1iot_share/planthealthcam/
total 3244
drwxr-xr-x 1 pi pi    4096 Jul 29 19:21 .
drwxr-xr-x 1 pi pi    4096 Jul 29 19:00 ..
-rw-r--r-- 1 pi pi 3311007 Jul 29 19:21 cam.jpg
pi@pi3iot:~ $

 

 

That's it for now, next step is how to simultaneously take an image with both cameras.

Stay tuned.

  • Sign in to reply
Parents
  • DAB
    DAB over 9 years ago

    Nice update and implementation.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • DAB
    DAB over 9 years ago

    Nice update and implementation.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube