Trying to use (cheap) pressure sensor sold via Amazon by ALMOCN. No useful instructions I can find, it's pins are labeled "VCC OUT SCK GND". Guessing OUT should go to an analog pin to be read....but that seems to only and always yield 1023. Any suggestions of useful info about these boards?
Using a non-arduino Nano built by Gikfun. They call it "USB Nano V3.0". My code is almost identical to the analog pin version sent by ruilviana. My code:
String pgmName = "FSRtestV1";
int a, b, c, x, y, z;
float pressure;
int rawAna;
void setup() {
Serial.begin(115200);
delay(200);
Serial.println(pgmName);
}
void loop() {
rawAna = analogRead(A5);
Serial.println(rawAna);
delay(1000);
}
If your sensor is the one linked to in Post #2 the link tells all including a code sample. You do not use an analog channel. You clock the module and get a digital signal out corresponding to the pressure. This is where a link to exactly what you bought would go a long way?
Why not contact the vendor and ask for help? They state: "We provide high-quality products and the highest standard of customer service.Any more question,please contact us freely."
With the information you have given I cannot even come up with a reasonable guess. Post links to technical information on the sensor. I have sensors that look like what is on the board but I do not think they are the same.
The "SCK" (Serial CLock) tells you it's a digital sensor, not analog. The sensor value is sent as a series of bits, and the clock signal, which is output by the Arduino, controls when each bit is sent.