Giter Club home page Giter Club logo

Comments (10)

ricki-z avatar ricki-z commented on June 12, 2024

We need some parts of this code (start cmd, stop cmd, ...) in other scripts and sources. Here we have a place to look for them. Some users want to use the SDS011 on Raspberry Pis or other systems. I can't find these cmds in the mentioned source (okay, may be it's to late to look for something like this ...).

from sensors-software.

corny avatar corny commented on June 12, 2024

The commands are included in the Sds011.h. I use the library this way:

SoftwareSerial serialSDS(SDS_PIN_RX, SDS_PIN_TX, false, 128);
sds011::Sds011 sensorSDS(serialSDS);

void initSDS(){
  sensorSDS.set_sleep(false);
  sensorSDS.set_mode(sds011::QUERY);
  sensorSDS.set_sleep(true);
}

from sensors-software.

ricki-z avatar ricki-z commented on June 12, 2024

We need the serial data that ist sent to the SDS011 to start and stop. Not the library commands.
And as far as I can see, these commands are not "active" (CMD_SLEEP ist empty).

from sensors-software.

corny avatar corny commented on June 12, 2024

Alle the commands have values. It's a ENUM and they get their values implicitly by incrementing the previous value.

from sensors-software.

ricki-z avatar ricki-z commented on June 12, 2024

Okay, but our intention stays the same. Having the possibility to copy the binary command code to other "languages".

from sensors-software.

ricki-z avatar ricki-z commented on June 12, 2024

This will only clean up our code. The size of the firmware file or the used mem will stay nearly the same. This would only be another lib, where we have to look for changes on any update. We had a discussion about ArduinoJSON, where our code has thrown some warnings after an update. And one user told us, that our code is faulty and that he can't compile the firmware.

from sensors-software.

corny avatar corny commented on June 12, 2024

I don't see a valid reason for that. In other languages there are much easier ways to implement it than in C++.

from sensors-software.

ricki-z avatar ricki-z commented on June 12, 2024

see changes in last comment. WiFiManager is another lib we had to rewrite for our project even if for slightly other reasons.

from sensors-software.

corny avatar corny commented on June 12, 2024

In my opinion the current SDS011 code bloat your code and is hard to read and understand. What do you think about copying the library into your repository?

from sensors-software.

ricki-z avatar ricki-z commented on June 12, 2024

Sorry, the SDS011 code will be left there.
(160 out of 2300 lines of code)

from sensors-software.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.