O'Reilly logo

Internet of Things Programming with JavaScript by Ruben Oliva Ramos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling a snapshot from Raspberry Pi

Now that we have seen how to communicate between Arduino and Raspberry Pi, to control the board, we can apply this to our security system project. We need to do this for communicating with and controlling our camera from the Raspberry Pi:

  • Connect the Arduino and Raspberry Pi to each other
  • Create a serial connection at 9,600 mbps
  • Call the function that will take the picture and save it in the micro SD

On the Raspberry Pi we need to do the following:

  • Create the script for calling the function in the Arduino that will take the picture
  • Open and execute the script using your PuTTY terminal

The following section is the sketch that should be download in the Arduino board:

First we start the serial communication:

void setup ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required