Code uploads to Nano but does not run

When I try to upload code onto my arduino nano it says it has uploaded but it hasn't done anything. What should i do?`

Global variables use 323 bytes (15%) of dynamic memory, leaving 1725 bytes for local variables. Maximum is 2048 bytes.
/Users/Nilesh/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/Users/Nilesh/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -P/dev/cu.usbserial-1420 -b57600 -D -Uflash:w:/var/folders/jf/6mq0_v1x77j0czrjdb2y8xjh0000gn/T/arduino_build_363966/sketch_jul27a.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 "/Users/Nilesh/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/Nilesh/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-1420
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/var/folders/jf/6mq0_v1x77j0czrjdb2y8xjh0000gn/T/arduino_build_363966/sketch_jul27a.ino.hex"
avrdude: writing flash (6254 bytes):

Writing | ################################################## | 100% 2.03s

avrdude: 6254 bytes of flash written
avrdude: verifying flash memory against /var/folders/jf/6mq0_v1x77j0czrjdb2y8xjh0000gn/T/arduino_build_363966/sketch_jul27a.ino.hex:
avrdude: load data flash data from input file /var/folders/jf/6mq0_v1x77j0czrjdb2y8xjh0000gn/T/arduino_build_363966/sketch_jul27a.ino.hex:
avrdude: input file /var/folders/jf/6mq0_v1x77j0czrjdb2y8xjh0000gn/T/arduino_build_363966/sketch_jul27a.ino.hex contains 6254 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.49s

avrdude: verifying ...
avrdude: 6254 bytes of flash verified

avrdude done.  Thank you.

Welcome to the forum

Topic split from another topic. Please do not add your own questions to the end of other people's topics.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

Please post your sketch, using code tags when you do

What is the sketch supposed to do ?

How do you know this?

I know this because my lcd display that i have connected to it is meant to show what i have coded
The lcd display is however working as it shows light.

My sketch is supposed to use a humidity and temperature sensor to show the temperature and humidity on a lcd display
Here is my sketch:

#include <DHT.h>
#include <DHT_U.h>

#include "DHT.h"
#define Type DHT11
#include <LiquidCrystal.h>
int rs=7;
int en=8;
int d4=9;
int d5=10;
int d6=11;
int d7=12;
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
 
int sensePin=2;
DHT HT(sensePin,Type);
float humidity;
float tempC;
float tempF;
int setTime=500;
int dt=1000;
 
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
HT.begin();
delay(setTime);
lcd.begin(16,2);
 
}
 
void loop() {
humidity=HT.readHumidity();
tempC=HT.readTemperature();
tempF=HT.readTemperature(true);
 
lcd.setCursor(0,0);
lcd.print("Temp C= ");
lcd.print(tempC);
lcd.setCursor(0,1);
lcd.print("Humidity= ");
lcd.print(humidity);
lcd.print(" %");
delay(500);
lcd.clear();
 
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.print("% Temperature ");
Serial.print(tempC);
Serial.print(" C ");
Serial.print(tempF);
Serial.println(" F ");
 
}

Put some Serial.print()s in the code so that you can tell whether it is running and which sections of code are running, if any

A Serial.print() in setup() after a Serial.begin() and another at the start of loop() would be a good start

im sure the code is running as i was previously connecting it to my arduino uno and it worked then but when i put it together with my nano, it did not work

Then I would suspect that you have a problem with your wiring. Are you using a breadboard with the Nano and, if so, did you use it with the Uno ?

I am using the same breadboard i used with my uno and I am pretty sure my wiring is correct as i checked it off https://toptechboy.com/arduino-tutorial-51-dht11-temperature-and-humidity-sensor-with-lcd-display/

Design and code heartbeat indicator by using the LED_BUILTIN simply.

How do i do that?

Sorry to ask you this basic question as i am a new learner.

@rishabhshah1

Post a picture to show your actual wiring.
Thank you for posting your sketch in the correct format.

Do you see the following in your serial monitor?

Try this in your code:


Nice pictures.

I have tried the LED BUILT_IN and it works fine.

Hi @rishabhshah1/ Try pushing the Nano board down until the pins are fully inserted into the breadboard. I can see from your picture that the pins are nowhere near to completely inserted. That might cause some pins to not have an electrical connection, or to have an unreliable connection, to the contacts in the breadboard.

I have pushed it down as much as it can go
Here is an image

No, is not enough. Your board should be pushed down 2-3mm more, in such position that the plastic of the nano touched the breadboard