Giter Site home page Giter Site logo

dfrobot_raspberrypi_a02yyuw's People

Contributors

arya11111 avatar gjanssens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dfrobot_raspberrypi_a02yyuw's Issues

Use with multiple A02YYUW

Hello there,

I have a question; how do we use 2 sensors at the same time?
When I tried to use with 2 sensors, I got wrong sum values for second sensor as shown below.

image

You can check my arduino loop method code as shown below.

// Defined variables;
unsigned char data[4] = {};
unsigned char data2[4] = {};

  do {
    for (int i = 0; i < 4; i++)
    {
      data[i] = mySerial.read();
    }
  } while (mySerial.read() == 0xff);

   mySerial.flush();

  do {
    for (int i = 0; i < 4; i++)
    {
      data2[i] = mySerial2.read();
    }
  } while (mySerial2.read() == 0xff);

 mySerial2.flush();

  if (data[0] == 0xff && data2[0] == 0xff)
  {
    int sum;
    sum = (data[0] + data[1] + data[2]) & 0x00FF;

    int sum2;
    sum2 = (data2[0] + data2[1] + data2[2]) & 0x00FF;


 Serial.print("sum1 ");
    Serial.print(sum);

    Serial.println();
    
    Serial.print("data[3] ");
    Serial.println(data[3]);

    Serial.print("sum2 ");
    Serial.print(sum2);


    Serial.println();

        
    Serial.print("data2[3] ");
    Serial.println(data2[3]);

// rest of code

Thank you!

multiple sensors

Hello, I would like to connect multiple sensors through an usb-uart converter. I'm doing it on Jetson AGX XAVIER. How do I change the pins to read data in the python script? I saw that in the arduino example there is something as SoftwareSerial mySerial(11,10); // RX, TX. Could I do a similar thing in python?
Regards

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.