Aller au contenu

GO Print

zardiax

Membres
  • Compteur de contenus

    3
  • Inscrit(e) le

  • Dernière visite

Récompenses de zardiax

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Badges récents

0

Réputation sur la communauté

  1. zardiax

    double affichage lcd

    MERCIE pour vos aide
  2. zardiax

    double affichage lcd

    et j'utilise un arduino mega
  3. zardiax

    double affichage lcd

    bonjour voila je suis en train de faire un projet et j'ai besoin de deux écran lcd un qui affiche l'heure et l'autre défile un message. Le problem c'est que l'heure s'actualise que quand le message a fait son déroulement et je ne veux pas çà il me faut donc un multitache mais je ne sais pas comment faire.voici mon code actuellement:#include <DS3231.h>#include <LiquidCrystal.h>DS3231 rtc(SDA, SCL);LiquidCrystal lcd(1, 2, 4, 5, 6, 7);LiquidCrystal lcd2(36, 34, 32, 30, 28, 26);void setup() { rtc.begin(); lcd.begin(16,2); lcd2.begin(16, 2); // Print a message to the LCD. lcd2.print("bonjour"); }void loop() {tim();mes();}void tim () { lcd.setCursor(0,0); lcd.print("Time: "); lcd.print(rtc.getTimeStr()); lcd.setCursor(0,1); lcd.print("Date: "); lcd.print(rtc.getDateStr()); rtc.setTime(24, 0, 0); // Set the time to 12:00:00 (24hr format) rtc.setDate(8, 10, 2019);}void mes () {{// scroll 13 positions (string length) to the left // to move it offscreen left: for (int positionCounter = 0; positionCounter < 13; positionCounter++) { // scroll one position left: lcd2.scrollDisplayLeft(); // wait a bit: delay(150); } // scroll 29 positions (string length + display length) to the right // to move it offscreen right: for (int positionCounter = 0; positionCounter < 29; positionCounter++) { // scroll one position right: lcd2.scrollDisplayRight(); // wait a bit: delay(150); } // scroll 16 positions (display length + string length) to the left // to move it back to center: for (int positionCounter = 0; positionCounter < 16; positionCounter++) { // scroll one position left: lcd2.scrollDisplayLeft(); // wait a bit: delay(150); } // delay at the end of the full loop: delay(1000);}}
×
×
  • Créer...