Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
project:esp8266_oledx32 [2019/03/06 11:37] cyberian jak na bitmapu |
project:esp8266_oledx32 [2019/03/06 13:58] cyberian |
||
---|---|---|---|
Line 29: | Line 29: | ||
Seznam konvertorů: | Seznam konvertorů: | ||
* GIMP [[https://www.gimp.org/downloads/]] | * GIMP [[https://www.gimp.org/downloads/]] | ||
- | * LCD Assisant [[http://en.radzio.dxp.pl/bitmap_converter/]]* | + | * LCD Assisant [[http://en.radzio.dxp.pl/bitmap_converter/]] |
- | * Image2Code https://github.com/adafruit/Adafruit-GFX-Library#useful-resources** | + | * Image2Code https://github.com/adafruit/Adafruit-GFX-Library#useful-resources |
- | * konvertory krom gimpu jsem prověřil na virustotal.com, nicméně i tak doporučuji překontrolovat je znovu | + | Konvertory krom gimpu jsem prověřil na virustotal.com, nicméně i tak doporučuji překontrolovat je znovu. |
- | ** Je to nástroj poskytnutý v sekci použitelných zdrojů ke knihovně Adafruit GFX napsaný v javě. Je nutno ho zkompilovat přes příkaz "gradle build". Pokud vám to nepůjde, mohu vám v případě windows poslat již sestavenou verzi | + | Image2Code je nástroj poskytnutý v sekci použitelných zdrojů ke knihovně Adafruit GFX napsaný v javě. Je nutno ho zkompilovat přes příkaz "gradle build". Pokud vám to nepůjde, mohu vám v případě windows poslat již sestavenou verzi |
Pokud se nepovede konverze z nějakého důvodu ani tak, pak vložte do pole tento obsah: | Pokud se nepovede konverze z nějakého důvodu ani tak, pak vložte do pole tento obsah: | ||
Line 80: | Line 80: | ||
Kód je upraveným příkladem pro SSD1306. V místě, kde je komentář "// ZDE VLOZIT hexaznaky bitmapy" je nutno vložit kód bitmapy, jehož získání bude popsáno níže. | Kód je upraveným příkladem pro SSD1306. V místě, kde je komentář "// ZDE VLOZIT hexaznaky bitmapy" je nutno vložit kód bitmapy, jehož získání bude popsáno níže. | ||
+ | </br> | ||
- | <code> | + | Kód: |
- | /************************************************************************** | + | <file cpp oled.ino> |
- | This is an example for our Monochrome OLEDs based on SSD1306 drivers | + | |
- | Pick one up today in the adafruit shop! | + | // This is an example for our Monochrome OLEDs based on SSD1306 drivers |
- | ------> http://www.adafruit.com/category/63_98 | + | </file> |
+ | Pick one up today in the adafruit shop! | ||
+ | ------> http://www.adafruit.com/category/63_98 | ||
- | This example is for a 128x32 pixel display using I2C to communicate | + | This example is for a 128x32 pixel display using I2C to communicate |
- | 3 pins are required to interface (two I2C and one reset). | + | 3 pins are required to interface (two I2C and one reset). |
- | Adafruit invests time and resources providing this open | + | Adafruit invests time and resources providing this open |
- | source code, please support Adafruit and open-source | + | source code, please support Adafruit and open-source |
- | hardware by purchasing products from Adafruit! | + | hardware by purchasing products from Adafruit! |
- | Written by Limor Fried/Ladyada for Adafruit Industries, | + | Written by Limor Fried/Ladyada for Adafruit Industries, |
- | with contributions from the open source community. | + | with contributions from the open source community. |
- | BSD license, check license.txt for more information | + | BSD license, check license.txt for more information |
- | All text above, and the splash screen below must be | + | All text above, and the splash screen below must be |
- | included in any redistribution. | + | included in any redistribution. |
- | **************************************************************************/ | + | </file> |
- | + | ||
- | //#include <SPI.h> | + | |
#include <Wire.h> | #include <Wire.h> | ||
#include <Adafruit_GFX.h> | #include <Adafruit_GFX.h> | ||
Line 120: | Line 120: | ||
//bitmapa | //bitmapa | ||
+ | |||
static const unsigned char PROGMEM Mari_pole [] = | static const unsigned char PROGMEM Mari_pole [] = | ||
{ | { | ||
Line 446: | Line 447: | ||
delay(1000); | delay(1000); | ||
} | } | ||
- | + | </file> | |
- | </code> | + | |