VAŽNO! Ovdje pročitajte kako se registrirati na forum. Bez registracije, nećete biti u mogućnosti pisati na forumu.

senzor temperature i display 16*2

Pitanja vezana uz sve senzore iz ponude e-radionica.com
Odgovorite
cerovlje1#5270
Novak
Novak
Postovi: 3
Pridružen/a: sri kol 12, 2020 10:08 pm

senzor temperature i display 16*2

Post Postao/la cerovlje1#5270 » sri kol 12, 2020 10:35 pm

Pozdrav,
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);
}
Greška kada želim učitat na croduino3

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.
slika

slika
Avatar
david.zovko#8239
e-radionica.com team
e-radionica.com team
Postovi: 436
Pridružen/a: ned tra 15, 2018 2:59 pm
Lokacija: Osijek, Croatia
Kontakt:

Re: senzor temperature i display 16*2

Post Postao/la david.zovko#8239 » čet kol 13, 2020 2:25 pm

Pozdrav

vidim da je upload ok, što znači da nema grešaka u sintaksi koda te je konekcija dobra. Dakle, greška može biti ili u logici koda ili u spajanju. S obzirom da ste rekli da je logika dobra, ostaje greška u spajanju. Možete li još jednom probati sve odspojiti pa ponovno spojiti?

Ako ne pomogne, možete li nam staviti sliku kako ste spojili?

Hvala!
cerovlje1#5270
Novak
Novak
Postovi: 3
Pridružen/a: sri kol 12, 2020 10:08 pm

Re: senzor temperature i display 16*2

Post Postao/la cerovlje1#5270 » sub kol 15, 2020 12:21 pm

Pozdrav,

slika spajanja.

slika

Hvala
Lp
Avatar
david.zovko#8239
e-radionica.com team
e-radionica.com team
Postovi: 436
Pridružen/a: ned tra 15, 2018 2:59 pm
Lokacija: Osijek, Croatia
Kontakt:

Re: senzor temperature i display 16*2

Post Postao/la david.zovko#8239 » pet kol 28, 2020 9:36 am

Pozdrav,

meni sve izgleda OK, a posebno ako kažete da ste probali još jednom sve prespojiti.

Banalna stvar, ali sada mi pada napamet: jeste li podesili kontrast poteciometrom na poleđini LCD-a?
cerovlje1#5270
Novak
Novak
Postovi: 3
Pridružen/a: sri kol 12, 2020 10:08 pm

Re: senzor temperature i display 16*2

Post Postao/la cerovlje1#5270 » čet ruj 03, 2020 8:57 pm

Pozdrav,
ali potenciometra nemam na displayu 1602A samo ovoga kojeg sam ja postavio bočno?
Lp
Avatar
david.zovko#8239
e-radionica.com team
e-radionica.com team
Postovi: 436
Pridružen/a: ned tra 15, 2018 2:59 pm
Lokacija: Osijek, Croatia
Kontakt:

Re: senzor temperature i display 16*2

Post Postao/la david.zovko#8239 » pet ruj 04, 2020 9:17 pm

Ispričavam se, I2C LCD adapter ima potenciometar iza, kod Vas je ovaj eksterni. Jeste li probali njega podesiti? Mijenja li se kontrast na ekranu kada okrećete potenciometar?

Isprike još jednom!
Odgovorite