Skip to content

RPi Node-Red: Camera

Authors: field_5dd42fd9200b2

Goal:
Install the Raspberry Pi camera and take a picture using node-red

What you will learn:
How to install a Raspberry pi camera, and how to configure the node-red camera node to actually produce images.

Parts List:

  • Pi Camera
  • Pi Camera Ribbon Cable

Video Tutorial:

First the camera needs to be physically installed.

Warning: Only attach or remove the camera with power unplugged from your raspberry pi! failure to do so may break things 🙂

The installation looks like this, note the orientation of the connector compared to the USB ports. Pay attention to the blue side of the connector and be sure it is pushed in all the way.

Setting up Node-Red

  1. start Node-Red
  2. navigate to 127.0.0.1:1880 (note this link will only work on your raspberry pi computer after node-red is started)
  3. drag into the flow area drag an “inject” node
  4. also drag in a “camerapi takephoto” node

Link them together.

 

Before the camera will work the settings need to be changed.

By default the resolution is set to the V2 camera, which is different to the hardware provided in the T3 kit.

To access the settings double click on the camera node, and change the resolution to the second highest one.

Deploy the flow, then point the camera at something and press the inject button which is on the left side of the “inject node” here still labeled “timestamp”.

The camera will take a picture and then store it in /home/pi/Pictures by default.

To view your picture first click on the file manager icon in the toolbar at the top, and then navigate to the ‘Pictures’ folder.

 

There your photo is!

By default this folder is empty, so if there’s anything in there at all it’s probably a picture from your rpi camera.

Advanced Camera Settings

By double clicking on the camera-node you can access some more advanced camera settings.

Here you can adjust what kind of filename the images will be saved with, or even apply effects to your photos like making them black and white, or adding a sketch filter.

 

Whats Next?

The next step is to integrate the camera with something other than an inject node.

For example, activate with a button or the ultra-sonic sensor.

RPi Node-Red: Ultrasonic Distance

Or the fully featured selfie-station!

RPi Node-Red: Minimal Selfie Station Tutorial

Back To Top