Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
L

lekeb

@lekeb
About
Posts
9
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Water pressure sensor
    L lekeb

    Thanks a lot, It works!!!

    Here my code updated

    
    // Enable debug prints to serial monitor
    //#define MY_DEBUG 
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    
    //#define MY_NODE_ID 7
    
    #include <MySensors.h>
    
    #define BARO_CHILD 0
    #define BAR_SENSOR_ANALOG_PIN 0
    
    unsigned long SLEEP_TIME = 60000;
    
    MyMessage pressureMsg(BARO_CHILD, V_PRESSURE);
    void setup(){
      
    }
    
    void presentation() {
      sendSketchInfo("pressure Sensor", "1.0");
      present(BARO_CHILD, S_BARO);
    }
    
    void loop() {
        
      int lecture_adc = analogRead(BAR_SENSOR_ANALOG_PIN);
      float pression = ((lecture_adc*5/1024.0)-0.50)/1.7;
      Serial.println(pression);        
      send(pressureMsg.set(pression, 2));
            
      sleep(SLEEP_TIME);
    }
    
    My Project
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular