Search code examples
google-cloud-platformraspberry-pi3iotgoogle-cloud-pubsubgoogle-cloud-iot

How to send sensor data (like temperature data from DHT11 sensor) to Google Cloud IoT Core and store it


I am working on connecting a Raspberry Pi (3B+) to Google Cloud and send sensor's data to Google IoT Core. But I couldn't find any content in this matter. I will be so thankful, if anyone would help me, in dealing with the same.

PS: I have already followed the interactive tutorial from Google Cloud itself and connected a simulated virtual device to Cloud and sent data. I am really looking for a tutorial, that helps me in connecting physical Raspberry Pi.

Thank you


Solution

  • You may want to try following along with this community article covering pretty much exactly what you're asking.

    The article covers the following steps:

    • Creating a registry for your gateway device (the Raspberry Pi)
    • Adding a temperature / humidity sensor
    • Adding a light
    • Connecting the devices to Cloud IoT Core
    • Sending the data from the sensors to Google Cloud
    • Pulling the data back using PubSub