Hello everyone, I'm new to teensy, but familiar with arduino and arduino IDE. For a side project I decided to give teensy a try. My first and major hurdle is I'm unable to read the analog input from the sensor(as5600). I'm attaching the pin data from datasheet for the sensor.
Link to the datasheet:
https://ams.com/documents/20143/36005/AS5600_DS000365_5-00.pdf/649ee61c-8f9a-20df-9e10-43173a3eb323.
I connected the VCC from sensor to the 5V pin(tried 3.3v as well) on the teensy, GND to GND, and trying to take analog out from the sensor through A0. I tried A3(input pin doesn't matter, just need the data) as input pin but in both scenarios I'm not getting any change in the input. I checked the signal with arduino mega and I see the change in values. I might be missing something simple but for the sake of life I'm unable to figure out what that is, why I'm not getting the reading. Any inputs or suggestions on how to get the analog reading from the sensor is much appreciated. Thanks.
I'm just using a example code from internet:
void setup()
{
Serial.begin(9600);
pinMode(A3, INPUT);
}
int val;
void loop()
{
Serial.println("123");
val = analogRead(A3);
Serial.print("analog A3 is: ");
Serial.println(val);
// delay(250);
}
Link to the datasheet:
https://ams.com/documents/20143/36005/AS5600_DS000365_5-00.pdf/649ee61c-8f9a-20df-9e10-43173a3eb323.
I connected the VCC from sensor to the 5V pin(tried 3.3v as well) on the teensy, GND to GND, and trying to take analog out from the sensor through A0. I tried A3(input pin doesn't matter, just need the data) as input pin but in both scenarios I'm not getting any change in the input. I checked the signal with arduino mega and I see the change in values. I might be missing something simple but for the sake of life I'm unable to figure out what that is, why I'm not getting the reading. Any inputs or suggestions on how to get the analog reading from the sensor is much appreciated. Thanks.
I'm just using a example code from internet:
void setup()
{
Serial.begin(9600);
pinMode(A3, INPUT);
}
int val;
void loop()
{
Serial.println("123");
val = analogRead(A3);
Serial.print("analog A3 is: ");
Serial.println(val);
// delay(250);
}