Search the Community
Showing results for tags 'analogread'.
Found 2 results
Basic analogRead function doesn't seem working.. I am using Energia as a compiler. I am trying the minimum configuration. I am getting a value but this value doesn't change with potentiometer. I have even tried to ground the signal (to see if it is Zero) but nothing has changed.. What might be wrong? thanks .
Hello, I have the MSP-EXP430FR5969 Wolverine Launchpad (Rev 1.6) and I'm trying to read the voltage output of a LM35 temperature sensor. I went on and used adafruit's code and adapted it to the launchpad. However, I'm not getting the correct voltage values. I verified the sensor is working as I used a multimeter to measure the voltage and it is working. Here's a snippet of the code static uint8_t analogInPin = A7 ; int sensorValue = 0; int voltage = 0; int temp = 0; . . . . . sensorValue = analogRead(analogInPin); voltage=sensorValue*(3600/1023.0); temp=(voltage-500)/10.0; // print the results to the serial monitor: Serial.print("Voltage = " ); Serial.print(voltage); Serial.print("mV \t"); Serial.print("Temp = "); Serial.print(temp); Serial.print("C \n"); All I'm getting in the serial monitor is 929mV 41 C , but the room temperature isn't 41C and the multimeter shows around 281.7mV I even tried changing pins and it still doesn't work. Did I just fry the board? Thanks a lot