Go Down

Topic: VCC/Ground Pulldown For Sensor, How? (Read 812 times) previous topic - next topic


Dec 09, 2009, 09:48 pm Last Edit: Dec 09, 2009, 09:51 pm by floresta Reason: 1

Could this be because I am plugged into a computer?

Indirectly. The answer is in section 13.3.3 of the datasheet.  The Arduino uses the USART to communicate with your computer when serial communication is initiated by the Serial.begin() function.  When the USART is initiated the Rx and Tx pins are no longer configured as normal I/O pins and the pinMode() and digitalWrite() commands won't have any effect on those pins.



Using pins 0 and 1 is tricky because it uses the pins normally used to communicate along the serial port. These lines are connected to the USB / Serial chip through resistors so it is possible to pull them high or low. However you will have to disable the serial mode that the software defaults to before they will respond to a simple digitalWrite(). It is best if these pins are left unused unless you are operating in a stand alone mode because things attached to them can hamper the downloading of of sketches.

Go Up