ESP8266 met 0,91 inch OLED schermpje

Hardware / electronica onderwerpen
Berichten: 8
Geregistreerd: 25 Okt 2017, 16:39

ESP8266 met 0,91 inch OLED schermpje

Berichtdoor henkdruiven » 25 Okt 2017, 21:00

Sinds kort beschik ik over een plankje met ESP8266 met WiFi en met een blauw/zwart OLED schermpje van 0,91 inch. Zie HIER

Ik heb uit nieuwsgierigheid eerst het schermpje uitgeprobeerd.
Het script stuurt "Hello World!" naar het schermpje en de seriële monitor en wacht een seconde.
Daarna wordt het schermpje gewist en stuurt "clearDisplay" naar de seriële monitor.
Na enige tijd (een paar seconden tot enige minuten) blijft het schermpje zwart maar aan de seriële monitor kun je zien dat het script gewoon doorloopt.

Heeft een van jullie een idee waar het mogelijk fout gaat?

Ik kan niet nagaan of dit bij alle plankjes voorkomt of dat het mogelijk gaat om een productiefout.

Code: Alles selecteren
// START SCRIPT
/*
  HelloWorld.ino
 
  "Hello World" version for U8x8 API

  Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)

  Copyright (c) 2016, olikraus@gmail.com
  All rights reserved.

  Redistribution and use in source and binary forms, with or without modification,
  are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice, this list
    of conditions and the following disclaimer.
   
  * Redistributions in binary form must reproduce the above copyright notice, this
    list of conditions and the following disclaimer in the documentation and/or other
    materials provided with the distribution.
*/

#include <U8x8lib.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif

U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE);   // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED

void setup(void)
{
  Serial.begin(115200);
 
  u8x8.begin();
  u8x8.setPowerSave(0); // Set powersave OFF
 
  u8x8.setFont( u8x8_font_amstrad_cpc_extended_f);
}

void loop(void)
{
  u8x8.drawString( 0, 0, "Hello World!");
  Serial.println( "Hello World!");
  delay( 1000);
  u8x8.clearDisplay( );
  Serial.println( "clearDisplay");
  delay( 1000);
}
// END SCRIPT

Advertisement

Terug naar ESP Hardware

Wie is er online?

Gebruikers in dit forum: Geen geregistreerde gebruikers en 1 gast