Új hozzászólás Aktív témák

  • lanszelot

    addikt

    válasz olli #19553 üzenetére

    igen, #19544 így telepítettem.

    weiss:
    igen, de akkor a blink se megy fel rá
    ATmega328PB -t kell használnom semmi mással nem működik.

    ennél, ha loop ba rakom a kiírást akkor folyamatosan odébb gyalogoltatja , és egyidő után kimegy a kijelzőből.
    hogyan tudom állandó helyre kiíratni?

    jelenleg itt tartok, de
    - gyalogol a felirat,
    - és nem kap értéket a hőmérőtől:

    #include <Adafruit_SSD1306.h>
    #include <splash.h>
    #include <max6675.h>
    //Outputs from 6675 to arduino uno pins.
    int thermoDO = 4;
    int thermoCS = 5;
    int thermoCLK = 6;
    MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
    Adafruit_SSD1306 display = Adafruit_SSD1306(128, 64, &Wire);
    void setup() {
      Serial.begin(9600);
      Serial.println("MAX6675 test");
      // wait for MAX chip to stabilize
      delay(500);
      // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
      display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // Address 0x3C for 128x32
      display.display();
      delay(2000);
      
    }
    void loop() {
       
      // For the MAX6675 to update, you must delay AT LEAST 250ms between reads!
      delay(1000);
      display.clearDisplay();      //this line to clear previous logo
      display.setTextColor(WHITE); //without this no display
      display.print("C = "); 
      display.print(thermocouple.readCelsius());//your TEXT here
      display.display();            //to shows or update your TEXT
     }

    [ Szerkesztve ]

Új hozzászólás Aktív témák