Hirdetés
- Luck Dragon: Asszociációs játék. :)
- sziku69: Fűzzük össze a szavakat :)
- gban: Ingyen kellene, de tegnapra
- sziku69: Szólánc.
- sh4d0w: Kalózkodás. Kalózkodás?
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- btz: Internet fejlesztés országosan!
- Pajac: száz pí
- GoodSpeed: Ágymatrac keresési kálvária
- Real Racing 3 - Freemium csoda
-
LOGOUT
Arduino hardverrel és szoftverrel foglakozó téma. Minden mikrovezérlő ami arduinoval programozható, és minden arduino program, board, és hardverrel kapcsolatos kérdések helye.
Új hozzászólás Aktív témák
-
olli
tag
Sziasztok!
Energia mérőhöz az eredeti programban nyomógombos lcd szerepel, a gombokkal kalibrál. Az lcd az A0 lábon csatlakozik./* 0.1- Button Function */
int buttonRead;
buttonRead = analogRead (0); // Read analog pin A0. Pin A0 automatically assigned for LCD Display Button function (cannot be changed)
currentButtonMillis = millis();
if(currentButtonMillis - startButtonMillis >= 300)
{
//Right button is pressed
if (buttonRead < 60)
{
myGLCD.clrScr(); // Clear the screen (black)
myGLCD.setFont(BigFont);
myGLCD.setColor(0, 0, 255);
myGLCD.setBackColor(0, 0, 255);
myGLCD.print ("PRESS <SELECT> ",20,20);
myGLCD.print ("TO CALLIBRATE ",20,50);
}
// Up button is pressed
if (buttonRead < 200 && buttonRead > 60) // Press up button to go to upper page
{
page = page - 1 ;
if( page <=0)
{ page = 1;}
startButtonMillis = millis();
}
// Down button is pressed
if (buttonRead < 400 && buttonRead > 200) // Press down button to go to lower page
{
page = page + 1;
if (page >3)
{ page = 3;
}
startButtonMillis = millis();
}
// Left button is pressed
if (buttonRead < 600 && buttonRead >400)
{
myGLCD.clrScr(); // Clear the screen (black)
myGLCD.setFont(BigFont);
myGLCD.setColor(0, 0, 255);
myGLCD.setBackColor(0, 0, 255);
myGLCD.print ("PRESS <SELECT> ",20,20);
myGLCD.print ("TO CALLIBRATE ",20,50);
}
// Select button is pressed
if (buttonRead < 800 && buttonRead > 600)
{
currentOffsetRead = 1; // to activate offset for current
voltageOffsetRead = 1; // to activate offset for voltage
powerOffsetRead = 1; // to activate offset for power // set display words starting at upper left corner
myGLCD.print ("INITIALIZING..... ",20,120); // set display words starting at lower left corner
myGLCD.print ("WAIT 5 SEC ..... ",20,150);
}
}
A nyomógombos lcd hiányában kihagyható: // Offset will automatically callibrate when SELECT Button on the LCD Display Shield is pressed.
// If you do not have LCD Display Shield, look into serial monitor to add or minus the value manually and key in here.
Pontosan hogyan tudom módosítani az értéket?
Érintő képernyő + mega 2560 lesz az alap hardwer, az érintőképernyő
gombjaival ki lehet váltani a fizikai gombokat?
Pl. megoldás egy pwm lábon kiadni a feszültség szinteket az A0 lábra?
Új hozzászólás Aktív témák
- Yamaha R-N402D sztereó erősítő
- HP ProBook 450 G7, 15,6" FHD IPS, I5-10210U, 8GB DDR4, 256GB SSD, W11, Számla, 1 év garancia ( olvas
- Apple MacBook Pro M2 12 C 16 GB/ 1 TB HUN 2023
- HP ProBook 440 G7, 14" FHD IPS, I5-10210U, 8GB DDR4, 256GB SSD, W11, Számla, 1 év garancia ( olvasd
- Lenovo Thinkcentre M710s SFF PC, I5-7500 CPU, 8GB DDR4, 256GB NVMe SSD, Win 11, Számla, 2 év garanci
- GYÖNYÖRŰ iPhone 12 mini 128GB Purple -1 ÉV GARANCIA - Kártyafüggetlen, MS3326, 94% Akkumulátor
- LG 27UL550-W - 27" IPS / 3840x2160 4K / 60Hz 5ms / HDR10 / AMD FreeSync
- Apple iPhone 14 pro 128GB,Újszerű,Dobozával, 12 hónap garanciával
- Tablet felvásárlás!! Samsung Galaxy Tab A8, Samsung Galaxy Tab A9, Samsung Galaxy Tab S6 Lite
- ÁRGARANCIA!Épített KomPhone i5 10400F 16/32/64GB RAM RX 7600 8GB GAMER PC termékbeszámítással
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
ekkold
