Now that we have 2 sensors built and collecting data (PIR Motion Sensor & Distance Sensor, both built on Raspberry Pi) we should start doing something with the data. In more of a real-world scenario, we would have some sort of a backend to collect this data, place it in a data warehouse and then be able perform analysis on the data being retrieved. Or at the very least, display the data in perhaps a dashboard of some kind.
But it all starts with data. Let’s start by building a RESTful API that we will use to collect the information from the sensors. We will build our API in NodeJS, on top of the Express middleware. We can either run this on a computer, like a desktop or laptop, or even on another Raspberry Pi!