dfrobot / dfrobot_raspberrypi_a02yyuw Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
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.
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!
The compatibility tables have headers using (Chinese?) characters. Unfortunately I can't understand those. Can you please replace them with English translations ?
Thank you.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.