user23361: I ran the following really simple code on my micro and the monitor is just blank, not displaying any zeroes or anything and the Tx light isn't lighting up. I haven't used analog inputs much so I don't know what could be causing this. Can anyone help? Thanks, here's the code
int sensePin = 0;
void setup() {
    analogReference(DEFAULT);
    Serial.begin(9600);
}

void loop() {
  Serial.println(analogRead(sensePin));
  delay(500);

}


user313: The answer to no ouput, and suspecting your data source is to replace the data source with a constant value or a string until you get that problem sorted, and then go back to your data source and debug that if necessary.
That said, I don't see any issue with you trying to print the output of an analog read. Obviously you should get something, even if it's just a single zero on each line, twice a second.

Is your monitor the Arduino built-in monitor?
Is it set to 9600 baud, as you've set your output rate in the program?
Is there anything else connected to the Tx pin, Pin-1 (Arduino numbering, not chip numbering)?
There were no error messages from the compiler or loader, right? (The libraries, bless-'em, always get a few warnings; unfortunately we have to ignore those).
You've no reason to believe the Arduino is other than 100% good?


23361: <p>I ran the following really simple code on my micro and the monitor is just blank, not displaying any zeroes or anything and the Tx light isn't lighting up. I haven't used analog inputs much so I don't know what could be causing this. Can anyone help? Thanks, here's the code</p>

<pre><code>int sensePin = 0;
void setup() {
    analogReference(DEFAULT);
    Serial.begin(9600);
}

void loop() {
  Serial.println(analogRead(sensePin));
  delay(500);

}
</code></pre>
 313: <p>The answer to no ouput, and suspecting your data source is to replace the data source with a constant value or a string until you get that problem sorted, and then go back to your data source and debug that if necessary.</p>

<p>That said, I don't see any issue with you trying to print the output of an analog read. Obviously you should get <em>something</em>, even if it's just a single zero on each line, twice a second.</p>

<ul>
<li>Is your monitor the Arduino built-in monitor?</li>
<li>Is it set to 9600 baud, as you've set your output rate in the program?</li>
<li>Is there anything else connected to the Tx pin, Pin-1 (Arduino numbering, not chip numbering)?</li>
<li>There were no error messages from the compiler or loader, right? (The libraries, bless-'em, always get a few warnings; unfortunately we have to ignore those).</li>
<li>You've no reason to believe the Arduino is other than 100% good?</li>
</ul>
