C++ Sensor

Open-source C++ projects categorized as Sensor | Edit details

Top 10 C++ Sensor Projects

  • Adafruit_Sensor

    Common sensor library

    Project mention: A confusing issue with NodeMCU | reddit.com/r/arduino | 2021-11-25

    // Example testing sketch for various DHT humidity/temperature sensors // Written by ladyada, public domain // REQUIRES the following Arduino libraries: // - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library // - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor #include "DHT.h" #define DHTPIN 4 // Digital pin connected to the DHT sensor // Feather HUZZAH ESP8266 note: use pins 3, 4, 5, 12, 13 or 14 -- // Pin 15 can work but DHT must be disconnected during program upload. // Uncomment whatever type you're using! #define DHTTYPE DHT11 // DHT 11 //#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321 //#define DHTTYPE DHT21 // DHT 21 (AM2301) // Connect pin 1 (on the left) of the sensor to +5V // NOTE: If using a board with 3.3V logic like an Arduino Due connect pin 1 // to 3.3V instead of 5V! // Connect pin 2 of the sensor to whatever your DHTPIN is // Connect pin 3 (on the right) of the sensor to GROUND (if your sensor has 3 pins) // Connect pin 4 (on the right) of the sensor to GROUND and leave the pin 3 EMPTY (if your sensor has 4 pins) // Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor // Initialize DHT sensor. // Note that older versions of this library took an optional third parameter to // tweak the timings for faster processors. This parameter is no longer needed // as the current DHT reading algorithm adjusts itself to work on faster procs. DHT dht(DHTPIN, DHTTYPE); void setup() { delay(2000); Serial.begin(115200); delay(2000); Serial.println(F("DHTxx test!")); dht.begin(); } void loop() { // Wait a few seconds between measurements. delay(2000); // Reading temperature or humidity takes about 250 milliseconds! // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor) float h = dht.readHumidity(); // Read temperature as Celsius (the default) float t = dht.readTemperature(); // Read temperature as Fahrenheit (isFahrenheit = true) float f = dht.readTemperature(true); // Check if any reads failed and exit early (to try again). if (isnan(h) || isnan(t) || isnan(f)) { Serial.println(F("Failed to read from DHT sensor!")); return; } // Compute heat index in Fahrenheit (the default) float hif = dht.computeHeatIndex(f, h); // Compute heat index in Celsius (isFahreheit = false) float hic = dht.computeHeatIndex(t, h, false); Serial.print(F("Humidity: ")); Serial.print(h); Serial.print(F("% Temperature: ")); Serial.print(t); Serial.print(F("°C ")); Serial.print(f); Serial.print(F("°F Heat index: ")); Serial.print(hic); Serial.print(F("°C ")); Serial.print(hif); Serial.println(F("°F")); }

  • mpu9250

    Arduino and CMake library for communicating with the InvenSense MPU-9250 and MPU-9255 nine-axis IMUs. (by bolderflight)

    Project mention: Having trouble finding the correct library for this 9DOF IMU, can anyone help | reddit.com/r/arduino | 2021-07-13

    Sorry, was so caught up in it not working I lost all my sense! I was running the Bolder Flight example: https://github.com/bolderflight/MPU9250 titled Basic_I2C and was receiving the following error:

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • vzlogger

    Logging utility for various meters & sensors

    Project mention: 100% Self hosted energy monitor | reddit.com/r/selfhosted | 2021-09-13

    vzlogger running on Raspberry Pi Zero WH with IR head, connected to your meter for reading values

  • infidel-sensor

    Firmware, mechanical and electrical design files for the Inline Filament Diameter Estimator, Lowcost (InFiDEL).

    Project mention: Open Source 3-D Filament Diameter Sensor for Recycling, Winding and Additive Manufacturing Machines | reddit.com/r/3Dprinting | 2021-04-23
  • ModuleInterface

    Easy config and value sync between IoT modules, database and web pages (by fredilarsen)

  • Arduino-MQ131-driver

    Arduino driver for gas sensor MQ131 (Ozone / O3)

    Project mention: Monitoring my home's air quality with AirGradient's DIY sensor | news.ycombinator.com | 2021-09-08

    Not sure if this is DIY enough for you, but I'm using an MQ131 (about $20-$30 on Amazon, probably cheaper directly from China) in an air quality sensor I'm building. There's an Arduino library for it [1], and from what I can tell so far, it does work, though it's probably not super accurate. It's also somewhat sensitive to environmental factors, though you can correct for some of that with known temperature/humidity.

    [1] https://github.com/ostaquet/Arduino-MQ131-driver

  • Google-Sheets-Logging

    Log data from an ESP8266 device (NodeMCU, Wemos D1 mini) directly to Google Sheets without a third party service. Log sensor data, send data by pressing a button, and receive data from a Google spreadsheet for the microcontroller to use.

    Project mention: IoT Cheese Press | reddit.com/r/esp8266 | 2021-12-07

    I just log data to Google Sheets.

  • OPS

    OPS - Build and Run Open Source Unikernels. Quickly and easily build and deploy open source unikernels in tens of seconds. Deploy in any language to any cloud.

  • TLE5012-Magnetic-Angle-Sensor

    This repository includes an library for Arduino for the TLE5012 Magnetic Angle Sensor with SSC interface.

    Project mention: any TLE5010 arduino libraries out there? | reddit.com/r/HotasDIY | 2021-05-01

    This one I just found by googling is for TLE5012 but I doubt their communication is much different.

  • HCSR04-ultrasonic-sensor-lib

    Arduino lib for HCSR04 ultrasonic sensor

    Project mention: ultasonic sensor doesnt seem to connect to ttgo esp32 lroa board | reddit.com/r/Lora | 2021-08-24
  • ESPSense

    Use ESPHome to emulate TP-Link Kasa HS110 plugs, and report energy usage to your Sense Home Energy Monitor (or anything else on your network!) via ESP8266/ESP32 devices

    Project mention: How do I edit / replace a .yml config file on a smart plug? | reddit.com/r/homeautomation | 2021-12-19
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-12-19.

C++ Sensor related posts


What are some of the best open-source Sensor projects in C++? This list will help you:

Project Stars
1 Adafruit_Sensor 803
2 mpu9250 376
3 vzlogger 80
4 infidel-sensor 72
5 ModuleInterface 54
6 Arduino-MQ131-driver 52
7 Google-Sheets-Logging 39
8 TLE5012-Magnetic-Angle-Sensor 36
9 HCSR04-ultrasonic-sensor-lib 28
10 ESPSense 24
Find remote jobs at our new job board 99remotejobs.com. There are 30 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
Less time debugging, more time building
Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.