Code Not Working

I burnt some parts in my Arduino Uno. I accidentaly connected the cables to 3.3V and 5V instead of 5V and GND. I'm trying some new codes to upload. It does upload, but it does not work. Can anyone help me? Here'sthe circuit and codes: Login | Tinkercad

Edit: ON and L LED's light up.

Burnt parts = dead card. Time for new hardware. Never let the magic smoke out!

how do you know?
post code here (as code)

Sorry, not going to tinkertcad but

Arduino Uno with the AVR in a socket lets you replace the AVR with another bootloaded AVR when pins get burned. The Arduino site and others like Nick Gammon's have directions and software to bootload new AVR chips. It's part of the design to be able to make your own boards.

Adafruit sells bootloaded Uno chips reasonably if they have the chips in stock.

I agree. I found getting the Uno's ATmega328P(U) difficult to purchase due to "out of stock" so I went with the Nano (CH340 usually, so a little getting-used-to) to bridge the gap to use live sketches until the other parts arrive.

There was some smoke coming out of it. I thought it was burnt and it was really hot afterwards.

And here is the codes:

// C++ code
//
#include <Adafruit_LiquidCrystal.h>

int nem = 0;

Adafruit_LiquidCrystal lcd_1(0);

Adafruit_LiquidCrystal lcd_2(0);

void setup()
{
  lcd_1.begin(16, 2);
  pinMode(A0, INPUT);
  Serial.begin(9600);
  lcd_2.begin(16, 2);
  pinMode(3, OUTPUT);
  pinMode(2, OUTPUT);
}

void loop()
{
  nem = analogRead(A0);
  Serial.println(nem);
  lcd_1.print("Toprak Nemi:");
  lcd_2.print(nem);
  delay(1000); // Wait for 1000 millisecond(s)
  lcd_1.clear();
  if (nem < 360) {
    digitalWrite(3, HIGH);
    digitalWrite(2, LOW);
  } else {
    digitalWrite(3, LOW);
    digitalWrite(2, HIGH);
  }
}

picture?

1 Like

I havent got any, but i can show its current status.

are you sure this is right way to create an object?
show how you connect LCDs to arduino

idk im new. i got it like, today

See what DIP AVRs they do have, Nick's software works for many.
The Mighty 1284 (DIP ATmega1284P) is a 40-pin wide AVR with 16KB RAM, 2 serial ports and 32 IO pins. In 2019 I paid $5.50 ea when ATmega328P-PU ran me $2.15 ea when I bought 5.
The 1284 is the size of the 8088 in the 80's PC/XT's.

Mine's a CH340 tho. Its a clone. Aand i dont think any chips get shipped here. Only full boards.

The CH340 is the USB chip, not the controller chip. The Uno is supposed to come with an ATmega328P in the socket but sometimes it's a 168 instead, there are 4 chips in the 48/88/168/328 family that can be used... and each step down has half the RAM. EEPROM and flash at almost the same price!

Oh. Thanks for the info but for a chip to ship here is much more costlier than buying a new Arduino Uno. And smoke came out of the place where many smaller chips are located in.

ok. will show it

Possibly power circuit. See the schematic: https://www.arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf

Yeah probably. I also connected 3.3V and 5V with no GND. So its very possible.

I also have 1 LCD the other one is prob junk code. I thought it was gonna write it to the second line.


İt looks something like this

a mess
at least i see the LCD is with i2c backpack.
but it is not Adafruit one. no need to use Adafruit_LiquidCrystal.h

You may want to buy more than one new Uno or a cheaper board like the Nano (more than one) and a breadboard (one) to plug it into. Knockoff Nanos got down to < $5 when Knockoff Unos (CH340 USB chip) were > $10.

What I don't get or got wrong is were you able to load a program after you went for smoke? (I am go for smoke... chip smoke!)