- Honor Magic V5 - méret a kamera mögött
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- Hatalmas kedvezménnyel nyit az Ulefone új csúcsmodellje
- One mobilszolgáltatások
- Fotók, videók mobillal
- Samsung Galaxy Watch (Tizen és Wear OS) ingyenes számlapok, kupon kódok
- iPhone topik
- Minden a BlackBerry telefonokról és rendszerről
- Huawei P30 - kell ennél több?
- Google Pixel topik
Hirdetés
-
Mobilarena
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
- Makulátlan ASUS TUF Gaming F15 gamer laptop(RTX 3050Ti, i5-11400H)
- Samsung C-HW-C440G 2.1 Soundbar Hangprojektor - 270W
- MSI Katana GF66 15.6" FHD IPS i7-12700H RTX 3050 16GB 512GB NVMe gar
- Hisense U5120GW 5.1.2 csatornás Hangprojektor 510 W teljesítmény -Dolby Atmos és DTS:X támogatás
- T16 Gen2 16" FHD+ IPS i7-1365U 16GB 1TB NVMe magyar vbill ujjlolv IR kam gar
- Felturbóznád a gèped? Ezt Neked ajánljuk!
- EREDETI NINTENDO Pokemon Go Plus autocatcher dobozban eladó
- Nvidia Quadro M2000/ P2000/ P4000/ RTX 4000/ RTX 5000/ RTX A2000
- Azonnali készpénzes nVidia RTX 5000 sorozat videokártya felvásárlás személyesen / csomagküldéssel
- Eladó karcmentes Apple iPhone 11 128GB / 12 hó jótállással
Állásajánlatok
Cég: FOTC
Város: Budapest