I am attempting to do a simple example with the Rotary Angle Sensor.
Here is my development environment:
Board setup (Simple as can be single analog input):
Code:
const int ROTARYSENSOR = A0;
void setup()
{
Serial.println("Setup Start...");
Serial.begin(9600); //Set the serial communication frequency at 9600 bits per second
pinMode(ROTARYSENSOR, INPUT);
Serial.println("Setup End!");
}
void loop()
{
Serial.println("Loop Start...");
int value = analogRead(ROTARYSENSOR);
Serial.println(value); //display on serial monitor
delay(1000); //wait 1000ms before printing next value
Serial.println("Loop End!");
}
Issue:
I have a single solution with multiple projects as my sensor playground. All other projects I have so far work flawlessly no issues. Although with this project (RotaryAngleSensor) I am getting a strange message.
I am not seeing any of the Serial.println() messages. What is printed to the screen after a good 30 seconds is S?
Does anyone know what could be returning this S? to the standard output?
setup()
function is only called once, at the very start of the program running. It's possible you're just missing them.