A new library has been born! See Arduino Playground - HomePage
Thanks for sharing!
Cool. You should put a link to the manufacture's datasheets or product descriptions on that playground page.
Lefty
The datasheets are there. Product page added.
Created a google code project for this library: Google Code Archive - Long-term storage for Google Code Project Hosting.
Hello, anyone interested in getting the SPI Sensor variants added?
I recently developed corresponding code for a logger Project i might share.
I could make it a separate Library as well, as some functions of the I2C Lib are not needed for SPI.
can anyone suggest me pressure sensor to use with arduino which measures pressure upto 10 bar with datasheet and library, and also some help in coding it
There are dozens of different types, accuracy grades, price, etc. Without knowing anything about your planned project, no one can make a realistic recommendation, please describe your project.
Hello,
Is there a new library? I am using Arduino nano and SSC pressure sensor. I get an error opening the library file. Could someone help me?
When the compile error pops up, click the oval "Copy Error Messages" button, then go to the forum reply page and paste it into your reply.
Hi,
I have attached my code in .ino file. I use a arduino NANO and honeywell pressure sensor sscdanv030pg2a3. I get the following output as in Capture.jpg.
As I am new to this, could some one please help me figure out this output?
Thanks a ton!
sketch_jun21c.ino (1.56 KB)
Please don't post pictures of text.
Your .ino file is missing a loop() function.
Please paste the entire code into your message inside code tags. (Read how-to-use-this-forum first.) Many experts here are reading this on their phones and can't open .ino files.
Hi. Can you please help me with code.
#include<Wire.h>
#define sensor 0x28 //Unique bus address
float meas_diff_pressure_Pa()
byte byterequest=2;
byte a;
byte b;
uint16_t P_bin;
float Pressure_INH20;
float Pressure_Pa;
void setup()
{
Wire.begin();//Wakes up I2C bus
Serial.begin(9600);
}
void loop()
{
Wire.requestFrom(sensor, byterequest);
if(Wire.available()) // slave may send less than requested
{
a = Wire.read(); // receive a byte as character
delay(4);
b = Wire.read();
delay(4);
Wire.endTransmission();
}
//First two bits are the sensor state data, so using bitwise operation we take out the first two bits we don't care about and do
//an "and" operation with 111111(0x3f) so if we got a=101101101 then a & 111111 gives 001101101. It basically just gets rid of
//the first two numbers and makes them zero since doing a bitwise "and" with 111111 will always give the same value.
//Then since we have to either work in 8 or 16 bit values, we take the 14 bit pressure
//data from the sensor and shift (a) to the the left(<<) 8 bits since "a" is the MSB. Then we do bit wise "or"(|) which fills in the
//last 8 bits of P_bin with LSB pressure data(b) with the final value being a 16bit number
P_bin = ((a & 0x3f) << 8) | b;
// for(int i=8; i>=0; i--)
// {
// Serial.print(bitRead(a,i));
// }
// Serial.println(" ");
//
// for(int i=8; i>=0; i--)
// {
// Serial.print(bitRead(b,i));
// }
// Serial.println(" ");
Pressure_INH20= (P_bin-1638.00)/13107.00);
//Pressure_Pa=249.17400*Pressure_INH20;
return Pressure_Pa;
}
I get following error message
Arduino: 1.8.1 (Windows 10), Board: "Arduino Nano, ATmega328"
sketch_jun25a:5: error: expected initializer before 'byte'
byte byterequest=2;
^
C:\Documents\Arduino\sketch_jun25a\sketch_jun25a.ino: In function 'void loop()':
sketch_jun25a:21: error: 'byterequest' was not declared in this scope
Wire.requestFrom(sensor, byterequest);
^
sketch_jun25a:55: error: expected ';' before ')' token
Pressure_INH20= (P_bin-1638.00)/13107.00);
^
return Pressure_Pa;
^
exit status 1
expected initializer before 'byte'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Thanks!
So, look at the line above the one where the error is reported.
float meas_diff_pressure_Pa()
What is that line missing that all the others have?