arduino horloge
34 berichten
• Pagina 3 van 4 • 1, 2, 3, 4
- astrofrostbyte
- Berichten: 229
- Geregistreerd: 20 Jan 2013, 12:01
Re: arduino horloge
deels ja, zo te zien worden er wat strings opgebouwt
kijk ook eens naar : http://playground.arduino.cc/Code/Time , voorbeeld sketch TimeSerial.pde lijkt een goed beginnetje.
kijk ook eens naar : http://playground.arduino.cc/Code/Time , voorbeeld sketch TimeSerial.pde lijkt een goed beginnetje.
Gear: Arduino- Uno,Due,Ethernet,Mega2560 , OLS LogicAnalyser, TDS1002, Rigol DG1022, J-Link EDU, BusPirate
Advertisement
Re: arduino horloge
dus deze code ?void setup()
{
Serial.begin(9600);
Ethernet.begin(mac,ip,gateway);
Serial.println("waiting for sync");
setSyncProvider(getNtpTime);
while(timeStatus()== timeNotSet)
; // wait until the time is set by the sync provider
}
void loop()
{
if( now() != prevDisplay) //update the display only if the time has changed
{
prevDisplay = now();
digitalClockDisplay();
}
}
void digitalClockDisplay(){
// digital clock display of the time
Serial.print(hour());
printDigits(minute());
printDigits(second());
Serial.print(" ");
Serial.print(day());
Serial.print(" ");
Serial.print(month());
Serial.print(" ");
Serial.print(year());
Serial.println();
}
void printDigits(int digits){
// utility function for digital clock display: prints preceding colon and leading 0
Serial.print(":");
if(digits < 10)
Serial.print('0');
Serial.print(digits);
}
/*-------- NTP code ----------*/
// ntp code not shown - see TimeNTP.pde example sketch
komt het dan ook direct op het lcd scherm?
{
Serial.begin(9600);
Ethernet.begin(mac,ip,gateway);
Serial.println("waiting for sync");
setSyncProvider(getNtpTime);
while(timeStatus()== timeNotSet)
; // wait until the time is set by the sync provider
}
void loop()
{
if( now() != prevDisplay) //update the display only if the time has changed
{
prevDisplay = now();
digitalClockDisplay();
}
}
void digitalClockDisplay(){
// digital clock display of the time
Serial.print(hour());
printDigits(minute());
printDigits(second());
Serial.print(" ");
Serial.print(day());
Serial.print(" ");
Serial.print(month());
Serial.print(" ");
Serial.print(year());
Serial.println();
}
void printDigits(int digits){
// utility function for digital clock display: prints preceding colon and leading 0
Serial.print(":");
if(digits < 10)
Serial.print('0');
Serial.print(digits);
}
/*-------- NTP code ----------*/
// ntp code not shown - see TimeNTP.pde example sketch
komt het dan ook direct op het lcd scherm?
- astrofrostbyte
- Berichten: 229
- Geregistreerd: 20 Jan 2013, 12:01
Re: arduino horloge
komt het dan ook direct op het lcd scherm?
nee. ... nou mischien JA als je PC een LCD scherm heeft. in de code staat Serial.print(....) , dus gaat het naar de terminal in arduino-ide
Gear: Arduino- Uno,Due,Ethernet,Mega2560 , OLS LogicAnalyser, TDS1002, Rigol DG1022, J-Link EDU, BusPirate
Re: arduino horloge
ga berekenen wat alle onderdelen kosten en waar te bestellen : arduino mini pro ,rtc module, Polymer Lithium Ion Battery - 2000mAh 3,7v ,lcd scherm, kabeltjes
vergeet ik nog iets?
vergeet ik nog iets?
- astrofrostbyte
- Berichten: 229
- Geregistreerd: 20 Jan 2013, 12:01
Re: arduino horloge
voor welk type schermpje ga je nu ?
Gear: Arduino- Uno,Due,Ethernet,Mega2560 , OLS LogicAnalyser, TDS1002, Rigol DG1022, J-Link EDU, BusPirate
- astrofrostbyte
- Berichten: 229
- Geregistreerd: 20 Jan 2013, 12:01
Re: arduino horloge
Je hebt gezien dat hij ook 5Volt nodig heeft?, dus puur op 3.7V draaien gaat nie lukken.
Gear: Arduino- Uno,Due,Ethernet,Mega2560 , OLS LogicAnalyser, TDS1002, Rigol DG1022, J-Link EDU, BusPirate
Re: arduino horloge
wat vinden jullie van dit scherm ?
http://www.amazon.com/SainSmartTM-Displ ... B008HWTVQ2
enkel de richting van hoe de tekst staat zou gewijzigd moeten worden is dit mogelijk
http://www.amazon.com/SainSmartTM-Displ ... B008HWTVQ2
enkel de richting van hoe de tekst staat zou gewijzigd moeten worden is dit mogelijk
34 berichten
• Pagina 3 van 4 • 1, 2, 3, 4
Wie is er online?
Gebruikers in dit forum: Geen geregistreerde gebruikers en 5 gasten