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
D

douma rahma

@douma rahma
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MH-Z19 with Arduino R3 0 outputValue
    D douma rahma

    @Ed1500 I am connecting the Arduino via USB port

    Development

  • MH-Z19 with Arduino R3 0 outputValue
    D douma rahma

    @Ed1500 Thank you for your response I will try it. Are you using PWM or not?

    Development

  • MH-Z19 with Arduino R3 0 outputValue
    D douma rahma

    Hi,
    I am using this code to get C02 value. But always I get this result (CRC 0/0) even after waiting more than 3 min for the healing process.

    #include <SoftwareSerial.h>;
    
    SoftwareSerial mySerial(A0, A1); // A0 - к TX сенсора, A1 - к RX
    
    byte cmd[9] = {0xFF,0x01,0x86,0x00,0x00,0x00,0x00,0x00,0x79}; 
    unsigned char response[9];
    
    void setup() {
      Serial.begin(9600);
      mySerial.begin(9600);
    }
    
    void loop() 
    {
      mySerial.write(cmd, 9);
      memset(response, 0, 9);
      mySerial.readBytes(response, 9);
      int i;
      byte crc = 0;
      for (i = 1; i < 8; i++) crc+=response[i];
      crc = 255 - crc;
      crc++;
    
      if ( !(response[0] == 0xFF && response[1] == 0x86 && response[8] == crc) ) {
        Serial.println("CRC error: " + String(crc) + " / "+ String(response[8]));
      } else {
        unsigned int responseHigh = (unsigned int) response[2];
        unsigned int responseLow = (unsigned int) response[3];
        unsigned int ppm = (256*responseHigh) + responseLow;
        Serial.println(ppm);
      }
      delay(10000);
    }
    

    I used the sensor directly without any calibration. Another note, why I can only use 3.3V, the 5v make my Arduino card shutdown

    Development
  • Login

  • Don't have an account? Register

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