hello,
This is Sanjeev kumar, I am facing problem with UART communication to arduino uno.
I want to communicate NDIR HC SJH-5 ( methane gas sensor) with arduino uno but i am unable to communicate it.
please help me .
Thanks
sanjeev kumar
hello,
This is Sanjeev kumar, I am facing problem with UART communication to arduino uno.
I want to communicate NDIR HC SJH-5 ( methane gas sensor) with arduino uno but i am unable to communicate it.
please help me .
Thanks
sanjeev kumar
Well. Hummm. Dang! I am unable to reproduce your code that does not work from the description of your issue. Perhaps you could describe what it means by does not work and post your code in code tags?
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
if(Serial.available()== 1)
{
Serial.println(Serial.read());
}
}
I am apply above code and send the command as given in the data sheet, but result will show randomly .
please help me to short out this problem.
Thanks for posting your best efforts at coding. Are their libraries for the NDIR HC SJH-5 or will you be doing an analog read thingy?
Post a link the the sensor's data sheet.
Post a schematic of the circuit.
Post an image of your project.
None of your posted code indicates you did any of that.
I attached here the link of data sheet of NDIR SJH_5 gas sensor https://cdn.shopify.com/s/files/1/0406/7681/files/Manual-Industrial-Grade-NDIR-Gas-Sensors-Cubic-GasLab.pdf?v=1630001730
and schematic circuit which is used.
and i will be doing an digital pin 0(Rx) and 1(TX)
You cannot do that. You will need to use, with an Uno a software serial library.
Post your code you used to communicate with the sensor.
I've not found a Arduino library for your sensor, you'll have to write one. Good luck.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.