Hello!
I am trying to run this very simple sketch on my Arduino Nano in an effort to do a demo test to control a l293d motor driver. I may have shorted something momentarily, because now that same Arduino Nano cannot seem to be found on any of the USB Serial ports. Input 1 is connected to digital pin 3 of the Nano and input 2 is connected to pin 2.
Here is that code:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(2,HIGH);
delay(500);
digitalWrite(2,LOW);
delay(500);
digitalWrite(3,HIGH);
delay(500);
digitalWrite(3,LOW);
delay(500);
}
The exact problem that is happening is that whenever I plug in (not upload a sketch to) the Arduino, a pop-up appears saying that the USB device is not recognised and that "it may have malfunctioned", though when I disconnected the motor driver and took the Arduino Nano out of the breadboard and tried plugging it back in, the onboard LEDs flashed as normal.
This is what the pop-up looks like:
And this is the Arduino IDE error:
The sketch compiles correctly, but the computer seems like it cannot connect to this Arduino. In fact, when I hover over the "tools" dropdown in the Arduino IDE and look at "Ports", it is a gray color and I cannot click on it to change the port I am using.
However, I have also tried with a different Arduino Nano as well as an Arduino Mega; which both work fine just like a normal Arudino should. This is what makes me think that I just ruined my Arduino Nano.
Here is my wiring (the blue wires are the leads goint to the terminals of the motor):
I really do not know what to do. I am currently working on a robotics project that requires these motor drivers for low current draw high accuracy motors, but it looks like I have burned up my only microcontroller that is currently not already in use for some other build...
Thank you to anyone who can help!
njmaas55