danas mi je stigao croduino 3 spojio senzor temperature potenciometar i display ali ne radi, na arduino uno u školi sa tim kodom radi.Image Zašto da li je moguće da ne radi pločica kako treba ?
Kode:
Kod: Označite sve
#include <dht11.h>
#include <LiquidCrystal.h>
dht11 DHT11;
#define DHT11PIN 2
LiquidCrystal lcd(4, 6, 10, 11, 12, 13); //Define the connection LCD pin
void setup()
{
lcd.begin(16, 2); // set up the LCD's number of columns and rows:
lcd.clear(); //Clears the LCD screen and positions the cursor in the upper-left corner
delay(1000); //延时1000ms
}
void loop()
{
int chk = DHT11.read(DHT11PIN);
lcd.setCursor(0, 0); // set the cursor to column 0, line 0
lcd.print("Humidity:");// Print a message of "Humidity: "to the LCD.
lcd.print((float)DHT11.humidity, 2);// Print a message of "Humidity: "to the LCD.
lcd.print(" % "); // Print the unit of the centigrade temperature to the LCD.
lcd.setCursor(0, 1); // set the cursor to column 0, line 0
lcd.print("Temp: ");// Print a message of "Temp: "to the LCD.
lcd.print((float)DHT11.temperature, 2);// Print a centigrade temperature to the LCD.
lcd.print(" C "); // Print the unit of the centigrade temperature to the LCD.
delay(1000);
}
Kod: Označite sve
Sketch uses 4300 bytes (13%) of program storage space. Maximum is 30720 bytes.
Global variables use 89 bytes (4%) of dynamic memory, leaving 1959 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM10 -b57600 -D -Uflash:w:C:\Users\User\AppData\Local\Temp\arduino_build_680359/display.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:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM10
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 "C:\Users\User\AppData\Local\Temp\arduino_build_680359/display.ino.hex"
avrdude: writing flash (4300 bytes):
Writing | ################################################## | 100% 1.24s
avrdude: 4300 bytes of flash written
avrdude: verifying flash memory against C:\Users\User\AppData\Local\Temp\arduino_build_680359/display.ino.hex:
avrdude: load data flash data from input file C:\Users\User\AppData\Local\Temp\arduino_build_680359/display.ino.hex:
avrdude: input file C:\Users\User\AppData\Local\Temp\arduino_build_680359/display.ino.hex contains 4300 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.93s
avrdude: verifying ...
avrdude: 4300 bytes of flash verified
avrdude done. Thank you.

