Hi,
I am testing a IR phototransistor as picture and code below, the UNO board got 3 red lights on in just a sudden and PC stay and nothing work, this is the second one, what can be wrong?
Thanks for help.
Adam
const int T1=0;
const int T2=1;
const int T3=2;
const int T4=3;
void setup(){
Serial.begin(9600);
Serial.println("xxx_setup!");
Serial.print("File : "), Serial.println(__FILE__);
Serial.print("Date : "), Serial.println(__DATE__);
}//end setup
void loop(){
Serial.print(" ");
Serial.print(analogRead(T1));
Serial.print(" ");
Serial.print(analogRead(T2));
Serial.print(" ");
Serial.print(analogRead(T3));
Serial.print(" ");
Serial.print(analogRead(T4));
Serial.print("\n");
delay(10);
}//end loop
ERROR:
Arduino: 1.8.16 (Windows 7), Board: "Arduino Nano, ATmega328P"
Sketch uses 2316 bytes (7%) of program storage space. Maximum is 30720 bytes.
Global variables use 358 bytes (17%) of dynamic memory, leaving 1690 bytes for local variables. Maximum is 2048 bytes.
C:\Users\HUA.DELLV-PC\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\HUA.DELLV-PC\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\HUA~1.DEL\AppData\Local\Temp\arduino_build_555873/IR_reader_M.ino.hex:i
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\HUA.DELLV-PC\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_open(): can't open device "\\.\COM3": The system cannot find the file specified.
avrdude done. Thank you.
Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.