Repository: CoretechR/ESP32-Handheld Branch: master Commit: 802b0b0f24d6 Files: 23 Total size: 1.3 MB Directory structure: gitextract_r38j_t42/ ├── Adafruit_SHARP_Memory_Display/ │ ├── Adafruit_SharpMem.cpp │ ├── Adafruit_SharpMem.h │ └── README.txt ├── Eagle Files/ │ ├── Memory Display V2.brd │ ├── Memory Display V2.sch │ ├── Memory Display.brd │ └── Memory Display.sch ├── LICENSE ├── Memo/ │ ├── 1_Menu.ino │ ├── Calc.ino │ ├── ClockApp.ino │ ├── Hackaday.ino │ ├── Level.ino │ ├── Lunar.ino │ ├── Memo.ino │ ├── News.ino │ ├── Paint.ino │ ├── bmp.h │ ├── esp32-hal-spi.c │ ├── keyboardDemo.ino │ ├── ulp.s │ └── ulp_main.h └── README.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp ================================================ /********************************************************************* This is an Arduino library for our Monochrome SHARP Memory Displays Pick one up today in the adafruit shop! ------> http://www.adafruit.com/products/1393 These displays use SPI to communicate, 3 pins are required to interface Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, check license.txt for more information All text above, and the splash screen must be included in any redistribution *********************************************************************/ #include "Adafruit_SharpMem.h" #ifndef _swap_int16_t #define _swap_int16_t(a, b) { int16_t t = a; a = b; b = t; } #endif #ifndef _swap_uint16_t #define _swap_uint16_t(a, b) { uint16_t t = a; a = b; b = t; } #endif /************************************************************************** Sharp Memory Display Connector ----------------------------------------------------------------------- Pin Function Notes === ============== =============================== 1 VIN 3.3-5.0V (into LDO supply) 2 3V3 3.3V out 3 GND 4 SCLK Serial Clock 5 MOSI Serial Data Input 6 CS Serial Chip Select 9 EXTMODE COM Inversion Select (Low = SW clock/serial) 7 EXTCOMIN External COM Inversion Signal 8 DISP Display On(High)/Off(Low) **************************************************************************/ #define SHARPMEM_BIT_WRITECMD (0x80) #define SHARPMEM_BIT_VCOM (0x40) #define SHARPMEM_BIT_CLEAR (0x20) #define TOGGLE_VCOM do { _sharpmem_vcom = _sharpmem_vcom ? 0x00 : SHARPMEM_BIT_VCOM; } while(0); byte *sharpmem_buffer; static SPISettings spiSettings(2000000, LSBFIRST, SPI_MODE0); //send data with 2MHz SPI clock with data sent from LSB first static SPIClass *_SPI; /* ************* */ /* CONSTRUCTORS */ /* ************* */ Adafruit_SharpMem::Adafruit_SharpMem(uint8_t clk, uint8_t mosi, uint8_t ss, uint16_t width, uint16_t height) : Adafruit_GFX(width, height) { _clk = clk; _mosi = mosi; _ss = ss; } boolean Adafruit_SharpMem::begin(void) { // Set pin state before direction to make sure they start this way (no glitching) digitalWrite(_ss, HIGH); digitalWrite(_clk, LOW); digitalWrite(_mosi, HIGH); pinMode(_ss, OUTPUT); pinMode(_clk, OUTPUT); pinMode(_mosi, OUTPUT); #if defined(USE_FAST_PINIO) clkport = portOutputRegister(digitalPinToPort(_clk)); clkpinmask = digitalPinToBitMask(_clk); dataport = portOutputRegister(digitalPinToPort(_mosi)); datapinmask = digitalPinToBitMask(_mosi); #endif _SPI = new SPIClass(HSPI); _SPI->begin(); _SPI->setFrequency(8000000); // 4 Mhz // Set the vcom bit to a defined state _sharpmem_vcom = SHARPMEM_BIT_VCOM; sharpmem_buffer = (byte *)malloc((WIDTH * HEIGHT) / 8); if (!sharpmem_buffer) return false; setRotation(0); return true; } /* *************** */ /* PRIVATE METHODS */ /* *************** */ /**************************************************************************/ /*! @brief Sends a single byte in pseudo-SPI. */ /**************************************************************************/ void Adafruit_SharpMem::sendbyte(uint8_t data) { _SPI->beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0)); _SPI->transfer(data); _SPI->endTransaction(); } void Adafruit_SharpMem::sendbyteLSB(uint8_t data) { _SPI->beginTransaction(SPISettings(8000000, LSBFIRST, SPI_MODE0)); _SPI->transfer(data); _SPI->endTransaction(); } /* ************** */ /* PUBLIC METHODS */ /* ************** */ // 1<= _width) || (y < 0) || (y >= _height)) return; switch(rotation) { case 1: _swap_int16_t(x, y); x = WIDTH - 1 - x; break; case 2: x = WIDTH - 1 - x; y = HEIGHT - 1 - y; break; case 3: _swap_int16_t(x, y); y = HEIGHT - 1 - y; break; } if(color) { sharpmem_buffer[(y * WIDTH + x) / 8] |= pgm_read_byte(&set[x & 7]); } else { sharpmem_buffer[(y * WIDTH + x) / 8] &= pgm_read_byte(&clr[x & 7]); } } /**************************************************************************/ /*! @brief Gets the value (1 or 0) of the specified pixel from the buffer @param[in] x The x position (0 based) @param[in] y The y position (0 based) @return 1 if the pixel is enabled, 0 if disabled */ /**************************************************************************/ uint8_t Adafruit_SharpMem::getPixel(uint16_t x, uint16_t y) { if((x >= _width) || (y >= _height)) return 0; // <0 test not needed, unsigned switch(rotation) { case 1: _swap_uint16_t(x, y); x = WIDTH - 1 - x; break; case 2: x = WIDTH - 1 - x; y = HEIGHT - 1 - y; break; case 3: _swap_uint16_t(x, y); y = HEIGHT - 1 - y; break; } return sharpmem_buffer[(y * WIDTH + x) / 8] & pgm_read_byte(&set[x & 7]) ? 1 : 0; } /**************************************************************************/ /*! @brief Clears the screen */ /**************************************************************************/ void Adafruit_SharpMem::clearDisplay() { memset(sharpmem_buffer, 0xff, (WIDTH * HEIGHT) / 8); // Send the clear screen command rather than doing a HW refresh (quicker) digitalWrite(_ss, HIGH); sendbyte(_sharpmem_vcom | SHARPMEM_BIT_CLEAR); sendbyteLSB(0x00); TOGGLE_VCOM; digitalWrite(_ss, LOW); } /**************************************************************************/ /*! @brief Fills the screen */ /**************************************************************************/ void Adafruit_SharpMem::fillScreen(uint16_t color) { memset(sharpmem_buffer, color?0xFF:0x00, (WIDTH * HEIGHT) / 8); } /**************************************************************************/ /*! @brief Renders the contents of the pixel buffer on the LCD */ /**************************************************************************/ void Adafruit_SharpMem::refresh(void) { uint16_t i, totalbytes, currentline, oldline; totalbytes = (WIDTH * HEIGHT) / 8; // Send the write command digitalWrite(_ss, HIGH); sendbyte(SHARPMEM_BIT_WRITECMD | _sharpmem_vcom); TOGGLE_VCOM; // Send the address for line 1 oldline = currentline = 1; sendbyteLSB(currentline); // Send image buffer for (i=0; i http://www.adafruit.com/products/1393 These displays use SPI to communicate, 3 pins are required to interface Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, check license.txt for more information All text above, and the splash screen must be included in any redistribution *********************************************************************/ #define BLACK 0 #define WHITE 1 #if ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif #if defined(RAMSTART) && defined(RAMEND) && ((RAMEND-RAMSTART) < 4096) #warning "Display may not work on devices with less than 4K RAM" #endif #include #ifdef __AVR #include #elif defined(ESP8266) #include #endif #include #if defined(ARDUINO_STM32_FEATHER) typedef volatile uint32 RwReg; //#define USE_FAST_PINIO #elif defined(ARDUINO_FEATHER52) || defined (ESP8266) || defined (ESP32) || defined(__SAM3X8E__) || defined(ARDUINO_ARCH_SAMD) typedef volatile uint32_t RwReg; #define USE_FAST_PINIO // tested! #elif defined (__AVR__) || defined(TEENSYDUINO) typedef volatile uint8_t RwReg; #define USE_FAST_PINIO #else #undef USE_FAST_PINIO #endif class Adafruit_SharpMem : public Adafruit_GFX { public: Adafruit_SharpMem(uint8_t clk, uint8_t mosi, uint8_t ss, uint16_t w = 96, uint16_t h = 96); boolean begin(); void drawPixel(int16_t x, int16_t y, uint16_t color); uint8_t getPixel(uint16_t x, uint16_t y); void clearDisplay(); void fillScreen(uint16_t color); void refresh(void); private: uint8_t _ss, _clk, _mosi; uint32_t _sharpmem_vcom; #ifdef USE_FAST_PINIO volatile RwReg *dataport, *clkport; uint32_t datapinmask, clkpinmask; #endif void sendbyte(uint8_t data); void sendbyteLSB(uint8_t data); }; ================================================ FILE: Adafruit_SHARP_Memory_Display/README.txt ================================================ This is an Arduino library for our Monochrome SHARP Memory Displays Pick one up today in the adafruit shop! ------> http://www.adafruit.com/products/1393 These displays use SPI to communicate, 3 pins are required to interface To install this library, check out our detailed library install tutorial: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Also requires the Adafruit GFX library, install the same way https://github.com/adafruit/Adafruit-GFX-Library Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! Written by Limor Fried & Kevin Townsend for Adafruit Industries. BSD license, check license.txt for more information All text above, and the splash screen must be included in any redistribution ================================================ FILE: Eagle Files/Memory Display V2.brd ================================================ 3.7V LiPo REV2 Maximilian Kern 02/2020 github.com/CoretechR/ESP32-Handheld <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >Name >Value UP UP >Name >Value >NAME >VALUE <h3>SparkFun RF, WiFi, Cellular, and Bluetooth</h3> In this library you'll find things that send or receive RF-- cellular modules, Bluetooth, WiFi, etc. <br> <br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is <b> the end user's responsibility</b> to ensure correctness and suitablity for a given componet or application. <br> <br>If you enjoy using this library, please buy one of our products at <a href=" www.sparkfun.com">SparkFun.com</a>. <br> <br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br> <br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. Keepout Zone >Name >Value <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <p><b>Generic 1608 (0603) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <p><b>Generic 1608 (0603) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE >NAME >VALUE <p><b>Generic 2012 (0805) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <h3>SC-88/SC70-6/SOT-363 6-pin Package</h3> <p><a href="http://www.onsemi.com/pub_link/Collateral/MBT3904DW1T1-D.PDF">Example Datasheet</a></p> >NAME >VALUE <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find drivers, regulators, and amplifiers.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <b>Small Outline Transistor</b> >NAME >VALUE >Name >Value <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find connectors and sockets- basically anything that can be plugged into or onto.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >Name >Value + - >Name >Value <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find all manner of digital ICs- microcontrollers, memory chips, logic chips, FPGAs, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. Longer version of SSOP-20 Package >NAME >VALUE <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find discrete semiconductors- transistors, diodes, TRIACs, optoisolators, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >NAME >VALUE >NAME >VALUE <BR>Wurth Elektronik FPC Connector and FFC Cable<br><Hr> <BR><BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR><br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> -----<BR> -----<BR> -----<BR> -----<BR> -----<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER> <FONT FACE=ARIAL SIZE=3><br> ---------------------------<BR> <B><I><span style='font-size:26pt; color:#FF6600;'>WE </span></i></b> <BR> ---------------------------<BR><b>Würth Elektronik</b></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> ---------O---<BR> ----O--------<BR> ---------O---<BR> ----O--------<BR> ---------O---<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR> <BR><BR></FONT> </TD> </TR> <TR> <TD COLSPAN=7>&nbsp; </TD> </TR> </TABLE> <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More than you expect<BR><BR><BR></B> <HR><BR> <b>Würth Elektronik eiSos GmbH & Co. KG</b><br> EMC & Inductive Solutions<br> Max-Eyth-Str.1<br> D-74638 Waldenburg<br> <br> Tel: +49 (0)7942-945-0<br> Fax:+49 (0)7942-945-405<br> <br> <a href="http://www.we-online.com/eagle">http://www.we-online.com/eagle</a><br> <a href="mailto:libraries@we-online.com">libraries@we-online.com</a> <BR><BR> <br><HR><BR> Neither CadSoft nor WE-eiSos does warrant that this library is error-free or <br> that it meets your specific requirements.<br><BR> Please contact us for more information.<br><BR><br> <hr> Eagle Version 6, Library Revision 2015b, 08.04.2015<br> <HR> Copyright: Würth Elektronik <b>WR-FPC 0.5mm SMT ZIF Horizontal Bottom Contact, 10 Pins >NAME 1 >VALUE Developed by element14 :<br> element14 CAD Library consolidation.ulp at 30/07/2012 11:22:31 * * >NAME >VALUE <BR>Wurth Elektronik - EMC Components, Power Magnetics, Signal & Communications<br><Hr> <BR><BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR><br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> -----<BR> -----<BR> -----<BR> -----<BR> -----<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER> <FONT FACE=ARIAL SIZE=3><br> ---------------------------<BR> <B><I><span style='font-size:26pt; color:#FF6600;'>WE </span></i></b> <BR> ---------------------------<BR><b>Würth Elektronik</b></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> ---------O---<BR> ----O--------<BR> ---------O---<BR> ----O--------<BR> ---------O---<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR> <BR><BR></FONT> </TD> </TR> <TR> <TD COLSPAN=7>&nbsp; </TD> </TR> </TABLE> <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More than you expect<BR><BR><BR></B> <HR><BR> <b>Würth Elektronik eiSos GmbH & Co. KG</b><br> EMC & Inductive Solutions<br> Max-Eyth-Str.1<br> D-74638 Waldenburg<br> <br> Tel: +49 (0)7942-945-0<br> Fax:+49 (0)7942-945-5000<br> <br> <a href="http://www.we-online.com/web/en/electronic_components/produkte_pb/bauteilebibliotheken/eagle_4.php">www.we-online.com/eagle</a><br> <a href="mailto:libraries@we-online.com">libraries@we-online.com</a> <BR><BR> <br><HR><BR> Neither Autodesk nor Würth Elektronik eiSos does warrant that this library is error-free or <br> that it meets your specific requirements.<br><BR> Please contact us for more information.<br><BR><br> <HR> Eagle Version 6, Library Revision 2019e, 2019-06-27<br> <HR> Copyright: Würth Elektronik >VALUE >NAME Y X Z <BR>Wurth Elektronik - Switches<br><Hr> <BR><BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR><br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> -----<BR> -----<BR> -----<BR> -----<BR> -----<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER> <FONT FACE=ARIAL SIZE=3><br> ---------------------------<BR> <B><I><span style='font-size:26pt; color:#FF6600;'>WE </span></i></b> <BR> ---------------------------<BR><b>Würth Elektronik</b></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> ---------O---<BR> ----O--------<BR> ---------O---<BR> ----O--------<BR> ---------O---<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR> <BR><BR></FONT> </TD> </TR> <TR> <TD COLSPAN=7>&nbsp; </TD> </TR> </TABLE> <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More than you expect<BR><BR><BR></B> <HR><BR> <b>Würth Elektronik eiSos GmbH & Co. KG</b><br> EMC & Inductive Solutions<br> Max-Eyth-Str.1<br> D-74638 Waldenburg<br> <br> Tel: +49 (0)7942-945-0<br> Fax:+49 (0)7942-945-405<br> <br> <a href="http://www.we-online.com/eagle">http://www.we-online.com/eagle</a><br> <a href="mailto:libraries@we-online.com">libraries@we-online.com</a> <BR><BR> <br><HR><BR> Neither CadSoft nor WE-eiSos does warrant that this library is error-free or <br> that it meets your specific requirements.<br><BR> Please contact us for more information.<br><BR><br> <hr> Eagle Version 6, Library Revision 2016d, 2016-05-06<br> <HR> Copyright: Würth Elektronik WS-TUS-3.5x4.7 mm side push SMD Tact Switch, 4 pins >NAME >VALUE 1 <b>OSH Park Design Rules</b> <p> Please make sure your boards conform to these design rules. </p> <p> Note, that not all DRC settings must be set by the manufacturer. Several can be adjusted for the design, including those listed on our docs page here. <a href="http://docs.oshpark.com/design-tools/eagle/design-rules-files/">Adjustable Settings</a> </p> Since Version 6.2.2 text objects can contain more than one line, which will not be processed correctly with this version. ================================================ FILE: Eagle Files/Memory Display V2.sch ================================================ <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >Name >Value UP UP >NAME >VALUE <b>DPDT Slide Switch SMD</b> www.SparkFun.com SKU : Comp-SMDS >Name >Value >Name >Value >NAME >VALUE <h3>SWITCH-SPDT_KIT</h3> Through-hole SPDT Switch<br> <br> <b>Warning:</b> This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side. >NAME >VALUE >Name >Value >Value >Name >NAME >VALUE Small 5-way tactile joystick, COM-10063<p> 4UCON SF303GJ26 <b>SPDT Switch</b><br> Simple slide switch, Spark Fun Electronics SKU : COM-00102<br> DPDT SMT slide switch, AYZ0202, SWCH-08179 >NAME >VALUE >NAME >VALUE >NAME >VALUE <p>Source: http://media.digikey.com/pdf/Data%20Sheets/C&K/KMT_0xx_NGJ_LHS_Drawing.pdf</p> >NAME >VALUE >NAME >VALUE >NAME >VALUE <p>SMT Tact Switches</p> <ul> <li>6x6mm - Digikey: P12940SCT-ND</li> <li>KMR2 (4.6x2.8mm) - Digikey: 401-1426-1-ND</li> <li>EVQ-PQHB55 - Light Touch, 160GF (4.5x4.5mm) - Digikey: P8090SCT-ND</li> <li>KMT0 - KMT021 NGJ LHS (etc.) IP68/Waterproof - Digikey: CKN10289CT-ND</li> </ul> <h3>SparkFun RF, WiFi, Cellular, and Bluetooth</h3> In this library you'll find things that send or receive RF-- cellular modules, Bluetooth, WiFi, etc. <br> <br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is <b> the end user's responsibility</b> to ensure correctness and suitablity for a given componet or application. <br> <br>If you enjoy using this library, please buy one of our products at <a href=" www.sparkfun.com">SparkFun.com</a>. <br> <br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br> <br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. Keepout Zone >Name >Value Keepout Zone >Name >Value >Name >Value <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <h3>AXIAL-0.3</h3> <p>Commonly used for 1/4W through-hole resistors. 0.3" pitch between holes.</p> >Name >Value <h3>AXIAL-0.1</h3> <p>Commonly used for 1/4W through-hole resistors. 0.1" pitch between holes.</p> >Name >Value <h3>AXIAL-0.1-KIT</h3> <p>Commonly used for 1/4W through-hole resistors. 0.1" pitch between holes.</p> <p><b>Warning:</b> This is the KIT version of the AXIAL-0.1 package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</p> >Name >Value <h3>AXIAL-0.3-KIT</h3> <p>Commonly used for 1/4W through-hole resistors. 0.3" pitch between holes.</p> <p><b>Warning:</b> This is the KIT version of the AXIAL-0.3 package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</p> >NAME >VALUE <p><b>Generic 1608 (0603) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE >NAME >VALUE <h3>10kΩ resistor</h3> <p>A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. Resistors act to reduce current flow, and, at the same time, act to lower voltage levels within circuits. - Wikipedia</p> RES-08296 RES-09334 <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <p><b>Generic 1005 (0402) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <p><b>Generic 1608 (0603) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <h3>CAP-PTH-SMALL-KIT</h3> Commonly used for small ceramic capacitors. Like our 0.1uF (http://www.sparkfun.com/products/8375) or 22pF caps (http://www.sparkfun.com/products/8571).<br> <br> <b>Warning:</b> This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side. <p><b>Generic 3216 (1206) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <p><b>Generic 2012 (0805) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <p><b>Generic 3225 (1210) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE >NAME >VALUE >NAME >VALUE >NAME >VALUE <h3>0.1µF ceramic capacitors</h3> <p>A capacitor is a passive two-terminal electrical component used to store electrical energy temporarily in an electric field.</p> <h3>10.0µF ceramic capacitors</h3> <p>A capacitor is a passive two-terminal electrical component used to store electrical energy temporarily in an electric field.</p> <h3>4.7µF ceramic capacitors</h3> <p>A capacitor is a passive two-terminal electrical component used to store electrical energy temporarily in an electric field.</p> <h3>47pF ceramic capacitors</h3> <p>A capacitor is a passive two-terminal electrical component used to store electrical energy temporarily in an electric field.</p> CAP-08280 <h3>1µF ceramic capacitors</h3> <p>A capacitor is a passive two-terminal electrical component used to store electrical energy temporarily in an electric field.</p> <h3>SparkFun Power Symbols</h3> This library contains power, ground, and voltage-supply symbols. <br> <br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is <b> the end user's responsibility</b> to ensure correctness and suitablity for a given componet or application. <br> <br>If you enjoy using this library, please buy one of our products at <a href=" www.sparkfun.com">SparkFun.com</a>. <br> <br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br> <br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <h3>3.3V Voltage Supply</h3> >VALUE <h3>Digital Ground Supply</h3> >VALUE <h3>3.3V Supply Symbol</h3> <p>Power supply symbol for a specifically-stated 3.3V source.</p> <h3>Ground Supply Symbol</h3> <p>Generic signal ground supply symbol.</p> <h3>SC-88/SC70-6/SOT-363 6-pin Package</h3> <p><a href="http://www.onsemi.com/pub_link/Collateral/MBT3904DW1T1-D.PDF">Example Datasheet</a></p> >NAME >VALUE >NAME >VALUE <h3>MBT3904DW1 Dual NPN Transistors</h3> <p>The MBT3904W1 puts two general purpose 3904 NPN transistors in a single package.</p> <p><a href="http://www.onsemi.com/pub_link/Collateral/MBT3904DW1T1-D.PDF">Datasheet</a></p> <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find non-functional items- supply symbols, logos, notations, frame blocks, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >VALUE >VALUE >VALUE >VALUE <b>SUPPLY SYMBOL</b> <b>V_BATT</b><br> Generic symbol for the battery input to a system. <b>SUPPLY SYMBOL</b> <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find connectors and sockets- basically anything that can be plugged into or onto.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >NAME >VALUE >NAME >VALUE 2mm SMD side-entry connector. tDocu layer indicates the actual physical plastic housing. +/- indicate SparkFun standard batteries and wiring. >Name >Value >Name >Value >NAME >VALUE >NAME >VALUE This footprint was designed to help hold the alignment of a through-hole component (i.e. 6-pin header) while soldering it into place. You may notice that each hole has been shifted either up or down by 0.005 of an inch from it's more standard position (which is a perfectly straight line). This slight alteration caused the pins (the squares in the middle) to touch the edges of the holes. Because they are alternating, it causes a "brace" to hold the component in place. 0.005 has proven to be the perfect amount of "off-center" position when using our standard breakaway headers. Although looks a little odd when you look at the bare footprint, once you have a header in there, the alteration is very hard to notice. Also, if you push a header all the way into place, it is covered up entirely on the bottom side. This idea of altering the position of holes to aid alignment will be further integrated into the Sparkfun Library for other footprints. It can help hold any component with 3 or more connection pins. >NAME >VALUE >NAME >VALUE >NAME >VALUE >Name >Value + - >NAME >VALUE >Name >Value + - <H3>JST-2-PTH-KIT</h3> 2-Pin JST, through-hole connector<br> <br> <b>Warning:</b> This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side. >Name >Value + - >Name >Value + - >Name >Value >VALUE >NAME <h3>USB - C 16 Pin</h3> Exposes the minimal pins needed to implement a USB 2.x legacy device. USB-C >VALUE >NAME Standard 2-pin 0.1" header. Use with <br> - straight break away headers ( PRT-00116)<br> - right angle break away headers (PRT-00553)<br> - swiss pins (PRT-00743)<br> - machine pins (PRT-00117)<br> - female headers (PRT-00115)<br><br> Molex polarized connector foot print use with: PRT-08233 with associated crimp pins and housings.<br><br> 2.54_SCREWTERM for use with PRT-10571.<br><br> 3.5mm Screw Terminal footprints for PRT-08084<br><br> 5mm Screw Terminal footprints for use with PRT-08432 <h3>USB Type C 16Pin Connector</h3> Super Speed pins not available on the 16-pin purely SMD connector so this part is best for USB 2.0 implementations. D1 and D2 are tied together enabling D+/- no matter which way the cable is plugged into the connector. The two channel configuration pins (CC1/2) are exposed. These are normally connected to ground via 5.1k resistors but can be reconfigured for high current/high power applications. <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find drivers, regulators, and amplifiers.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <b>Small Outline Transistor</b> >NAME >VALUE >Name >Value >Name >Value >NAME >VALUE >Name >Value >NAME >VALUE >Name >Value >NAME >VALUE >NAME >VALUE <b>Miniature single cell, fully integrated Li-Ion, Li-polymer charge management controller</b><br> http://ww1.microchip.com/downloads/en/DeviceDoc/20001984g.pdf<br> IC-09995 <b>Resettable Fuse PTC</b> Resettable Fuse. Spark Fun Electronics SKU : COM-08357 <b>Voltage Regulator LDO</b> Standard 150mA LDO voltage regulator in SOT-23 layout. Micrel part MIC5205. BP (by-pass) pin is used to lower output noise with 470pF cap. >VALUE <b>SUPPLY SYMBOL</b> <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find all manner of digital ICs- microcontrollers, memory chips, logic chips, FPGAs, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. Longer version of SSOP-20 Package >NAME >VALUE >Name >Value <h3>FTDI FT231X Full Speed USB to Full-handshake UART</h3> This USB2.0 Full Speed IC offers a compact bridge to full handshake UART interfaces. The device is a UART, capable of operating up to 3MBaud, with low power consumption (8mA). The FT231X includes the complete FT-X series feature set and enables USB to be added into a system design quickly and easily over a UART interface.<br><br> <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find discrete semiconductors- transistors, diodes, TRIACs, optoisolators, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >NAME >VALUE <B>Diode</B><p> Basic SMA packaged diode. Good for reverse polarization protection. Common part #: MBRA140 >NAME >VALUE >NAME >VALUE <b>TO 220 Vertical</b> Package works with various parts including N-Channel MOSFET SparkFun SKU: COM-10213 >NAME >VALUE >NAME >VALUE >NAME >VALUE D S G Schottky diodes in SFE's production catalog<p> BAT20J 1A 23V 0.62Vf<br> RB751 120mA 40V 0.37Vf<br> PMEG4005EJ 0.5A 40V 0.42Vf<br> MBRA140 1A 40V 0.5Vf<br> B340A 3A 40V SMA <br> Generic PMOSFET <ul> <li> IRLML2244 - TRANS-11153 (SOT-23 -20V -4.3A) (1.Gate 2.Source 3.Drain) </li> <li> FQP27P06 - <a href="http://www.sparkfun.com/products/10349">COM-10349</a> (TO-220 -60V -27A) (1.Gate 2.Source 3.Drain) </li> </ul> <BR>Wurth Elektronik FPC Connector and FFC Cable<br><Hr> <BR><BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR><br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> -----<BR> -----<BR> -----<BR> -----<BR> -----<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER> <FONT FACE=ARIAL SIZE=3><br> ---------------------------<BR> <B><I><span style='font-size:26pt; color:#FF6600;'>WE </span></i></b> <BR> ---------------------------<BR><b>Würth Elektronik</b></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> ---------O---<BR> ----O--------<BR> ---------O---<BR> ----O--------<BR> ---------O---<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR> <BR><BR></FONT> </TD> </TR> <TR> <TD COLSPAN=7>&nbsp; </TD> </TR> </TABLE> <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More than you expect<BR><BR><BR></B> <HR><BR> <b>Würth Elektronik eiSos GmbH & Co. KG</b><br> EMC & Inductive Solutions<br> Max-Eyth-Str.1<br> D-74638 Waldenburg<br> <br> Tel: +49 (0)7942-945-0<br> Fax:+49 (0)7942-945-405<br> <br> <a href="http://www.we-online.com/eagle">http://www.we-online.com/eagle</a><br> <a href="mailto:libraries@we-online.com">libraries@we-online.com</a> <BR><BR> <br><HR><BR> Neither CadSoft nor WE-eiSos does warrant that this library is error-free or <br> that it meets your specific requirements.<br><BR> Please contact us for more information.<br><BR><br> <hr> Eagle Version 6, Library Revision 2015b, 08.04.2015<br> <HR> Copyright: Würth Elektronik <b>WR-FPC 0.5mm SMT ZIF Horizontal Bottom Contact, 10 Pins >NAME 1 >VALUE >NAME >VALUE <b>WR-FPC 0.5mm SMT ZIF Horizontal Bottom Contact, 10 Pins</b>=>Code : Con_FPC_ZIF_0.50_68711014522 <br><a href="http://katalog.we-online.de/media/images/eican/Con_FPC_ZIF_0.50_6871xx14522_pf2.jpg" title="Enlarge picture"> <img src="http://katalog.we-online.de/media/thumbs2/eican/thb_Con_FPC_ZIF_0.50_6871xx14522_pf2.jpg" width="320"></a><p> Details see: <a href="http://katalog.we-online.de/en/em/687_1xx_145_22">http://katalog.we-online.de/en/em/687_1xx_145_22</a><p> Created 2014-07-09, Karrer Zheng<br> 2014 (C) Würth Elektronik <b>Supply Symbols</b><p> GND, VCC, 0V, +5V, -5V, etc.<p> Please keep in mind, that these devices are necessary for the automatic wiring of the supply signals.<p> The pin name defined in the symbol is identical to the net which is to be wired automatically.<p> In this library the device names are the same as the pin names of the symbols, therefore the correct signal names appear next to the supply symbols in the schematic.<p> <author>Created by librarian@cadsoft.de</author> >VALUE <b>SUPPLY SYMBOL</b> Developed by element14 :<br> element14 CAD Library consolidation.ulp at 30/07/2012 11:22:31 * * >NAME >VALUE >NAME >VALUE Synchronous Boost Regulator <BR>Wurth Elektronik - EMC Components, Power Magnetics, Signal & Communications<br><Hr> <BR><BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR><br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> -----<BR> -----<BR> -----<BR> -----<BR> -----<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER> <FONT FACE=ARIAL SIZE=3><br> ---------------------------<BR> <B><I><span style='font-size:26pt; color:#FF6600;'>WE </span></i></b> <BR> ---------------------------<BR><b>Würth Elektronik</b></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> ---------O---<BR> ----O--------<BR> ---------O---<BR> ----O--------<BR> ---------O---<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR> <BR><BR></FONT> </TD> </TR> <TR> <TD COLSPAN=7>&nbsp; </TD> </TR> </TABLE> <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More than you expect<BR><BR><BR></B> <HR><BR> <b>Würth Elektronik eiSos GmbH & Co. KG</b><br> EMC & Inductive Solutions<br> Max-Eyth-Str.1<br> D-74638 Waldenburg<br> <br> Tel: +49 (0)7942-945-0<br> Fax:+49 (0)7942-945-5000<br> <br> <a href="http://www.we-online.com/web/en/electronic_components/produkte_pb/bauteilebibliotheken/eagle_4.php">www.we-online.com/eagle</a><br> <a href="mailto:libraries@we-online.com">libraries@we-online.com</a> <BR><BR> <br><HR><BR> Neither Autodesk nor Würth Elektronik eiSos does warrant that this library is error-free or <br> that it meets your specific requirements.<br><BR> Please contact us for more information.<br><BR><br> <HR> Eagle Version 6, Library Revision 2019e, 2019-06-27<br> <HR> Copyright: Würth Elektronik >VALUE >NAME >Name >Value <b>SMD Shielded Tiny Power Inductor <br> <br> <br><b> Characteristics <br> <br></b></b> Extremely flat power inductor <br> <br> High current capability <br> <br> Magnetically shielded which results in a low leakage field <br> <brr> Operating temperature: –40 °C to +125 °C <br> <br> <br><b> Applications <br> <br></b> Portable power like PDA, digital camera, PCMCIA cards and displays <br> <br> DC/DC converter <br> <br> Embedded PC <br> <br> Mobile data gathering, telemetric <br> <br> <br> <br><a href="http://katalog.we-online.de/media/images/v2/WE-TPC_Gruppe_2.jpg" title="Enlarge picture"> <img src="http://katalog.we-online.de/media/images/v2/WE-TPC_Gruppe_2.jpg" width="320"></a><p> Details see: <a href="http://katalog.we-online.de/en/pbs/WE-TPC?">http://katalog.we-online.de/en/pbs/WE-TPC?</a><p> </b>Updated by Dan Xu 2014-07-11<br> </b>2014 (C) Wurth Elektronik Y X Z >NAME >VALUE <BR>Wurth Elektronik - Switches<br><Hr> <BR><BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR><br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> -----<BR> -----<BR> -----<BR> -----<BR> -----<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER> <FONT FACE=ARIAL SIZE=3><br> ---------------------------<BR> <B><I><span style='font-size:26pt; color:#FF6600;'>WE </span></i></b> <BR> ---------------------------<BR><b>Würth Elektronik</b></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> ---------O---<BR> ----O--------<BR> ---------O---<BR> ----O--------<BR> ---------O---<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR> <BR><BR></FONT> </TD> </TR> <TR> <TD COLSPAN=7>&nbsp; </TD> </TR> </TABLE> <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More than you expect<BR><BR><BR></B> <HR><BR> <b>Würth Elektronik eiSos GmbH & Co. KG</b><br> EMC & Inductive Solutions<br> Max-Eyth-Str.1<br> D-74638 Waldenburg<br> <br> Tel: +49 (0)7942-945-0<br> Fax:+49 (0)7942-945-405<br> <br> <a href="http://www.we-online.com/eagle">http://www.we-online.com/eagle</a><br> <a href="mailto:libraries@we-online.com">libraries@we-online.com</a> <BR><BR> <br><HR><BR> Neither CadSoft nor WE-eiSos does warrant that this library is error-free or <br> that it meets your specific requirements.<br><BR> Please contact us for more information.<br><BR><br> <hr> Eagle Version 6, Library Revision 2016d, 2016-05-06<br> <HR> Copyright: Würth Elektronik WS-TUS-3.5x4.7 mm side push SMD Tact Switch, 4 pins >NAME >VALUE 1 >NAME >VALUE <b>3.5x4.7 mm SMD side push WS-TASU</b><br> <BR> <BR> <br><a href="http://katalog.we-online.de/media/images/v2/Family_WS_TUS_Normal_SMD_Side-Push_4343x10458xx_pf2.jpg" title="Enlarge picture"> <img src="http://katalog.we-online.de/media/images/v2/Family_WS_TUS_Normal_SMD_Side-Push_4343x10458xx_pf2.jpg" width="320"></a><p> Details see: <a href="http://katalog.we-online.de/en/em/TASU_3_5X4_7_SMD_SIDE_PUSH">http://katalog.we-online.de/en/em/TASU_3_5X4_7_SMD_J-BEND_SIDE_PUSH</a><p> 2015 (C) Wurth Elektronik ESP32 Wroom Boot Mode Configuration Pin Default Boot Download GPIO0 1 1 0 U0TXD 1 1 x GPIO2 0 x 0 GPIO4 0 x x MTDO 1 x x GPIO5 1 1 x If U0TXD, GPIO2, GPIO5 are floating, GPIO0 determines boot mode If DTR is LOW, toggling RTS from HIGH to LOW resets to run mode. If RTS is HIGH, toggling DTR from LOW to HIGH resets to bootloader. Charge current: I_CHG = 1000 / R_PROG 1000 / 4kOhm = 256mA Power Supply FTDI Adapter LiPo Charger Joystick and Buttons 5V Charge Pump for LCD RTC GPIOs: 0,2,4,12-15,25-27,32-39 usable by ULP, internal Pullups /Pulldowns ext0 for one pin as wakeup source ext1 for multiple pins as wakeup source only for GPIOs: 32-39? no internal Pullups /Pulldowns SPI Flash Low Power Handheld REV2 Maximilian Kern 02/2020 STAT Shutdown - High Z No Battery Present - High Z Constant Voltage - Low Charge Complete - High ADC_BAT for voltage sensing and as a wakeup source (R11 acts as pulldown) R_top = R_bot*(V_out/V_fb-1) Sharp Display Connector MPU6050 Alternative Regulator: XC6220B33 with C7=C8=10µF Automatic supply selection: P-MOSFET only conducts when V_USB is available Hardware pulldown necessary for RTC interrupts Since Version 6.2.2 text objects can contain more than one line, which will not be processed correctly with this version. ================================================ FILE: Eagle Files/Memory Display.brd ================================================ SHARP MEMORY LCD 3.7V LiPo Maximilian Kern 09/2019 <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >Name >Value UP UP >Name >Value >NAME >VALUE <h3>SparkFun RF, WiFi, Cellular, and Bluetooth</h3> In this library you'll find things that send or receive RF-- cellular modules, Bluetooth, WiFi, etc. <br> <br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is <b> the end user's responsibility</b> to ensure correctness and suitablity for a given componet or application. <br> <br>If you enjoy using this library, please buy one of our products at <a href=" www.sparkfun.com">SparkFun.com</a>. <br> <br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br> <br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. Keepout Zone >Name >Value <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <p><b>Generic 1608 (0603) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <p><b>Generic 1608 (0603) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE >NAME >VALUE <p><b>Generic 2012 (0805) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <h3>SC-88/SC70-6/SOT-363 6-pin Package</h3> <p><a href="http://www.onsemi.com/pub_link/Collateral/MBT3904DW1T1-D.PDF">Example Datasheet</a></p> >NAME >VALUE <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find drivers, regulators, and amplifiers.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <b>Small Outline Transistor</b> >NAME >VALUE >Name >Value <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find connectors and sockets- basically anything that can be plugged into or onto.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >Name >Value + - PCB Front >NAME >VALUE <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find all manner of digital ICs- microcontrollers, memory chips, logic chips, FPGAs, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. Longer version of SSOP-20 Package >NAME >VALUE <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find discrete semiconductors- transistors, diodes, TRIACs, optoisolators, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >NAME >VALUE >NAME >VALUE <BR>Wurth Elektronik FPC Connector and FFC Cable<br><Hr> <BR><BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR><br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> -----<BR> -----<BR> -----<BR> -----<BR> -----<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER> <FONT FACE=ARIAL SIZE=3><br> ---------------------------<BR> <B><I><span style='font-size:26pt; color:#FF6600;'>WE </span></i></b> <BR> ---------------------------<BR><b>Würth Elektronik</b></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> ---------O---<BR> ----O--------<BR> ---------O---<BR> ----O--------<BR> ---------O---<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR> <BR><BR></FONT> </TD> </TR> <TR> <TD COLSPAN=7>&nbsp; </TD> </TR> </TABLE> <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More than you expect<BR><BR><BR></B> <HR><BR> <b>Würth Elektronik eiSos GmbH & Co. KG</b><br> EMC & Inductive Solutions<br> Max-Eyth-Str.1<br> D-74638 Waldenburg<br> <br> Tel: +49 (0)7942-945-0<br> Fax:+49 (0)7942-945-405<br> <br> <a href="http://www.we-online.com/eagle">http://www.we-online.com/eagle</a><br> <a href="mailto:libraries@we-online.com">libraries@we-online.com</a> <BR><BR> <br><HR><BR> Neither CadSoft nor WE-eiSos does warrant that this library is error-free or <br> that it meets your specific requirements.<br><BR> Please contact us for more information.<br><BR><br> <hr> Eagle Version 6, Library Revision 2015b, 08.04.2015<br> <HR> Copyright: Würth Elektronik <b>WR-FPC 0.5mm SMT ZIF Horizontal Bottom Contact, 10 Pins >NAME 1 >VALUE Developed by element14 :<br> element14 CAD Library consolidation.ulp at 30/07/2012 11:22:31 * * >NAME >VALUE <BR>Wurth Elektronik - EMC Components, Power Magnetics, Signal & Communications<br><Hr> <BR><BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR><br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> -----<BR> -----<BR> -----<BR> -----<BR> -----<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER> <FONT FACE=ARIAL SIZE=3><br> ---------------------------<BR> <B><I><span style='font-size:26pt; color:#FF6600;'>WE </span></i></b> <BR> ---------------------------<BR><b>Würth Elektronik</b></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> ---------O---<BR> ----O--------<BR> ---------O---<BR> ----O--------<BR> ---------O---<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR> <BR><BR></FONT> </TD> </TR> <TR> <TD COLSPAN=7>&nbsp; </TD> </TR> </TABLE> <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More than you expect<BR><BR><BR></B> <HR><BR> <b>Würth Elektronik eiSos GmbH & Co. KG</b><br> EMC & Inductive Solutions<br> Max-Eyth-Str.1<br> D-74638 Waldenburg<br> <br> Tel: +49 (0)7942-945-0<br> Fax:+49 (0)7942-945-5000<br> <br> <a href="http://www.we-online.com/web/en/electronic_components/produkte_pb/bauteilebibliotheken/eagle_4.php">www.we-online.com/eagle</a><br> <a href="mailto:libraries@we-online.com">libraries@we-online.com</a> <BR><BR> <br><HR><BR> Neither Autodesk nor Würth Elektronik eiSos does warrant that this library is error-free or <br> that it meets your specific requirements.<br><BR> Please contact us for more information.<br><BR><br> <HR> Eagle Version 6, Library Revision 2019e, 2019-06-27<br> <HR> Copyright: Würth Elektronik >VALUE >NAME <b>OSH Park Design Rules</b> <p> Please make sure your boards conform to these design rules. </p> <p> Note, that not all DRC settings must be set by the manufacturer. Several can be adjusted for the design, including those listed on our docs page here. <a href="http://docs.oshpark.com/design-tools/eagle/design-rules-files/">Adjustable Settings</a> </p> Since Version 6.2.2 text objects can contain more than one line, which will not be processed correctly with this version. ================================================ FILE: Eagle Files/Memory Display.sch ================================================ <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >Name >Value UP UP >NAME >VALUE <b>DPDT Slide Switch SMD</b> www.SparkFun.com SKU : Comp-SMDS >Name >Value >Name >Value >NAME >VALUE <h3>SWITCH-SPDT_KIT</h3> Through-hole SPDT Switch<br> <br> <b>Warning:</b> This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side. >NAME >VALUE >Name >Value >Value >Name >NAME >VALUE Small 5-way tactile joystick, COM-10063<p> 4UCON SF303GJ26 <b>SPDT Switch</b><br> Simple slide switch, Spark Fun Electronics SKU : COM-00102<br> DPDT SMT slide switch, AYZ0202, SWCH-08179 >NAME >VALUE >NAME >VALUE >NAME >VALUE <p>Source: http://media.digikey.com/pdf/Data%20Sheets/C&K/KMT_0xx_NGJ_LHS_Drawing.pdf</p> >NAME >VALUE >NAME >VALUE >NAME >VALUE <p>SMT Tact Switches</p> <ul> <li>6x6mm - Digikey: P12940SCT-ND</li> <li>KMR2 (4.6x2.8mm) - Digikey: 401-1426-1-ND</li> <li>EVQ-PQHB55 - Light Touch, 160GF (4.5x4.5mm) - Digikey: P8090SCT-ND</li> <li>KMT0 - KMT021 NGJ LHS (etc.) IP68/Waterproof - Digikey: CKN10289CT-ND</li> </ul> <h3>SparkFun RF, WiFi, Cellular, and Bluetooth</h3> In this library you'll find things that send or receive RF-- cellular modules, Bluetooth, WiFi, etc. <br> <br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is <b> the end user's responsibility</b> to ensure correctness and suitablity for a given componet or application. <br> <br>If you enjoy using this library, please buy one of our products at <a href=" www.sparkfun.com">SparkFun.com</a>. <br> <br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br> <br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. Keepout Zone >Name >Value Keepout Zone >Name >Value >Name >Value <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <h3>AXIAL-0.3</h3> <p>Commonly used for 1/4W through-hole resistors. 0.3" pitch between holes.</p> >Name >Value <h3>AXIAL-0.1</h3> <p>Commonly used for 1/4W through-hole resistors. 0.1" pitch between holes.</p> >Name >Value <h3>AXIAL-0.1-KIT</h3> <p>Commonly used for 1/4W through-hole resistors. 0.1" pitch between holes.</p> <p><b>Warning:</b> This is the KIT version of the AXIAL-0.1 package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</p> >Name >Value <h3>AXIAL-0.3-KIT</h3> <p>Commonly used for 1/4W through-hole resistors. 0.3" pitch between holes.</p> <p><b>Warning:</b> This is the KIT version of the AXIAL-0.3 package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</p> >NAME >VALUE <p><b>Generic 1608 (0603) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE >NAME >VALUE <h3>10kΩ resistor</h3> <p>A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. Resistors act to reduce current flow, and, at the same time, act to lower voltage levels within circuits. - Wikipedia</p> RES-08296 RES-09334 <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <p><b>Generic 1005 (0402) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <p><b>Generic 1608 (0603) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <h3>CAP-PTH-SMALL-KIT</h3> Commonly used for small ceramic capacitors. Like our 0.1uF (http://www.sparkfun.com/products/8375) or 22pF caps (http://www.sparkfun.com/products/8571).<br> <br> <b>Warning:</b> This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side. <p><b>Generic 3216 (1206) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <p><b>Generic 2012 (0805) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE <p><b>Generic 3225 (1210) package</b></p> <p>0.2mm courtyard excess rounded to nearest 0.05mm.</p> >NAME >VALUE >NAME >VALUE >NAME >VALUE >NAME >VALUE <h3>0.1µF ceramic capacitors</h3> <p>A capacitor is a passive two-terminal electrical component used to store electrical energy temporarily in an electric field.</p> <h3>10.0µF ceramic capacitors</h3> <p>A capacitor is a passive two-terminal electrical component used to store electrical energy temporarily in an electric field.</p> <h3>4.7µF ceramic capacitors</h3> <p>A capacitor is a passive two-terminal electrical component used to store electrical energy temporarily in an electric field.</p> <h3>47pF ceramic capacitors</h3> <p>A capacitor is a passive two-terminal electrical component used to store electrical energy temporarily in an electric field.</p> CAP-08280 <h3>1µF ceramic capacitors</h3> <p>A capacitor is a passive two-terminal electrical component used to store electrical energy temporarily in an electric field.</p> <h3>SparkFun Power Symbols</h3> This library contains power, ground, and voltage-supply symbols. <br> <br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is <b> the end user's responsibility</b> to ensure correctness and suitablity for a given componet or application. <br> <br>If you enjoy using this library, please buy one of our products at <a href=" www.sparkfun.com">SparkFun.com</a>. <br> <br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br> <br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <h3>3.3V Voltage Supply</h3> >VALUE <h3>Digital Ground Supply</h3> >VALUE <h3>3.3V Supply Symbol</h3> <p>Power supply symbol for a specifically-stated 3.3V source.</p> <h3>Ground Supply Symbol</h3> <p>Generic signal ground supply symbol.</p> <h3>SC-88/SC70-6/SOT-363 6-pin Package</h3> <p><a href="http://www.onsemi.com/pub_link/Collateral/MBT3904DW1T1-D.PDF">Example Datasheet</a></p> >NAME >VALUE >NAME >VALUE <h3>MBT3904DW1 Dual NPN Transistors</h3> <p>The MBT3904W1 puts two general purpose 3904 NPN transistors in a single package.</p> <p><a href="http://www.onsemi.com/pub_link/Collateral/MBT3904DW1T1-D.PDF">Datasheet</a></p> <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find non-functional items- supply symbols, logos, notations, frame blocks, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >VALUE >VALUE >VALUE >VALUE <b>SUPPLY SYMBOL</b> <b>V_BATT</b><br> Generic symbol for the battery input to a system. <b>SUPPLY SYMBOL</b> <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find connectors and sockets- basically anything that can be plugged into or onto.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >NAME >VALUE >NAME >VALUE 2mm SMD side-entry connector. tDocu layer indicates the actual physical plastic housing. +/- indicate SparkFun standard batteries and wiring. >Name >Value >Name >Value >NAME >VALUE >NAME >VALUE This footprint was designed to help hold the alignment of a through-hole component (i.e. 6-pin header) while soldering it into place. You may notice that each hole has been shifted either up or down by 0.005 of an inch from it's more standard position (which is a perfectly straight line). This slight alteration caused the pins (the squares in the middle) to touch the edges of the holes. Because they are alternating, it causes a "brace" to hold the component in place. 0.005 has proven to be the perfect amount of "off-center" position when using our standard breakaway headers. Although looks a little odd when you look at the bare footprint, once you have a header in there, the alteration is very hard to notice. Also, if you push a header all the way into place, it is covered up entirely on the bottom side. This idea of altering the position of holes to aid alignment will be further integrated into the Sparkfun Library for other footprints. It can help hold any component with 3 or more connection pins. >NAME >VALUE >NAME >VALUE >NAME >VALUE >Name >Value + - >NAME >VALUE >Name >Value + - <H3>JST-2-PTH-KIT</h3> 2-Pin JST, through-hole connector<br> <br> <b>Warning:</b> This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side. >Name >Value + - >Name >Value + - Package for an SMT Micro-B connector. Digikey part #H11613-ND *** Unproven*** >NAME >VALUE <h3>Micro B Right Angle through-hole PCB plug connector</h3> <b>**Unproven**</b><br> See digikey part #H11673TR-ND >Name >Value <h3>Micro B USB Plug Assembly - Straight Through-hole</h3> <b>**UNPROVEN**</b><Br> See Digikey part #H11497-ND >Name >Value <h3>USB Micro-B Plug Connector</h3> Manufacturer part #: ZX80-B-5SA<br> Manufacturer: Hirose<br><br> <b>***Unproven***</b> (Passed 1:1 printout test though!) >Name >Value PCB Front >NAME >VALUE >VALUE >NAME >NAME >VALUE SHIELD VCC D- D+ ID GND Standard 2-pin 0.1" header. Use with <br> - straight break away headers ( PRT-00116)<br> - right angle break away headers (PRT-00553)<br> - swiss pins (PRT-00743)<br> - machine pins (PRT-00117)<br> - female headers (PRT-00115)<br><br> Molex polarized connector foot print use with: PRT-08233 with associated crimp pins and housings.<br><br> 2.54_SCREWTERM for use with PRT-10571.<br><br> 3.5mm Screw Terminal footprints for PRT-08084<br><br> 5mm Screw Terminal footprints for use with PRT-08432 USB Micro-B connectors<br> Some male, some female. Watch your step! <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find drivers, regulators, and amplifiers.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. <b>Small Outline Transistor</b> >NAME >VALUE >Name >Value >Name >Value >NAME >VALUE >Name >Value >NAME >VALUE >Name >Value >NAME >VALUE >NAME >VALUE <b>Miniature single cell, fully integrated Li-Ion, Li-polymer charge management controller</b><br> http://ww1.microchip.com/downloads/en/DeviceDoc/20001984g.pdf<br> IC-09995 <b>Resettable Fuse PTC</b> Resettable Fuse. Spark Fun Electronics SKU : COM-08357 <b>Voltage Regulator LDO</b> Standard 150mA LDO voltage regulator in SOT-23 layout. Micrel part MIC5205. BP (by-pass) pin is used to lower output noise with 470pF cap. >VALUE <b>SUPPLY SYMBOL</b> <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find all manner of digital ICs- microcontrollers, memory chips, logic chips, FPGAs, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. Longer version of SSOP-20 Package >NAME >VALUE >Name >Value <h3>FTDI FT231X Full Speed USB to Full-handshake UART</h3> This USB2.0 Full Speed IC offers a compact bridge to full handshake UART interfaces. The device is a UART, capable of operating up to 3MBaud, with low power consumption (8mA). The FT231X includes the complete FT-X series feature set and enables USB to be added into a system design quickly and easily over a UART interface.<br><br> <h3>SparkFun Electronics' preferred foot prints</h3> In this library you'll find discrete semiconductors- transistors, diodes, TRIACs, optoisolators, etc.<br><br> We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. <br><br> <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ <br><br> You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. >NAME >VALUE <B>Diode</B><p> Basic SMA packaged diode. Good for reverse polarization protection. Common part #: MBRA140 >NAME >VALUE >NAME >VALUE <b>TO 220 Vertical</b> Package works with various parts including N-Channel MOSFET SparkFun SKU: COM-10213 >NAME >VALUE >NAME >VALUE >NAME >VALUE D S G Schottky diodes in SFE's production catalog<p> BAT20J 1A 23V 0.62Vf<br> RB751 120mA 40V 0.37Vf<br> PMEG4005EJ 0.5A 40V 0.42Vf<br> MBRA140 1A 40V 0.5Vf<br> B340A 3A 40V SMA <br> Generic PMOSFET <ul> <li> IRLML2244 - TRANS-11153 (SOT-23 -20V -4.3A) (1.Gate 2.Source 3.Drain) </li> <li> FQP27P06 - <a href="http://www.sparkfun.com/products/10349">COM-10349</a> (TO-220 -60V -27A) (1.Gate 2.Source 3.Drain) </li> </ul> <BR>Wurth Elektronik FPC Connector and FFC Cable<br><Hr> <BR><BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR><br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> -----<BR> -----<BR> -----<BR> -----<BR> -----<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER> <FONT FACE=ARIAL SIZE=3><br> ---------------------------<BR> <B><I><span style='font-size:26pt; color:#FF6600;'>WE </span></i></b> <BR> ---------------------------<BR><b>Würth Elektronik</b></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> ---------O---<BR> ----O--------<BR> ---------O---<BR> ----O--------<BR> ---------O---<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR> <BR><BR></FONT> </TD> </TR> <TR> <TD COLSPAN=7>&nbsp; </TD> </TR> </TABLE> <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More than you expect<BR><BR><BR></B> <HR><BR> <b>Würth Elektronik eiSos GmbH & Co. KG</b><br> EMC & Inductive Solutions<br> Max-Eyth-Str.1<br> D-74638 Waldenburg<br> <br> Tel: +49 (0)7942-945-0<br> Fax:+49 (0)7942-945-405<br> <br> <a href="http://www.we-online.com/eagle">http://www.we-online.com/eagle</a><br> <a href="mailto:libraries@we-online.com">libraries@we-online.com</a> <BR><BR> <br><HR><BR> Neither CadSoft nor WE-eiSos does warrant that this library is error-free or <br> that it meets your specific requirements.<br><BR> Please contact us for more information.<br><BR><br> <hr> Eagle Version 6, Library Revision 2015b, 08.04.2015<br> <HR> Copyright: Würth Elektronik <b>WR-FPC 0.5mm SMT ZIF Horizontal Bottom Contact, 10 Pins >NAME 1 >VALUE >NAME >VALUE <b>WR-FPC 0.5mm SMT ZIF Horizontal Bottom Contact, 10 Pins</b>=>Code : Con_FPC_ZIF_0.50_68711014522 <br><a href="http://katalog.we-online.de/media/images/eican/Con_FPC_ZIF_0.50_6871xx14522_pf2.jpg" title="Enlarge picture"> <img src="http://katalog.we-online.de/media/thumbs2/eican/thb_Con_FPC_ZIF_0.50_6871xx14522_pf2.jpg" width="320"></a><p> Details see: <a href="http://katalog.we-online.de/en/em/687_1xx_145_22">http://katalog.we-online.de/en/em/687_1xx_145_22</a><p> Created 2014-07-09, Karrer Zheng<br> 2014 (C) Würth Elektronik <b>Supply Symbols</b><p> GND, VCC, 0V, +5V, -5V, etc.<p> Please keep in mind, that these devices are necessary for the automatic wiring of the supply signals.<p> The pin name defined in the symbol is identical to the net which is to be wired automatically.<p> In this library the device names are the same as the pin names of the symbols, therefore the correct signal names appear next to the supply symbols in the schematic.<p> <author>Created by librarian@cadsoft.de</author> >VALUE <b>SUPPLY SYMBOL</b> Developed by element14 :<br> element14 CAD Library consolidation.ulp at 30/07/2012 11:22:31 * * >NAME >VALUE >NAME >VALUE Synchronous Boost Regulator <BR>Wurth Elektronik - EMC Components, Power Magnetics, Signal & Communications<br><Hr> <BR><BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR><br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> -----<BR> -----<BR> -----<BR> -----<BR> -----<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER> <FONT FACE=ARIAL SIZE=3><br> ---------------------------<BR> <B><I><span style='font-size:26pt; color:#FF6600;'>WE </span></i></b> <BR> ---------------------------<BR><b>Würth Elektronik</b></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><br> ---------O---<BR> ----O--------<BR> ---------O---<BR> ----O--------<BR> ---------O---<BR><BR></FONT> </TD> <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<BR> <BR> <BR> <BR> <BR><BR></FONT> </TD> </TR> <TR> <TD COLSPAN=7>&nbsp; </TD> </TR> </TABLE> <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More than you expect<BR><BR><BR></B> <HR><BR> <b>Würth Elektronik eiSos GmbH & Co. KG</b><br> EMC & Inductive Solutions<br> Max-Eyth-Str.1<br> D-74638 Waldenburg<br> <br> Tel: +49 (0)7942-945-0<br> Fax:+49 (0)7942-945-5000<br> <br> <a href="http://www.we-online.com/web/en/electronic_components/produkte_pb/bauteilebibliotheken/eagle_4.php">www.we-online.com/eagle</a><br> <a href="mailto:libraries@we-online.com">libraries@we-online.com</a> <BR><BR> <br><HR><BR> Neither Autodesk nor Würth Elektronik eiSos does warrant that this library is error-free or <br> that it meets your specific requirements.<br><BR> Please contact us for more information.<br><BR><br> <HR> Eagle Version 6, Library Revision 2019e, 2019-06-27<br> <HR> Copyright: Würth Elektronik >VALUE >NAME >Name >Value <b>SMD Shielded Tiny Power Inductor <br> <br> <br><b> Characteristics <br> <br></b></b> Extremely flat power inductor <br> <br> High current capability <br> <br> Magnetically shielded which results in a low leakage field <br> <brr> Operating temperature: –40 °C to +125 °C <br> <br> <br><b> Applications <br> <br></b> Portable power like PDA, digital camera, PCMCIA cards and displays <br> <br> DC/DC converter <br> <br> Embedded PC <br> <br> Mobile data gathering, telemetric <br> <br> <br> <br><a href="http://katalog.we-online.de/media/images/v2/WE-TPC_Gruppe_2.jpg" title="Enlarge picture"> <img src="http://katalog.we-online.de/media/images/v2/WE-TPC_Gruppe_2.jpg" width="320"></a><p> Details see: <a href="http://katalog.we-online.de/en/pbs/WE-TPC?">http://katalog.we-online.de/en/pbs/WE-TPC?</a><p> </b>Updated by Dan Xu 2014-07-11<br> </b>2014 (C) Wurth Elektronik ESP32 Wroom Boot Mode Configuration Pin Default Boot Download GPIO0 1 1 0 U0TXD 1 1 x GPIO2 0 x 0 GPIO4 0 x x MTDO 1 x x GPIO5 1 1 x If U0TXD, GPIO2, GPIO5 are floating, GPIO0 determines boot mode If DTR is LOW, toggling RTS from HIGH to LOW resets to run mode. If RTS is HIGH, toggling DTR from LOW to HIGH resets to bootloader. Charge current: I_CHG = 1000 / R_PROG 1000 / 4kOhm = 256mA Power Supply FTDI Adapter LiPo Charger Joystick and Buttons 5V Charge Pump for LCD RTC GPIOs: 0,2,4,12-15,25-27,32-39 usable by ULP, internal Pullups /Pulldowns ext0 for one pin as wakeup source ext1 for multiple pins as wakeup source only for GPIOs: 32-39? no internal Pullups /Pulldowns SPI Flash Maximilian Kern 09/2019 STAT Shutdown - High Z No Battery Present - High Z Constant Voltage - Low Charge Complete - High ADC_BAT for voltage sensing and as a wakeup source (R11 acts as pulldown) R_top = R_bot*(V_out/V_fb-1) Sharp Display Connector Since Version 6.2.2 text objects can contain more than one line, which will not be processed correctly with this version. ================================================ FILE: LICENSE ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: Memo/1_Menu.ino ================================================ int menuVal = 0; int menuPos[18][2]; String menuTitles[18] = {" Zeichnen ", //0 "Einstellungen", //1 " Rechner ", //2 " Nachrichten ", //3 " Uhr ", //4 "Lunar Lander ", //5 " Tastatur ", //6 " Bibliothek ", //7 " Wasserwaage ", //8 " Hackaday ", //9 " ", //10 " ", //11 " ", //12 " ", //13 " ", //14 " ", //15 " ", //16 " "};//17 void setMenuPos(){ for(int k = 0; k < 6; k++){ for(int i = 0; i < 3; i++){ menuPos[k*3+i][0] = 23 + k*60; menuPos[k*3+i][1] = 31 + i*60; } } } void drawMainMenu(){ static boolean firstRun = true; if(firstRun == true){ display.fillScreen(WHITE); } if(buttonB.wasPressed()){ currentPage = menuVal+1; } if(buttonA.wasPressed()){ drawClock(); delay(200); //debounce enterSleep(); } if(buttonLeft.wasPressed()) if(menuVal >= 2) menuVal-=3; if(buttonRight.wasPressed()) if(menuVal < 15) menuVal+=3; if(buttonUp.wasPressed()) menuVal--; if(buttonDown.wasPressed()) menuVal++; if(menuVal > 17) menuVal = 17; if(menuVal < 0) menuVal = 0; display.fillScreen(WHITE); //grayRect(0, 16, WIDTH, HEIGHT-16); drawAppSelect(); drawIcons(); drawTaskBar(); display.refresh(); buttonA.read(); buttonB.read(); buttonUp.read(); buttonDown.read(); buttonLeft.read(); buttonRight.read(); buttonC.read(); firstRun = false; } void drawAppSelect(){ //app highlight display.drawBitmap(menuPos[menuVal][0]-5, menuPos[menuVal][1]-5, select_bmp, 58, 58, BLACK); //app description display.fillRect(100, HEIGHT-24, WIDTH-200, 2, BLACK); display.setTextSize(2); display.setTextColor(BLACK); display.setCursor(WIDTH/2-74, HEIGHT-18); display.println(menuTitles[menuVal]); } void drawIcons(){ display.drawBitmap(menuPos[0][0], menuPos[0][1], paint_bmp, 48, 48, BLACK); display.drawBitmap(menuPos[1][0], menuPos[1][1], settings_bmp, 48, 48, BLACK); display.drawBitmap(menuPos[2][0], menuPos[2][1], calc_bmp, 48, 48, BLACK); display.drawBitmap(menuPos[3][0], menuPos[3][1], news_bmp, 48, 48, BLACK); display.drawBitmap(menuPos[4][0], menuPos[4][1], clock_bmp, 48, 48, BLACK); display.drawBitmap(menuPos[5][0], menuPos[5][1], lander_bmp, 48, 48, BLACK); display.drawBitmap(menuPos[6][0], menuPos[6][1], keyboard_bmp, 48, 48, BLACK); display.drawBitmap(menuPos[7][0], menuPos[7][1], opac_bmp, 48, 48, BLACK); display.drawBitmap(menuPos[8][0], menuPos[8][1], level_bmp, 48, 48, BLACK); display.drawBitmap(menuPos[9][0], menuPos[9][1], hackaday_bmp, 48, 48, BLACK); } ================================================ FILE: Memo/Calc.ino ================================================ int calcXY[26][2] = {{ 140, 80}, //'7' { 180, 80}, //'8' { 220, 80}, //'9' { 260, 80}, //'/' --- { 140, 120}, //'4' { 180, 120}, //'5' { 220, 120}, //'6' { 260, 120}, //'x' --- { 140, 160}, //'1' { 180, 160}, //'2' { 220, 160}, //'3' { 260, 160}, //'-' --- { 140, 200}, //'0' { 180, 200}, //'C' { 220, 200}, //'=' { 260, 200}, //'+' }; char calcKeys[27] = {'7', '8', '9', '/', '4', '5', '6', 'x', '1', '2', '3', '-', '0', 'C', '=', '+' }; void drawCalc(){ static boolean firstRun = true; static float memA = 0; static float memB = 0; static char activeOp = 0; if(firstRun == true){ sensX = 0.0028; sensY = 0.0028; mouseX = WIDTH/2; mouseY = HEIGHT/2; display.fillScreen(BLACK); memA = memB = 0; } display.fillScreen(BLACK); display.fillRect(110, 26, 180, 36, WHITE); display.setFont(); display.setTextSize(2); display.setTextColor(BLACK); display.setCursor(120,38); display.println(memA); int mouseOverKey; mouseOverKey = -1; for(int i = 0; i < 26; i++){ boolean keyColor = WHITE; if(isAboveCKey(i)){ mouseOverKey = i; keyColor = BLACK; display.fillCircle(calcXY[i][0]+5, calcXY[i][1]+7, 18, WHITE); } display.drawChar(calcXY[i][0], calcXY[i][1], calcKeys[i], keyColor, BLACK, 2); } display.drawBitmap(mouseX, mouseY, pointer, 17, 25, WHITE); mpu.getRotation(&gx, &gy, &gz); drawTaskBar(); int refreshtime = millis(); display.refresh(); refreshtime = millis() - refreshtime; firstRun = false; if((buttonC.wasPressed() || buttonB.wasPressed()) && mouseOverKey >= 0){ if(calcKeys[mouseOverKey] >= 48 && calcKeys[mouseOverKey] < 58){ memA = memA*10 + calcKeys[mouseOverKey] - 48; } else if(calcKeys[mouseOverKey] == '/' || calcKeys[mouseOverKey] == 'x' || calcKeys[mouseOverKey] == '+' || calcKeys[mouseOverKey] == '-'){ activeOp = calcKeys[mouseOverKey]; memB = memA; memA = 0; } else if(calcKeys[mouseOverKey] == 'C'){ memA = memB = 0; } else if(calcKeys[mouseOverKey] == '='){ if(activeOp == '/') memA = memB/memA; else if(activeOp == 'x') memA = memB*memA; else if(activeOp == '+') memA = memB+memA; else if(activeOp == '-') memA = memB-memA; activeOp = 0; } } Serial.print("memA= "); Serial.print(memA); Serial.print(" memB= "); Serial.print(memB); Serial.print(" activeOp= "); Serial.println(activeOp); if(buttonLeft.wasPressed()){//backspace } if(buttonA.wasPressed()){ currentPage = 0; // back to menu firstRun = true; } if(buttonShoulder.isPressed()){ mouseX += gx*sensX; mouseY += gy*sensY; mouseX = constrain(mouseX, 0, WIDTH); mouseY = constrain(mouseY, 0, HEIGHT); } buttonA.read(); buttonB.read(); buttonC.read(); buttonUp.read(); buttonLeft.read(); buttonRight.read(); buttonDown.read(); buttonShoulder.read(); } boolean isAboveCKey(int keyNum){ return (mouseX > calcXY[keyNum][0]-23 && mouseX < calcXY[keyNum][0]+13 && mouseY > calcXY[keyNum][1]-20 && mouseY < calcXY[keyNum][1]+11); } ================================================ FILE: Memo/ClockApp.ino ================================================ void drawClockApp(){ static boolean firstRun = true; display.fillScreen(WHITE); display.setTextSize(12); display.setTextColor(BLACK); display.setCursor(25, 60); display.printf("%02d:%02d", now.tm_hour, now.tm_min); display.setTextSize(4); display.setCursor(25, 160); display.printf("%d.%d.%d", now.tm_mday, now.tm_mon+1, now.tm_year+1900); drawTaskBar(); display.fillRect(WIDTH/2-26, 0, 60, 16, BLACK); //draw over taskbar time display.refresh(); firstRun = false; if(buttonA.wasPressed()){ currentPage = 0; // back to menu firstRun = true; } buttonA.read(); buttonB.read(); buttonUp.read(); buttonLeft.read(); buttonRight.read(); } ================================================ FILE: Memo/Hackaday.ino ================================================ void drawHackaday(){ static boolean firstRun = true; if(firstRun == true){ display.fillScreen(WHITE); display.setCursor(0, 20); display.setTextSize(1); display.setTextColor(BLACK); display.print("Connecting to "); display.println(ssid); display.refresh(); #ifdef ANCS notifications.stop(); delay(200); #endif if(WifiConnect(8)){ display.print("Connected\n"); display.refresh(); HTTPClient http; http.begin("https://hackaday.com/blog/feed/"); //Specify the URL int httpCode = http.GET(); //Make the request if (httpCode > 0) { //Check for the returning code String payload = http.getString(); //Serial.println(payload); for(int i = 0; i < 12; i++){ while(1){ int first_bracket = payload.indexOf('>'); if(first_bracket < 0){ break; } else if(payload.substring(first_bracket-6, first_bracket) == " -31) { //normal display.fillTriangle(0, HEIGHT, 0, HEIGHT/2-heightAdd, WIDTH, HEIGHT, BLACK); display.fillTriangle(0, HEIGHT/2-heightAdd, WIDTH, HEIGHT/2+heightAdd, WIDTH, HEIGHT, BLACK); } else if (angle > 31 && angle < 149 ) { //left tilt display.fillTriangle(0, 0, WIDTH/2-widthAdd, 0, 0, HEIGHT, BLACK); display.fillTriangle(WIDTH/2-widthAdd, 0, WIDTH/2+widthAdd, HEIGHT, 0, HEIGHT, BLACK); } else if (angle < -31 && angle > -149) { //right tilt display.fillTriangle(WIDTH, 0, WIDTH/2-widthAdd, 0, WIDTH, HEIGHT, BLACK); display.fillTriangle(WIDTH/2-widthAdd, 0, WIDTH/2+widthAdd, HEIGHT, WIDTH, HEIGHT, BLACK); } else { //upside town display.fillTriangle(0, 0, 0, HEIGHT/2-heightAdd, WIDTH, 0, BLACK); display.fillTriangle(0, HEIGHT/2-heightAdd, WIDTH, HEIGHT/2+heightAdd, WIDTH, 0, BLACK); } //display.fillCircle(WIDTH/2, HEIGHT/2, 30, WHITE); display.setFont(); display.setTextSize(2); display.setTextColor(BLACK, WHITE); display.setCursor(WIDTH/2-20, HEIGHT/2-8); display.printf("%02.0f%c", angle, 247); drawTaskBar(); display.refresh(); firstRun = false; if(buttonA.wasPressed()){ currentPage = 0; // back to menu firstRun = true; } buttonA.read(); buttonB.read(); buttonUp.read(); buttonLeft.read(); buttonRight.read(); } float degToRad(float num){ return 0.01745329 * num; } ================================================ FILE: Memo/Lunar.ino ================================================ // code derived from processing.org user antiplastik https://www.processing.org/discourse/beta/num_1259265932.html void drawLunar(){ static boolean firstRun = true; static float GRAVITY = 0.08; static float AIR = 0.99; static float TURN_VALUE = PI/40; static float PROP = 0.5; static float posx, posy; static float rot; static float vx, vy; static float vrot; if(firstRun == true){ vx = vy = vrot = 0; rot = -PI/2; posx = WIDTH/2; posy = HEIGHT/2; display.fillScreen(WHITE); } if(buttonUp.isPressed() || buttonB.isPressed()){ vx += PROP*cos(rot); vy += PROP*sin(rot); } if(buttonLeft.isPressed()){ vrot -= TURN_VALUE/10; } if(buttonRight.isPressed()){ vrot += TURN_VALUE/10; } posx += vx; posy += vy; vy += GRAVITY; vrot *= AIR; vy *= AIR; rot += vrot; float rPos[3][2] = {{0, -5},{0, 5},{10, 0}}; for(int i = 0; i < 3; i++){ float ytemp = rPos[i][0]; rPos[i][0] = posx + rPos[i][0]*cos(rot) - rPos[i][1]*sin(rot); rPos[i][1] = posy + ytemp*sin(rot) + rPos[i][1]*cos(rot); } display.fillScreen(WHITE); display.fillTriangle(rPos[0][0], rPos[0][1], rPos[1][0], rPos[1][1], rPos[2][0], rPos[2][1], BLACK); //display.fillRect(0, 0, 400, 240, WHITE); drawTaskBar(); //int refreshtime = millis(); display.refresh(); //refreshtime = millis() - refreshtime; //Serial.print("refresh: "); //Serial.print(refreshtime); //Serial.print(" "); firstRun = false; if(buttonA.wasPressed()){ currentPage = 0; // back to menu firstRun = true; } buttonA.read(); buttonB.read(); buttonUp.read(); buttonLeft.read(); buttonRight.read(); } ================================================ FILE: Memo/Memo.ino ================================================ // Tested with ESP32 Core V1.0.4 //#define ANCS //uncomment to enable ANCS messages #include #include #include #include #include // https://github.com/JChristensen/Button #include "esp_sleep.h" #include "driver/rtc_io.h" #include "esp32/ulp.h" #include "bmp.h" #include "ulp_main.h" #include "ulptool.h" #include #include #include #include "I2Cdev.h" #include "MPU6050.h" #include "Wire.h" MPU6050 mpu; #ifdef ANCS #include "esp32notifications.h" // https://www.github.com/Smartphone-Companions/ESP32-ANCS-Notifications.git BLENotifications notifications; uint32_t incomingCallNotificationUUID; boolean ancsDisconnectFlag = false; String latestNotificationTitle; String latestNotificationMessage; unsigned long notificatonCounter = 0; #endif char* ssid = "SSIDA"; char* password = "PASSWORDA"; char* ssidB = "SSIDB"; char* passwordB = "PASSWORDB"; WiFiUDP ntpUDP; NTPClient timeClient(ntpUDP); #define BLACK 0 #define WHITE 1 #define WIDTH 400 #define HEIGHT 240 #define SHARP_SCK 14 #define SHARP_MOSI 13 #define SHARP_SS 15 #define I2C_SDA 26 #define I2C_SCL 25 #define INTP 34 #define ADC_BAT 39 #define CRG_STAT 36 #define ABUT 33 #define BBUT 32 #define UBUT 19 #define DBUT 23 #define LBUT 22 #define RBUT 18 #define CBUT 21 #define SBUT 35 //#define SKIPBOOTSCREEN //Pushbuttons connected to GPIO32 & GPIO33 for wakeup #define BUTTON_PIN_BITMASK 0x300000000 extern const uint8_t ulp_main_bin_start[] asm("_binary_ulp_main_bin_start"); extern const uint8_t ulp_main_bin_end[] asm("_binary_ulp_main_bin_end"); gpio_num_t ulp_toggle_num = GPIO_NUM_2; Button buttonA(ABUT, false, false, 5); //pin, pullup, invert, debounce Button buttonB(BBUT, false, false, 5); Button buttonUp(UBUT, true, true, 5); // turn on pullups for joystick only Button buttonDown(DBUT, true, true, 5); Button buttonLeft(LBUT, true, true, 5); Button buttonRight(RBUT, true, true, 5); Button buttonC(CBUT, true, true, 5); Button buttonShoulder(SBUT, false, false, 5); TaskHandle_t Task1; TaskHandle_t Task2; Adafruit_SharpMem display(SHARP_SCK, SHARP_MOSI, SHARP_SS, 400, 240); int currentPage = 0; // main menu unsigned long fpsCounter = 0; float fps = 0; float battVoltage; float chargeState; boolean USBConnected = true; boolean BLEConnected = false; boolean Charging = false; boolean batteryConnected = true; struct tm now; RTC_DATA_ATTR int syncCounter = 0; //count wakeups for time sync (RTC memory is not erased during sleep) float mouseX, mouseY; int16_t gx, gy, gz; float sensX = 0.0022; float sensY = 0.0018; static void init_ulp_program() { esp_err_t err = ulptool_load_binary(0, ulp_main_bin_start, (ulp_main_bin_end - ulp_main_bin_start) / sizeof(uint32_t)); ESP_ERROR_CHECK(err); rtc_gpio_init(ulp_toggle_num); rtc_gpio_pulldown_dis(ulp_toggle_num); // disable VCOM pulldown (saves 80µA) rtc_gpio_set_direction(ulp_toggle_num, RTC_GPIO_MODE_OUTPUT_ONLY); /* Set ULP wake up period to 500ms */ ulp_set_wakeup_period(0, 500 * 1000); } void enterSleep(){ //Serial.printf("Entering deep sleep\n\n"); /* Turn off wireless features */ //needs to be tested but should be OK! WiFi.disconnect(true); WiFi.mode(WIFI_OFF); btStop(); /* Put MPU6050 into sleep mode */ mpu.setSleepEnabled(true); /* Start the ULP program */ ESP_ERROR_CHECK( ulp_run((&ulp_entry - RTC_SLOW_MEM) / sizeof(uint32_t))); ESP_ERROR_CHECK( esp_sleep_enable_ulp_wakeup() ); //Configure GPIO32 & GPIO33 as ext1 wake up source for HIGH logic level esp_sleep_enable_ext1_wakeup(BUTTON_PIN_BITMASK,ESP_EXT1_WAKEUP_ANY_HIGH); //wake up at full minute esp_sleep_enable_timer_wakeup((60-now.tm_sec) * 1000000); //Go to sleep now esp_deep_sleep_start(); } void setup(void){ esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause(); if (cause != ESP_SLEEP_WAKEUP_ULP) { init_ulp_program(); } if(cause == ESP_SLEEP_WAKEUP_TIMER){ if(syncCounter++ >= 360){ //sync with ntp server every 6h syncRTC(); syncCounter = 0; } display.begin(); display.clearDisplay(); display.setRotation(0); getLocalTime(&now,0); drawClock(); enterSleep(); } pinMode(0, OUTPUT); // don't change, -10µA??? display.begin(); display.clearDisplay(); display.setRotation(0); //Tetris? Serial.begin(115200); Serial.print("Wakeup cause: "); if(cause == ESP_SLEEP_WAKEUP_UNDEFINED) Serial.println("ESP_SLEEP_WAKEUP_UNDEFINED"); //normal reset else if(cause == ESP_SLEEP_WAKEUP_ALL) Serial.println("ESP_SLEEP_WAKEUP_ALL"); else if(cause == ESP_SLEEP_WAKEUP_EXT0) Serial.println("ESP_SLEEP_WAKEUP_EXT0"); else if(cause == ESP_SLEEP_WAKEUP_EXT1) Serial.println("ESP_SLEEP_WAKEUP_EXT1"); //button A&B else if(cause == ESP_SLEEP_WAKEUP_TIMER) Serial.println("ESP_SLEEP_WAKEUP_TIMER"); //scheduled timer wakeup else if(cause == ESP_SLEEP_WAKEUP_TOUCHPAD) Serial.println("ESP_SLEEP_WAKEUP_TOUCHPAD"); else if(cause == ESP_SLEEP_WAKEUP_ULP) Serial.println("ESP_SLEEP_WAKEUP_ULP"); else if(cause == ESP_SLEEP_WAKEUP_GPIO) Serial.println("ESP_SLEEP_WAKEUP_GPIO"); else if(cause == ESP_SLEEP_WAKEUP_UART) Serial.println("ESP_SLEEP_WAKEUP_UART"); pinMode(ABUT, INPUT); pinMode(BBUT, INPUT); pinMode(UBUT, INPUT_PULLUP); pinMode(DBUT, INPUT_PULLUP); pinMode(LBUT, INPUT_PULLUP); pinMode(RBUT, INPUT_PULLUP); pinMode(CBUT, INPUT_PULLUP); pinMode(SBUT, INPUT_PULLUP); pinMode(CRG_STAT, INPUT); pinMode(ADC_BAT, INPUT); pinMode(INTP, INPUT_PULLUP); adcAttachPin(CRG_STAT); adcAttachPin(ADC_BAT); analogReadResolution(12); analogSetWidth(12); analogSetAttenuation(ADC_11db); Wire.begin(I2C_SDA, I2C_SCL, 400000); mpu.initialize(); mpu.setXAccelOffset(-1839); mpu.setYAccelOffset(893); mpu.setZAccelOffset(4861); mpu.setXGyroOffset(87); mpu.setYGyroOffset(22); mpu.setZGyroOffset(-130); //create a task that will be executed in the Task1code() function, with priority 1 and executed on core 0 xTaskCreatePinnedToCore( Task1code, /* Task function. */ "Task1", /* name of task. */ 10000, /* Stack size of task */ NULL, /* parameter of the task */ 1, /* priority of the task */ &Task1, /* Task handle to keep track of created task */ 0); /* pin task to core 0 */ #ifdef ANCS notifications.begin("ESP32 Memo"); // Start ANCS notifications.setConnectionStateChangedCallback(onBLEStateChanged); notifications.setNotificationCallback(onNotificationArrived); notifications.setRemovedCallback(onNotificationRemoved); #endif if(cause == ESP_SLEEP_WAKEUP_UNDEFINED){ //run on reset only #if !defined SKIPBOOTSCREEN display.fillScreen(BLACK); display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(0, 20); display.println("Memory Display OS Version 0.07"); display.refresh(); display.println("Copyright(C) 2019-2020 CoreTech"); display.refresh(); display.printf("CPU: Xtensa LX6 2 CPU %dMHz\n\n", getCpuFrequencyMhz()); display.refresh(); if (WifiConnect(5) == false){ // switch to backup wifi ssid = ssidB; password = passwordB; } display.println("Fetching time from NTP server..."); if(syncRTC()) display.println("Time synced"); else display.println("Time sync failed"); display.refresh(); delay(500); #endif } setMenuPos(); } void Task1code( void * pvParameters ){ for(;;){ adcAttachPin(CRG_STAT); adcAttachPin(ADC_BAT); analogReadResolution(12); analogSetWidth(12); analogSetAttenuation(ADC_11db); battVoltage = analogRead(ADC_BAT)*6.6/4096.0*1.1; if(battVoltage < 3.6 && battVoltage > 2){ //force standby when battery is critical display.fillScreen(WHITE); display.setTextSize(3); display.setTextColor(BLACK); display.setCursor(0, 26); display.println(" Battery Critical"); display.println(" Please turn off"); display.println(" and recharge"); display.refresh(); /* Put MPU6050 into sleep mode */ WiFi.disconnect(true); WiFi.mode(WIFI_OFF); btStop(); mpu.setSleepEnabled(true); esp_deep_sleep_start(); } //TODO: measure V_USB in next hardware revision! if(battVoltage > 4.21){ Charging = true; USBConnected = true; batteryConnected = true; } else if(battVoltage < 1){ Charging = false; USBConnected = true; batteryConnected = false; } else{ Charging = false; USBConnected = false; batteryConnected = true; } #ifdef ANCS // Restart BLE Advertising to prevent reconnect issue if(ancsDisconnectFlag) { delay(100); notifications.startAdvertising(); ancsDisconnectFlag = false; } #endif getLocalTime(&now,0); delay(500); //core 0 needs free time for background tasks } } void loop(void){ fps = 1000/float(millis()-fpsCounter); fpsCounter = millis(); //Serial.print(fps); //Serial.println("fps"); if(currentPage == 1) drawPaint(); //else if(currentPage == 2) drawSettings(); else if(currentPage == 3) drawCalc(); else if(currentPage == 4) drawNews(); else if(currentPage == 5) drawClockApp(); else if(currentPage == 6) drawLunar(); else if(currentPage == 7) drawKeyboardDemo(); //else if(currentPage == 8) drawOpac(); else if(currentPage == 9) drawSpiritLevel(); else if(currentPage == 10) drawHackaday(); else drawMainMenu(); } /// void drawTaskBar(){ display.fillRect(0, 0, WIDTH, 16, BLACK); //time display.setFont(); display.setTextSize(2); display.setTextColor(WHITE); //clock display.setCursor(WIDTH/2-26,0); display.printf("%02d:%02d", now.tm_hour, now.tm_min); //battery //display.printf(" %d", analogRead(ADC_BAT)); display.setCursor(10,0); //display.printf(" %.2fV", battVoltage); display.drawRect(WIDTH-30, 3, 19, 10, WHITE); display.fillRect(WIDTH-11, 5, 2, 6, WHITE); if(batteryConnected){ if(battVoltage > 3.7) display.fillRect(WIDTH-28, 5, 3, 6, WHITE); if(battVoltage > 3.8) display.fillRect(WIDTH-24, 5, 3, 6, WHITE); if(battVoltage > 3.9) display.fillRect(WIDTH-20, 5, 3, 6, WHITE); if(battVoltage > 4.1) display.fillRect(WIDTH-16, 5, 3, 6, WHITE); } //USB if(USBConnected){ display.fillRect(WIDTH-45, 5, 9, 5, WHITE); display.fillRect(WIDTH-44, 2, 2, 4, WHITE); display.fillRect(WIDTH-39, 2, 2, 4, WHITE); display.fillRect(WIDTH-42, 10, 3, 4, WHITE); } if(BLEConnected){ display.drawBitmap(WIDTH-57, 2, bluetooth_bmp, 6, 12, WHITE); } #ifdef ANCS if(notificatonCounter > millis()){ display.fillRect(0, 16, WIDTH, 50, BLACK); display.fillRoundRect(5, 16, WIDTH-(5*2), 50-5, 6, WHITE); display.setCursor(8, 28); display.setTextSize(1); display.setTextColor(BLACK); display.setTextWrap(false); display.setFont(&FreeSansBold9pt7b); display.print(latestNotificationTitle.substring(0, 42)); display.setCursor(8, 54); display.setFont(&FreeSans9pt7b); display.print(latestNotificationMessage.substring(0, 42)); if(latestNotificationMessage.length() >= 38) display.print("..."); display.setTextWrap(true); display.setFont(); } #endif } void grayRect(int x, int y, int w, int h) { boolean toggle = true; for (int i = x; i < x+w; i++) { for (int k = y; k < y+h; k++) { if (toggle) display.drawPixel(i, k+i%2, BLACK); toggle = !toggle; } } } boolean syncRTC(){ if(WifiConnect(5)){ timeClient.begin(); timeClient.setTimeOffset(7200); //+2hr for DST timeClient.update(); timeval epoch = {timeClient.getEpochTime(), 0}; const timeval *tv = &epoch; timezone utc = {0,0}; const timezone *tz = &utc; settimeofday(tv, tz); WiFi.disconnect(); WiFi.mode(WIFI_OFF); return true; } else return false; } boolean WifiConnect(unsigned int timeout){ WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); timeout--; if(timeout == 0) break; } if(WiFi.status() == WL_CONNECTED) return true; else return false; } void drawClock(){ display.fillScreen(BLACK); display.setTextSize(12); display.setTextColor(WHITE); display.setCursor(25, 60); display.printf("%02d:%02d", now.tm_hour, now.tm_min); display.setTextSize(4); display.setCursor(25, 160); display.printf("%d.%d.%d", now.tm_mday, now.tm_mon+1, now.tm_year+1900); display.refresh(); } #ifdef ANCS void onNotificationRemoved(const ArduinoNotification * notification, const Notification * rawNotificationData) { display.printf("Removed notification: %s\n%s\n%s\n", notification->title, notification->message, notification->type); } void onNotificationArrived(const ArduinoNotification * notification, const Notification * rawNotificationData) { latestNotificationTitle = notification->title; latestNotificationMessage = notification->message; display.printf("Got notification: %s\n%s\n%s\n", notification->title, notification->message, notification->type); Serial.println(notifications.getNotificationCategoryDescription(notification->category)); // ie "social media" Serial.println(notification->categoryCount); // How may other notifications are there from this app (ie badge number) notificatonCounter = millis() + 3000; } void onBLEStateChanged(BLENotifications::State state) { switch(state) { case BLENotifications::StateConnected: Serial.println("StateConnected - connected to a phone or tablet"); BLEConnected = true; break; case BLENotifications::StateDisconnected: Serial.println("StateDisconnected - disconnected from a phone or tablet"); ancsDisconnectFlag = true; BLEConnected = false; break; } } #endif ================================================ FILE: Memo/News.ino ================================================ void drawNews(){ static boolean firstRun = true; display.setFont(); if(firstRun == true){ display.fillScreen(WHITE); display.setCursor(0, 20); display.setTextSize(1); display.setTextColor(BLACK); display.print("Connecting to "); display.println(ssid); display.refresh(); #ifdef ANCS notifications.stop(); delay(200); #endif if(WifiConnect(8)){ display.print("Connected\n"); display.refresh(); HTTPClient http; http.begin("http://www.tagesschau.de/xml/atom/"); //Specify the URL int httpCode = http.GET(); //Make the request if (httpCode > 0) { //Check for the returning code String payload = http.getString(); payload.replace("ü", String(char(129))); //ü payload.replace("ä", String(char(132))); //ä payload.replace("ö", String(char(148))); //ö payload.replace("Ü", String(char(154))); //Ü payload.replace("Ä", String(char(142))); //Ä payload.replace("Ö", String(char(153))); //Ö payload.replace("ß", String(char(224))); //ß for(int i = 0; i < 20; i++){ while(1){ int first_bracket = payload.indexOf('>'); if(first_bracket < 0){ break; } else if(payload.substring(first_bracket-5, first_bracket) == "title"){ String headline = payload.substring(first_bracket+1, first_bracket+80); headline = headline.substring(0, headline.indexOf('<')); display.print(headline); payload = payload.substring(first_bracket+1); display.refresh(); break; } payload = payload.substring(first_bracket+1); } } } else { Serial.println("Error on HTTP request"); } http.end(); //Free the resources WiFi.disconnect(); WiFi.mode(WIFI_OFF); delay(200); } else{ display.print("Connection failed!\n"); } } display.setFont(); drawTaskBar(); display.refresh(); firstRun = false; if(buttonA.wasPressed()){ currentPage = 0; // back to menu firstRun = true; } buttonA.read(); buttonB.read(); } ================================================ FILE: Memo/Paint.ino ================================================ void drawPaint(){ static boolean firstRun = true; static boolean drawColor = BLACK; static int brushSize = 7; //must be even number boolean pointerArea[brushSize][brushSize]; if(firstRun == true){ display.fillScreen(WHITE); //display.drawBitmap(0, 15, wallpaper, 400, 225, BLACK); sensX = 0.0022; sensY = 0.0022; mouseX = WIDTH/2; mouseY = HEIGHT/2; delay(200); //don't draw accidentally buttonB.read(); buttonC.read(); } //save pointer background area for(int k = 0; k < brushSize; k++){ //column y for(int i = 0; i < brushSize; i++){ //row x int pAx = mouseX - brushSize/2 + i; int pAy = mouseY - brushSize/2 + k; if(pAx >= 0 && pAy >= 0) pointerArea[i][k] = display.getPixel(pAx, pAy); } } display.fillCircle(mouseX, mouseY, float(brushSize)/2 - 0.5, !drawColor); // draw pointer display.fillCircle(mouseX, mouseY, float(brushSize)/2 - 1.5, drawColor); // draw pointer drawTaskBar(); mpu.getRotation(&gx, &gy, &gz); display.refresh(); //restore pointer background for(int k = 0; k < brushSize; k++){ //column y for(int i = 0; i < brushSize; i++){ //row x int pAx = mouseX - brushSize/2 + i; int pAy = mouseY - brushSize/2 + k; if(pAx >= 0 && pAy >= 0) display.drawPixel(pAx, pAy, pointerArea[i][k]); } } if(buttonB.isPressed() || buttonC.isPressed()){//draw over screen display.fillCircle(mouseX, mouseY, brushSize/2, drawColor); // draw pointer } firstRun = false; if(buttonUp.isPressed()){ if(brushSize < 35) brushSize += 1; } if(buttonDown.isPressed()){ if(brushSize > 5) brushSize -= 1; } if(buttonLeft.wasPressed() || buttonRight.wasPressed()){ drawColor = !drawColor; } if(buttonA.wasPressed()){ currentPage = 0; // back to menu firstRun = true; } if(buttonShoulder.isPressed()){ mouseX += gx*sensX; mouseY += gy*sensY; mouseX = constrain(mouseX, 0, WIDTH); mouseY = constrain(mouseY, 0, HEIGHT); } buttonA.read(); buttonB.read(); buttonC.read(); buttonUp.read(); buttonLeft.read(); buttonRight.read(); buttonDown.read(); buttonShoulder.read(); } ================================================ FILE: Memo/bmp.h ================================================ // 'Bluetooth_bmp', 6x12px const unsigned char bluetooth_bmp [] PROGMEM = { 0x20, 0x30, 0x28, 0xa4, 0x68, 0x30, 0x30, 0x68, 0xa4, 0x28, 0x30, 0x20 }; // 'calc_bmp', 48x48px const unsigned char calc_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x3f, 0xf0, 0x01, 0xff, 0xfe, 0x00, 0x3f, 0xf0, 0x01, 0xff, 0xfe, 0x00, 0x3f, 0xf0, 0x01, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbe, 0xff, 0xff, 0xbf, 0xff, 0xff, 0x1c, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0x08, 0x7f, 0xff, 0xbf, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xf0, 0x01, 0xff, 0xff, 0xc1, 0xff, 0xf0, 0x01, 0xff, 0xff, 0x80, 0xff, 0xf0, 0x01, 0xff, 0xff, 0x08, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x7f, 0xff, 0xbf, 0xff, 0xff, 0xbe, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'clock_bmp', 48x48px const unsigned char clock_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xe0, 0x0f, 0xff, 0xfe, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xf8, 0x0f, 0xe0, 0x1f, 0xff, 0xff, 0xf0, 0x7f, 0xfc, 0x0f, 0xff, 0xff, 0xe1, 0xff, 0xff, 0x07, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xc3, 0xff, 0xff, 0x87, 0xff, 0xff, 0xe1, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x1f, 0xfe, 0x7f, 0xf8, 0xff, 0xfe, 0x3f, 0xfe, 0x7f, 0xf8, 0x7f, 0xfe, 0x3f, 0xfe, 0x7f, 0xfc, 0x7f, 0xfc, 0x7f, 0xfe, 0x7f, 0xfc, 0x3f, 0xfc, 0x7f, 0xfe, 0x7f, 0xfe, 0x3f, 0xfc, 0x7f, 0xfe, 0x7f, 0xfe, 0x3f, 0xf8, 0x7f, 0xfe, 0x7f, 0xfe, 0x1f, 0xf8, 0xff, 0xfe, 0x7f, 0xff, 0x1f, 0xf8, 0xff, 0xfe, 0x7f, 0xff, 0x1f, 0xf8, 0xff, 0xfe, 0x7f, 0xff, 0x1f, 0xf8, 0xff, 0xfe, 0x7f, 0xff, 0x1f, 0xf8, 0xff, 0xfe, 0x3f, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x1f, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x8f, 0xff, 0x1f, 0xf8, 0x7f, 0xff, 0xc7, 0xfe, 0x1f, 0xfc, 0x7f, 0xff, 0xe3, 0xfe, 0x3f, 0xfc, 0x7f, 0xff, 0xf1, 0xfe, 0x3f, 0xfc, 0x3f, 0xff, 0xf9, 0xfc, 0x3f, 0xfe, 0x3f, 0xff, 0xff, 0xfc, 0x7f, 0xfe, 0x3f, 0xff, 0xff, 0xf8, 0x7f, 0xfe, 0x1f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x87, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xc3, 0xff, 0xff, 0x83, 0xff, 0xff, 0xe0, 0xff, 0xff, 0x07, 0xff, 0xff, 0xf0, 0x3f, 0xfc, 0x0f, 0xff, 0xff, 0xf8, 0x03, 0xc0, 0x3f, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x7f, 0xff, 0x7f, 0xff, 0x80, 0x03, 0xff, 0xfe, 0x7f, 0xff, 0xf8, 0x3f, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'draw_bmp', 48x48px const unsigned char draw_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x07, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xfe, 0x00, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x03, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'hackaday_bmp', 48x48px const unsigned char hackaday_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0x9f, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xe1, 0xff, 0xfb, 0xc1, 0xff, 0xff, 0xc1, 0xef, 0xf8, 0x81, 0xff, 0xff, 0xc0, 0xcf, 0xfc, 0x00, 0x7f, 0xff, 0x80, 0x0f, 0xfc, 0x00, 0x3f, 0xff, 0x00, 0x1f, 0xfe, 0x00, 0x18, 0x06, 0x00, 0x3f, 0xff, 0xf0, 0x20, 0x03, 0x02, 0xff, 0xff, 0xf8, 0x40, 0x01, 0x0f, 0xff, 0xff, 0xfc, 0xc0, 0x00, 0x9f, 0xff, 0xff, 0xfe, 0x80, 0x00, 0x7f, 0xff, 0xff, 0xff, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0x0c, 0x0c, 0x3f, 0xff, 0xff, 0xff, 0x1e, 0x1e, 0x3f, 0xff, 0xff, 0xff, 0x3e, 0x3f, 0x3f, 0xff, 0xff, 0xff, 0x3c, 0x1f, 0x3f, 0xff, 0xff, 0xff, 0x30, 0x06, 0x3f, 0xff, 0xff, 0xff, 0x10, 0x02, 0x3f, 0xff, 0xff, 0xff, 0x00, 0x80, 0x3f, 0xff, 0xff, 0xfe, 0x80, 0xc0, 0x5f, 0xff, 0xff, 0xfc, 0x80, 0x00, 0x4f, 0xff, 0xff, 0xf8, 0x40, 0x00, 0x87, 0xff, 0xff, 0x80, 0x60, 0x01, 0x00, 0x7f, 0xfe, 0x00, 0x20, 0x02, 0x00, 0x1f, 0xfc, 0x00, 0x60, 0x03, 0x00, 0x0f, 0xfc, 0x80, 0xf3, 0x33, 0x80, 0x0f, 0xf9, 0xc1, 0xff, 0xff, 0xc0, 0xcf, 0xfb, 0xe1, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x87, 0xff, 0xff, 0xf8, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'keyboard_bmp', 48x48px const unsigned char keyboard_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xf8, 0x0e, 0x03, 0x80, 0xe0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0e, 0x00, 0x00, 0xe0, 0x3f, 0xf8, 0x0e, 0x00, 0x00, 0xe0, 0x3f, 0xf8, 0x0e, 0x00, 0x00, 0xe0, 0x3f, 0xf8, 0x0e, 0x00, 0x00, 0xe0, 0x3f, 0xf8, 0x0e, 0x00, 0x00, 0xe0, 0x3f, 0xf8, 0x0e, 0x00, 0x00, 0xe0, 0x3f, 0xf8, 0x0e, 0x00, 0x00, 0xe0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'lander_bmp', 48x48px const unsigned char lander_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x1f, 0xff, 0xff, 0xff, 0xfc, 0x78, 0x1f, 0xff, 0xff, 0xff, 0xf8, 0x1c, 0x1f, 0xff, 0xff, 0xff, 0xe0, 0x0e, 0x1f, 0xff, 0xff, 0xff, 0xc0, 0x07, 0x1f, 0xff, 0xff, 0xff, 0x80, 0x03, 0x9f, 0xff, 0xff, 0xff, 0x01, 0xc1, 0xbf, 0xff, 0xff, 0xfe, 0x03, 0xe0, 0xff, 0xff, 0xff, 0xfc, 0x03, 0xe0, 0xff, 0xff, 0xff, 0xf8, 0x03, 0xe0, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xe0, 0xff, 0xff, 0xff, 0xe0, 0x01, 0xc1, 0xff, 0xff, 0xf8, 0xe0, 0x00, 0x01, 0xff, 0xff, 0xf0, 0xc0, 0x00, 0x03, 0xff, 0xff, 0xe0, 0xc0, 0x00, 0x03, 0xff, 0xff, 0xc1, 0x80, 0x00, 0x07, 0xff, 0xff, 0x81, 0x80, 0x00, 0x0f, 0xff, 0xff, 0x01, 0x80, 0x00, 0x1f, 0xff, 0xfe, 0x03, 0x00, 0x00, 0x3f, 0xff, 0xfc, 0x03, 0x00, 0x00, 0x7f, 0xff, 0xfc, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x1f, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xcf, 0xe3, 0xff, 0xff, 0xff, 0xf0, 0xff, 0x03, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x03, 0xff, 0xff, 0xff, 0xe1, 0xf8, 0x07, 0xff, 0xff, 0xff, 0xc3, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xc7, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xf3, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'level_bmp', 48x48px const unsigned char level_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0x8f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x21, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x70, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xe1, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xc3, 0xfe, 0x1f, 0xff, 0xff, 0xff, 0x87, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x0f, 0xbe, 0x3f, 0xff, 0xff, 0xfe, 0x1f, 0x9c, 0x7f, 0xff, 0xff, 0xfc, 0x3f, 0xc8, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xe1, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xe1, 0xf3, 0xc7, 0xff, 0xff, 0xff, 0xc3, 0xf9, 0x8f, 0xff, 0xff, 0xff, 0x87, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0x0f, 0xfe, 0x3f, 0xff, 0xff, 0xfe, 0x1f, 0xfc, 0x7f, 0xff, 0xff, 0xfc, 0x3e, 0x78, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0x31, 0xff, 0xff, 0xff, 0xf0, 0xff, 0x83, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xc3, 0xef, 0x8f, 0xff, 0xff, 0xff, 0x87, 0xe7, 0x1f, 0xff, 0xff, 0xff, 0x0f, 0xf2, 0x3f, 0xff, 0xff, 0xfe, 0x1f, 0xf8, 0x7f, 0xff, 0xff, 0xfc, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xf8, 0x7c, 0xf1, 0xff, 0xff, 0xff, 0xf8, 0xfe, 0x63, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0x07, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0x8f, 0xff, 0xff, 0xff, 0xfe, 0x1f, 0x1f, 0xff, 0xff, 0xff, 0xff, 0x0e, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x84, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xf3, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'news_bmp', 48x48px const unsigned char news_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xc0, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0xc0, 0x7f, 0xff, 0x18, 0x00, 0x00, 0xcc, 0x7f, 0xff, 0x18, 0x00, 0x00, 0xcc, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0xcc, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0xcc, 0x7f, 0xff, 0x18, 0x06, 0x00, 0xcc, 0x7f, 0xff, 0x18, 0x06, 0x00, 0xcc, 0x7f, 0xff, 0x18, 0x07, 0xff, 0xcc, 0x7f, 0xff, 0x18, 0x07, 0xff, 0xcc, 0x7f, 0xff, 0x18, 0x06, 0x00, 0xcc, 0x7f, 0xff, 0x18, 0x06, 0x00, 0xcc, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0xcc, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0xcc, 0x7f, 0xff, 0x18, 0x00, 0x00, 0xcc, 0x7f, 0xff, 0x18, 0x00, 0x00, 0xcc, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0xcc, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0xcc, 0x7f, 0xff, 0x18, 0x06, 0x00, 0xcc, 0x7f, 0xff, 0x18, 0x06, 0x00, 0xcc, 0x7f, 0xff, 0x1f, 0xfe, 0x00, 0xcc, 0x7f, 0xff, 0x1f, 0xfe, 0x00, 0xcc, 0x7f, 0xff, 0x18, 0x06, 0x00, 0xcc, 0x7f, 0xff, 0x18, 0x06, 0x00, 0xcc, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0xcc, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0xcc, 0x7f, 0xff, 0x1f, 0xff, 0xff, 0xc4, 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'opac_bmp', 48x48px const unsigned char opac_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x07, 0xff, 0x80, 0x7f, 0xff, 0xf0, 0x07, 0xff, 0x80, 0x7f, 0xff, 0xf0, 0x06, 0x01, 0x80, 0x7f, 0xff, 0xf1, 0xc6, 0x01, 0x8c, 0x60, 0x0f, 0xf1, 0xc6, 0x01, 0x8c, 0x60, 0x0f, 0xf1, 0xc6, 0x31, 0x8c, 0x60, 0x0f, 0xf1, 0xc6, 0x31, 0x8c, 0x63, 0xff, 0xf1, 0xc6, 0x31, 0x80, 0x63, 0xff, 0xf1, 0xc6, 0x01, 0x80, 0x63, 0xff, 0xf1, 0xc6, 0x01, 0x80, 0x63, 0xff, 0xf0, 0x06, 0x01, 0x8c, 0x63, 0xff, 0xf0, 0x06, 0x3f, 0x8c, 0x63, 0xff, 0xf0, 0x06, 0x3f, 0x8c, 0x63, 0xff, 0xff, 0xfe, 0x3f, 0x8c, 0x60, 0x0f, 0xff, 0xfe, 0x3f, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'paint_bmp', 48x48px const unsigned char paint_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0x60, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x31, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xb0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0x38, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x7c, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x71, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x07, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'settings_bmp', 48x48px const unsigned char settings_bmp [] PROGMEM = { 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0 }; // 'select_bmp', 58x58px const unsigned char select_bmp [] PROGMEM = { 0x01, 0xe0, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00 }; // 'pointer', 17x25px const unsigned char pointer [] PROGMEM = { 0x80, 0x00, 0x00, 0xc0, 0x00, 0x00, 0xe0, 0x00, 0x00, 0xf0, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x80, 0x00, 0xff, 0xc0, 0x00, 0xff, 0xe0, 0x00, 0xff, 0xf0, 0x00, 0xff, 0xf8, 0x00, 0xff, 0xfc, 0x00, 0xff, 0xfe, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x80, 0xff, 0xff, 0x80, 0xfc, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xf0, 0x00, 0x00, 0xe0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x80, 0x00, 0x00 }; ================================================ FILE: Memo/esp32-hal-spi.c ================================================ // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "esp32-hal-spi.h" #include "esp32-hal.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" #include "rom/ets_sys.h" #include "esp_attr.h" #include "esp_intr.h" #include "rom/gpio.h" #include "soc/spi_reg.h" #include "soc/spi_struct.h" #include "soc/io_mux_reg.h" #include "soc/gpio_sig_map.h" #include "soc/dport_reg.h" #include "soc/rtc.h" #define SPI_CLK_IDX(p) ((p==0)?SPICLK_OUT_IDX:((p==1)?SPICLK_OUT_IDX:((p==2)?HSPICLK_OUT_IDX:((p==3)?VSPICLK_OUT_IDX:0)))) #define SPI_MISO_IDX(p) ((p==0)?SPIQ_OUT_IDX:((p==1)?SPIQ_OUT_IDX:((p==2)?HSPIQ_OUT_IDX:((p==3)?VSPIQ_OUT_IDX:0)))) #define SPI_MOSI_IDX(p) ((p==0)?SPID_IN_IDX:((p==1)?SPID_IN_IDX:((p==2)?HSPID_IN_IDX:((p==3)?VSPID_IN_IDX:0)))) #define SPI_SPI_SS_IDX(n) ((n==0)?SPICS0_OUT_IDX:((n==1)?SPICS1_OUT_IDX:((n==2)?SPICS2_OUT_IDX:SPICS0_OUT_IDX))) #define SPI_HSPI_SS_IDX(n) ((n==0)?HSPICS0_OUT_IDX:((n==1)?HSPICS1_OUT_IDX:((n==2)?HSPICS2_OUT_IDX:HSPICS0_OUT_IDX))) #define SPI_VSPI_SS_IDX(n) ((n==0)?VSPICS0_OUT_IDX:((n==1)?VSPICS1_OUT_IDX:((n==2)?VSPICS2_OUT_IDX:VSPICS0_OUT_IDX))) #define SPI_SS_IDX(p, n) ((p==0)?SPI_SPI_SS_IDX(n):((p==1)?SPI_SPI_SS_IDX(n):((p==2)?SPI_HSPI_SS_IDX(n):((p==3)?SPI_VSPI_SS_IDX(n):0)))) #define SPI_INUM(u) (2) #define SPI_INTR_SOURCE(u) ((u==0)?ETS_SPI0_INTR_SOURCE:((u==1)?ETS_SPI1_INTR_SOURCE:((u==2)?ETS_SPI2_INTR_SOURCE:((p==3)?ETS_SPI3_INTR_SOURCE:0)))) struct spi_struct_t { spi_dev_t * dev; #if !CONFIG_DISABLE_HAL_LOCKS xSemaphoreHandle lock; #endif uint8_t num; }; #if CONFIG_DISABLE_HAL_LOCKS #define SPI_MUTEX_LOCK() #define SPI_MUTEX_UNLOCK() static spi_t _spi_bus_array[4] = { {(volatile spi_dev_t *)(DR_REG_SPI0_BASE), 0}, {(volatile spi_dev_t *)(DR_REG_SPI1_BASE), 1}, {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), 2}, {(volatile spi_dev_t *)(DR_REG_SPI3_BASE), 3} }; #else #define SPI_MUTEX_LOCK() do {} while (xSemaphoreTake(spi->lock, portMAX_DELAY) != pdPASS) #define SPI_MUTEX_UNLOCK() xSemaphoreGive(spi->lock) static spi_t _spi_bus_array[4] = { {(volatile spi_dev_t *)(DR_REG_SPI0_BASE), NULL, 0}, {(volatile spi_dev_t *)(DR_REG_SPI1_BASE), NULL, 1}, {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), NULL, 2}, {(volatile spi_dev_t *)(DR_REG_SPI3_BASE), NULL, 3} }; #endif void spiAttachSCK(spi_t * spi, int8_t sck) { if(!spi) { return; } if(sck < 0) { if(spi->num == HSPI) { sck = 14; } else if(spi->num == VSPI) { sck = 18; } else { sck = 6; } } pinMode(sck, OUTPUT); pinMatrixOutAttach(sck, SPI_CLK_IDX(spi->num), false, false); } void spiAttachMISO(spi_t * spi, int8_t miso) { if(!spi) { return; } if(miso < 0) { if(spi->num == HSPI) { miso = 12; } else if(spi->num == VSPI) { miso = 19; } else { miso = 7; } } //SPI_MUTEX_LOCK(); pinMode(miso, INPUT); pinMatrixInAttach(miso, SPI_MISO_IDX(spi->num), false); //SPI_MUTEX_UNLOCK(); } void spiAttachMOSI(spi_t * spi, int8_t mosi) { if(!spi) { return; } if(mosi < 0) { if(spi->num == HSPI) { mosi = 13; } else if(spi->num == VSPI) { mosi = 23; } else { mosi = 8; } } pinMode(mosi, OUTPUT); pinMatrixOutAttach(mosi, SPI_MOSI_IDX(spi->num), false, false); } void spiDetachSCK(spi_t * spi, int8_t sck) { if(!spi) { return; } if(sck < 0) { if(spi->num == HSPI) { sck = 14; } else if(spi->num == VSPI) { sck = 18; } else { sck = 6; } } pinMatrixOutDetach(sck, false, false); pinMode(sck, INPUT); } void spiDetachMISO(spi_t * spi, int8_t miso) { if(!spi) { return; } if(miso < 0) { if(spi->num == HSPI) { miso = 12; } else if(spi->num == VSPI) { miso = 19; } else { miso = 7; } } pinMatrixInDetach(SPI_MISO_IDX(spi->num), false, false); pinMode(miso, INPUT); } void spiDetachMOSI(spi_t * spi, int8_t mosi) { if(!spi) { return; } if(mosi < 0) { if(spi->num == HSPI) { mosi = 13; } else if(spi->num == VSPI) { mosi = 23; } else { mosi = 8; } } pinMatrixOutDetach(mosi, false, false); pinMode(mosi, INPUT); } void spiAttachSS(spi_t * spi, uint8_t cs_num, int8_t ss) { if(!spi) { return; } if(cs_num > 2) { return; } if(ss < 0) { cs_num = 0; if(spi->num == HSPI) { ss = 15; } else if(spi->num == VSPI) { ss = 5; } else { ss = 11; } } pinMode(ss, OUTPUT); pinMatrixOutAttach(ss, SPI_SS_IDX(spi->num, cs_num), false, false); spiEnableSSPins(spi, (1 << cs_num)); } void spiDetachSS(spi_t * spi, int8_t ss) { if(!spi) { return; } if(ss < 0) { if(spi->num == HSPI) { ss = 15; } else if(spi->num == VSPI) { ss = 5; } else { ss = 11; } } pinMatrixOutDetach(ss, false, false); pinMode(ss, INPUT); } void spiEnableSSPins(spi_t * spi, uint8_t cs_mask) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spi->dev->pin.val &= ~(cs_mask & SPI_CS_MASK_ALL); //SPI_MUTEX_UNLOCK(); } void spiDisableSSPins(spi_t * spi, uint8_t cs_mask) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spi->dev->pin.val |= (cs_mask & SPI_CS_MASK_ALL); //SPI_MUTEX_UNLOCK(); } void spiSSEnable(spi_t * spi) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spi->dev->user.cs_setup = 1; spi->dev->user.cs_hold = 1; //SPI_MUTEX_UNLOCK(); } void spiSSDisable(spi_t * spi) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spi->dev->user.cs_setup = 0; spi->dev->user.cs_hold = 0; //SPI_MUTEX_UNLOCK(); } void spiSSSet(spi_t * spi) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spi->dev->pin.cs_keep_active = 1; //SPI_MUTEX_UNLOCK(); } void spiSSClear(spi_t * spi) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spi->dev->pin.cs_keep_active = 0; //SPI_MUTEX_UNLOCK(); } uint32_t spiGetClockDiv(spi_t * spi) { if(!spi) { return 0; } return spi->dev->clock.val; } void spiSetClockDiv(spi_t * spi, uint32_t clockDiv) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spi->dev->clock.val = clockDiv; //SPI_MUTEX_UNLOCK(); } uint8_t spiGetDataMode(spi_t * spi) { if(!spi) { return 0; } bool idleEdge = spi->dev->pin.ck_idle_edge; bool outEdge = spi->dev->user.ck_out_edge; if(idleEdge) { if(outEdge) { return SPI_MODE2; } return SPI_MODE3; } if(outEdge) { return SPI_MODE1; } return SPI_MODE0; } void spiSetDataMode(spi_t * spi, uint8_t dataMode) { if(!spi) { return; } //SPI_MUTEX_LOCK(); switch (dataMode) { case SPI_MODE1: spi->dev->pin.ck_idle_edge = 0; spi->dev->user.ck_out_edge = 1; break; case SPI_MODE2: spi->dev->pin.ck_idle_edge = 1; spi->dev->user.ck_out_edge = 1; break; case SPI_MODE3: spi->dev->pin.ck_idle_edge = 1; spi->dev->user.ck_out_edge = 0; break; case SPI_MODE0: default: spi->dev->pin.ck_idle_edge = 0; spi->dev->user.ck_out_edge = 0; break; } //SPI_MUTEX_UNLOCK(); } uint8_t spiGetBitOrder(spi_t * spi) { if(!spi) { return 0; } return (spi->dev->ctrl.wr_bit_order | spi->dev->ctrl.rd_bit_order) == 0; } void spiSetBitOrder(spi_t * spi, uint8_t bitOrder) { if(!spi) { return; } //SPI_MUTEX_LOCK(); if (SPI_MSBFIRST == bitOrder) { spi->dev->ctrl.wr_bit_order = 0; spi->dev->ctrl.rd_bit_order = 0; } else if (SPI_LSBFIRST == bitOrder) { spi->dev->ctrl.wr_bit_order = 1; spi->dev->ctrl.rd_bit_order = 1; } //SPI_MUTEX_UNLOCK(); } static void _on_apb_change(void * arg, apb_change_ev_t ev_type, uint32_t old_apb, uint32_t new_apb) { spi_t * spi = (spi_t *)arg; if(ev_type == APB_BEFORE_CHANGE){ //SPI_MUTEX_LOCK(); while(spi->dev->cmd.usr); } else { spi->dev->clock.val = spiFrequencyToClockDiv(old_apb / ((spi->dev->clock.clkdiv_pre + 1) * (spi->dev->clock.clkcnt_n + 1))); //SPI_MUTEX_UNLOCK(); } } void spiStopBus(spi_t * spi) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spi->dev->slave.trans_done = 0; spi->dev->slave.slave_mode = 0; spi->dev->pin.val = 0; spi->dev->user.val = 0; spi->dev->user1.val = 0; spi->dev->ctrl.val = 0; spi->dev->ctrl1.val = 0; spi->dev->ctrl2.val = 0; spi->dev->clock.val = 0; //SPI_MUTEX_UNLOCK(); removeApbChangeCallback(spi, _on_apb_change); } spi_t * spiStartBus(uint8_t spi_num, uint32_t clockDiv, uint8_t dataMode, uint8_t bitOrder) { if(spi_num > 3){ return NULL; } spi_t * spi = &_spi_bus_array[spi_num]; #if !CONFIG_DISABLE_HAL_LOCKS if(spi->lock == NULL){ spi->lock = xSemaphoreCreateMutex(); if(spi->lock == NULL) { return NULL; } } #endif if(spi_num == HSPI) { DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN); DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST); } else if(spi_num == VSPI) { DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN_2); DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST_2); } else { DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN_1); DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST_1); } spiStopBus(spi); spiSetDataMode(spi, dataMode); spiSetBitOrder(spi, bitOrder); spiSetClockDiv(spi, clockDiv); //SPI_MUTEX_LOCK(); spi->dev->user.usr_mosi = 1; spi->dev->user.usr_miso = 1; spi->dev->user.doutdin = 1; int i; for(i=0; i<16; i++) { spi->dev->data_buf[i] = 0x00000000; } //SPI_MUTEX_UNLOCK(); addApbChangeCallback(spi, _on_apb_change); return spi; } void spiWaitReady(spi_t * spi) { if(!spi) { return; } while(spi->dev->cmd.usr); } void spiWrite(spi_t * spi, uint32_t *data, uint8_t len) { if(!spi) { return; } int i; if(len > 16) { len = 16; } //SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = (len * 32) - 1; spi->dev->miso_dlen.usr_miso_dbitlen = 0; for(i=0; idev->data_buf[i] = data[i]; } spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); //SPI_MUTEX_UNLOCK(); } void spiTransfer(spi_t * spi, uint32_t *data, uint8_t len) { if(!spi) { return; } int i; if(len > 16) { len = 16; } //SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = (len * 32) - 1; spi->dev->miso_dlen.usr_miso_dbitlen = (len * 32) - 1; for(i=0; idev->data_buf[i] = data[i]; } spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); for(i=0; idev->data_buf[i]; } //SPI_MUTEX_UNLOCK(); } void spiWriteByte(spi_t * spi, uint8_t data) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = 7; spi->dev->miso_dlen.usr_miso_dbitlen = 0; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); //SPI_MUTEX_UNLOCK(); } uint8_t spiTransferByte(spi_t * spi, uint8_t data) { if(!spi) { return 0; } //SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = 7; spi->dev->miso_dlen.usr_miso_dbitlen = 7; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); data = spi->dev->data_buf[0] & 0xFF; //SPI_MUTEX_UNLOCK(); return data; } uint32_t __spiTranslate24(uint32_t data) { union { uint32_t l; uint8_t b[4]; } out; out.l = data; return out.b[2] | (out.b[1] << 8) | (out.b[0] << 16); } uint32_t __spiTranslate32(uint32_t data) { union { uint32_t l; uint8_t b[4]; } out; out.l = data; return out.b[3] | (out.b[2] << 8) | (out.b[1] << 16) | (out.b[0] << 24); } void spiWriteWord(spi_t * spi, uint16_t data) { if(!spi) { return; } if(!spi->dev->ctrl.wr_bit_order){ data = (data >> 8) | (data << 8); } //SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = 15; spi->dev->miso_dlen.usr_miso_dbitlen = 0; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); //SPI_MUTEX_UNLOCK(); } uint16_t spiTransferWord(spi_t * spi, uint16_t data) { if(!spi) { return 0; } if(!spi->dev->ctrl.wr_bit_order){ data = (data >> 8) | (data << 8); } //SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = 15; spi->dev->miso_dlen.usr_miso_dbitlen = 15; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); data = spi->dev->data_buf[0]; //SPI_MUTEX_UNLOCK(); if(!spi->dev->ctrl.rd_bit_order){ data = (data >> 8) | (data << 8); } return data; } void spiWriteLong(spi_t * spi, uint32_t data) { if(!spi) { return; } if(!spi->dev->ctrl.wr_bit_order){ data = __spiTranslate32(data); } //SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = 31; spi->dev->miso_dlen.usr_miso_dbitlen = 0; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); //SPI_MUTEX_UNLOCK(); } uint32_t spiTransferLong(spi_t * spi, uint32_t data) { if(!spi) { return 0; } if(!spi->dev->ctrl.wr_bit_order){ data = __spiTranslate32(data); } //SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = 31; spi->dev->miso_dlen.usr_miso_dbitlen = 31; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); data = spi->dev->data_buf[0]; //SPI_MUTEX_UNLOCK(); if(!spi->dev->ctrl.rd_bit_order){ data = __spiTranslate32(data); } return data; } void __spiTransferBytes(spi_t * spi, uint8_t * data, uint8_t * out, uint32_t bytes) { if(!spi) { return; } int i; if(bytes > 64) { bytes = 64; } uint32_t words = (bytes + 3) / 4;//16 max uint32_t wordsBuf[16] = {0,}; uint8_t * bytesBuf = (uint8_t *) wordsBuf; if(data) { memcpy(bytesBuf, data, bytes);//copy data to buffer } else { memset(bytesBuf, 0xFF, bytes); } spi->dev->mosi_dlen.usr_mosi_dbitlen = ((bytes * 8) - 1); spi->dev->miso_dlen.usr_miso_dbitlen = ((bytes * 8) - 1); for(i=0; idev->data_buf[i] = wordsBuf[i]; //copy buffer to spi fifo } spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); if(out) { for(i=0; idev->data_buf[i];//copy spi fifo to buffer } memcpy(out, bytesBuf, bytes);//copy buffer to output } } void spiTransferBytes(spi_t * spi, uint8_t * data, uint8_t * out, uint32_t size) { if(!spi) { return; } //SPI_MUTEX_LOCK(); while(size) { if(size > 64) { __spiTransferBytes(spi, data, out, 64); size -= 64; if(data) { data += 64; } if(out) { out += 64; } } else { __spiTransferBytes(spi, data, out, size); size = 0; } } //SPI_MUTEX_UNLOCK(); } void spiTransferBits(spi_t * spi, uint32_t data, uint32_t * out, uint8_t bits) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spiTransferBitsNL(spi, data, out, bits); //SPI_MUTEX_UNLOCK(); } /* * Manual Lock Management * */ #define MSB_32_SET(var, val) { uint8_t * d = (uint8_t *)&(val); (var) = d[3] | (d[2] << 8) | (d[1] << 16) | (d[0] << 24); } #define MSB_24_SET(var, val) { uint8_t * d = (uint8_t *)&(val); (var) = d[2] | (d[1] << 8) | (d[0] << 16); } #define MSB_16_SET(var, val) { (var) = (((val) & 0xFF00) >> 8) | (((val) & 0xFF) << 8); } #define MSB_PIX_SET(var, val) { uint8_t * d = (uint8_t *)&(val); (var) = d[1] | (d[0] << 8) | (d[3] << 16) | (d[2] << 24); } void spiTransaction(spi_t * spi, uint32_t clockDiv, uint8_t dataMode, uint8_t bitOrder) { if(!spi) { return; } //SPI_MUTEX_LOCK(); spi->dev->clock.val = clockDiv; switch (dataMode) { case SPI_MODE1: spi->dev->pin.ck_idle_edge = 0; spi->dev->user.ck_out_edge = 1; break; case SPI_MODE2: spi->dev->pin.ck_idle_edge = 1; spi->dev->user.ck_out_edge = 1; break; case SPI_MODE3: spi->dev->pin.ck_idle_edge = 1; spi->dev->user.ck_out_edge = 0; break; case SPI_MODE0: default: spi->dev->pin.ck_idle_edge = 0; spi->dev->user.ck_out_edge = 0; break; } if (SPI_MSBFIRST == bitOrder) { spi->dev->ctrl.wr_bit_order = 0; spi->dev->ctrl.rd_bit_order = 0; } else if (SPI_LSBFIRST == bitOrder) { spi->dev->ctrl.wr_bit_order = 1; spi->dev->ctrl.rd_bit_order = 1; } } void spiSimpleTransaction(spi_t * spi) { if(!spi) { return; } //SPI_MUTEX_LOCK(); } void spiEndTransaction(spi_t * spi) { if(!spi) { return; } //SPI_MUTEX_UNLOCK(); } void IRAM_ATTR spiWriteByteNL(spi_t * spi, uint8_t data) { if(!spi) { return; } spi->dev->mosi_dlen.usr_mosi_dbitlen = 7; spi->dev->miso_dlen.usr_miso_dbitlen = 0; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); } uint8_t spiTransferByteNL(spi_t * spi, uint8_t data) { if(!spi) { return 0; } spi->dev->mosi_dlen.usr_mosi_dbitlen = 7; spi->dev->miso_dlen.usr_miso_dbitlen = 7; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); data = spi->dev->data_buf[0] & 0xFF; return data; } void IRAM_ATTR spiWriteShortNL(spi_t * spi, uint16_t data) { if(!spi) { return; } if(!spi->dev->ctrl.wr_bit_order){ MSB_16_SET(data, data); } spi->dev->mosi_dlen.usr_mosi_dbitlen = 15; spi->dev->miso_dlen.usr_miso_dbitlen = 0; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); } uint16_t spiTransferShortNL(spi_t * spi, uint16_t data) { if(!spi) { return 0; } if(!spi->dev->ctrl.wr_bit_order){ MSB_16_SET(data, data); } spi->dev->mosi_dlen.usr_mosi_dbitlen = 15; spi->dev->miso_dlen.usr_miso_dbitlen = 15; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); data = spi->dev->data_buf[0] & 0xFFFF; if(!spi->dev->ctrl.rd_bit_order){ MSB_16_SET(data, data); } return data; } void IRAM_ATTR spiWriteLongNL(spi_t * spi, uint32_t data) { if(!spi) { return; } if(!spi->dev->ctrl.wr_bit_order){ MSB_32_SET(data, data); } spi->dev->mosi_dlen.usr_mosi_dbitlen = 31; spi->dev->miso_dlen.usr_miso_dbitlen = 0; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); } uint32_t spiTransferLongNL(spi_t * spi, uint32_t data) { if(!spi) { return 0; } if(!spi->dev->ctrl.wr_bit_order){ MSB_32_SET(data, data); } spi->dev->mosi_dlen.usr_mosi_dbitlen = 31; spi->dev->miso_dlen.usr_miso_dbitlen = 31; spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); data = spi->dev->data_buf[0]; if(!spi->dev->ctrl.rd_bit_order){ MSB_32_SET(data, data); } return data; } void spiWriteNL(spi_t * spi, const void * data_in, size_t len){ size_t longs = len >> 2; if(len & 3){ longs++; } uint32_t * data = (uint32_t*)data_in; size_t c_len = 0, c_longs = 0; while(len){ c_len = (len>64)?64:len; c_longs = (longs > 16)?16:longs; spi->dev->mosi_dlen.usr_mosi_dbitlen = (c_len*8)-1; spi->dev->miso_dlen.usr_miso_dbitlen = 0; for (int i=0; idev->data_buf[i] = data[i]; } spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); data += c_longs; longs -= c_longs; len -= c_len; } } void spiTransferBytesNL(spi_t * spi, const void * data_in, uint8_t * data_out, size_t len){ if(!spi) { return; } size_t longs = len >> 2; if(len & 3){ longs++; } uint32_t * data = (uint32_t*)data_in; uint32_t * result = (uint32_t*)data_out; size_t c_len = 0, c_longs = 0; while(len){ c_len = (len>64)?64:len; c_longs = (longs > 16)?16:longs; spi->dev->mosi_dlen.usr_mosi_dbitlen = (c_len*8)-1; spi->dev->miso_dlen.usr_miso_dbitlen = (c_len*8)-1; if(data){ for (int i=0; idev->data_buf[i] = data[i]; } } else { for (int i=0; idev->data_buf[i] = 0xFFFFFFFF; } } spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); if(result){ for (int i=0; idev->data_buf[i]; } } if(data){ data += c_longs; } if(result){ result += c_longs; } longs -= c_longs; len -= c_len; } } void spiTransferBitsNL(spi_t * spi, uint32_t data, uint32_t * out, uint8_t bits) { if(!spi) { return; } if(bits > 32) { bits = 32; } uint32_t bytes = (bits + 7) / 8;//64 max uint32_t mask = (((uint64_t)1 << bits) - 1) & 0xFFFFFFFF; data = data & mask; if(!spi->dev->ctrl.wr_bit_order){ if(bytes == 2) { MSB_16_SET(data, data); } else if(bytes == 3) { MSB_24_SET(data, data); } else { MSB_32_SET(data, data); } } spi->dev->mosi_dlen.usr_mosi_dbitlen = (bits - 1); spi->dev->miso_dlen.usr_miso_dbitlen = (bits - 1); spi->dev->data_buf[0] = data; spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); data = spi->dev->data_buf[0]; if(out) { *out = data; if(!spi->dev->ctrl.rd_bit_order){ if(bytes == 2) { MSB_16_SET(*out, data); } else if(bytes == 3) { MSB_24_SET(*out, data); } else { MSB_32_SET(*out, data); } } } } void IRAM_ATTR spiWritePixelsNL(spi_t * spi, const void * data_in, size_t len){ size_t longs = len >> 2; if(len & 3){ longs++; } bool msb = !spi->dev->ctrl.wr_bit_order; uint32_t * data = (uint32_t*)data_in; size_t c_len = 0, c_longs = 0, l_bytes = 0; while(len){ c_len = (len>64)?64:len; c_longs = (longs > 16)?16:longs; l_bytes = (c_len & 3); spi->dev->mosi_dlen.usr_mosi_dbitlen = (c_len*8)-1; spi->dev->miso_dlen.usr_miso_dbitlen = 0; for (int i=0; idev->data_buf[i], data[i]); } else { spi->dev->data_buf[i] = data[i] & 0xFF; } } else { MSB_PIX_SET(spi->dev->data_buf[i], data[i]); } } else { spi->dev->data_buf[i] = data[i]; } } spi->dev->cmd.usr = 1; while(spi->dev->cmd.usr); data += c_longs; longs -= c_longs; len -= c_len; } } /* * Clock Calculators * * */ typedef union { uint32_t value; struct { uint32_t clkcnt_l: 6; /*it must be equal to spi_clkcnt_N.*/ uint32_t clkcnt_h: 6; /*it must be floor((spi_clkcnt_N+1)/2-1).*/ uint32_t clkcnt_n: 6; /*it is the divider of spi_clk. So spi_clk frequency is system/(spi_clkdiv_pre+1)/(spi_clkcnt_N+1)*/ uint32_t clkdiv_pre: 13; /*it is pre-divider of spi_clk.*/ uint32_t clk_equ_sysclk: 1; /*1: spi_clk is eqaul to system 0: spi_clk is divided from system clock.*/ }; } spiClk_t; #define ClkRegToFreq(reg) (apb_freq / (((reg)->clkdiv_pre + 1) * ((reg)->clkcnt_n + 1))) uint32_t spiClockDivToFrequency(uint32_t clockDiv) { uint32_t apb_freq = getApbFrequency(); spiClk_t reg = { clockDiv }; return ClkRegToFreq(®); } uint32_t spiFrequencyToClockDiv(uint32_t freq) { uint32_t apb_freq = getApbFrequency(); if(freq >= apb_freq) { return SPI_CLK_EQU_SYSCLK; } const spiClk_t minFreqReg = { 0x7FFFF000 }; uint32_t minFreq = ClkRegToFreq((spiClk_t*) &minFreqReg); if(freq < minFreq) { return minFreqReg.value; } uint8_t calN = 1; spiClk_t bestReg = { 0 }; int32_t bestFreq = 0; while(calN <= 0x3F) { spiClk_t reg = { 0 }; int32_t calFreq; int32_t calPre; int8_t calPreVari = -2; reg.clkcnt_n = calN; while(calPreVari++ <= 1) { calPre = (((apb_freq / (reg.clkcnt_n + 1)) / freq) - 1) + calPreVari; if(calPre > 0x1FFF) { reg.clkdiv_pre = 0x1FFF; } else if(calPre <= 0) { reg.clkdiv_pre = 0; } else { reg.clkdiv_pre = calPre; } reg.clkcnt_l = ((reg.clkcnt_n + 1) / 2); calFreq = ClkRegToFreq(®); if(calFreq == (int32_t) freq) { memcpy(&bestReg, ®, sizeof(bestReg)); break; } else if(calFreq < (int32_t) freq) { if(abs(freq - calFreq) < abs(freq - bestFreq)) { bestFreq = calFreq; memcpy(&bestReg, ®, sizeof(bestReg)); } } } if(calFreq == (int32_t) freq) { break; } calN++; } return bestReg.value; } ================================================ FILE: Memo/keyboardDemo.ino ================================================ int keybXY[26][2] = {{ 20, 140}, //'Q' { 60, 140}, //'W' { 100, 140}, //'E' { 140, 140}, //'R' { 180, 140}, //'T' { 220, 140}, //'Z' { 260, 140}, //'U' { 300, 140}, //'I' { 340, 140}, //'O' { 380, 140}, //'P' --- { 40, 170}, //'A' { 80, 170}, //'S' { 120, 170}, //'D' { 160, 170}, //'F' { 200, 170}, //'G' { 240, 170}, //'H' { 280, 170}, //'J' { 320, 170}, //'K' { 360, 170}, //'L' --- { 60, 200}, //'Y' { 100, 200}, //'X' { 140, 200}, //'C' { 180, 200}, //'V' { 220, 200}, //'B' { 260, 200}, //'N' { 300, 200}, //'M' }; char keybChar[27] = {'Q', 'W', 'E', 'R', 'T', 'Z', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Y', 'X', 'C', 'V', 'B', 'N', 'M', ' ' }; void drawKeyboardDemo(){ static boolean firstRun = true; static String textString = ""; if(firstRun == true){ sensX = 0.0028; sensY = 0.0028; mouseX = WIDTH/2; mouseY = HEIGHT/2; display.fillScreen(BLACK); textString = ""; } display.fillScreen(BLACK); display.setFont(); display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(10,40); //show cursor blinking at 2Hz if(millis()/500%2){ textString += '_'; display.println(textString); textString.remove(textString.length()-1); } else display.println(textString); int mouseOverKey; mouseOverKey = -1; for(int i = 0; i < 26; i++){ boolean keyColor = WHITE; if(isAboveKey(i)){ mouseOverKey = i; keyColor = BLACK; display.fillCircle(keybXY[i][0]+5, keybXY[i][1]+7, 18, WHITE); } display.drawChar(keybXY[i][0], keybXY[i][1], keybChar[i], keyColor, BLACK, 2); } if(mouseY > 216){ mouseOverKey = 27; //space display.fillRect(WIDTH/2-100, HEIGHT-16, 200, 20, WHITE); } display.drawBitmap(mouseX, mouseY, pointer, 17, 25, WHITE); mpu.getRotation(&gx, &gy, &gz); drawTaskBar(); int refreshtime = millis(); display.refresh(); refreshtime = millis() - refreshtime; Serial.print("refresh: "); Serial.print(refreshtime); Serial.print(" "); firstRun = false; if((buttonC.wasPressed() || buttonB.wasPressed()) && mouseOverKey >= 0){//add character textString += keybChar[mouseOverKey]; } if(buttonLeft.wasPressed()){//backspace textString.remove(textString.length()-1); } if(buttonA.wasPressed()){ currentPage = 0; // back to menu firstRun = true; } if(buttonShoulder.isPressed()){ mouseX += gx*sensX; mouseY += gy*sensY; mouseX = constrain(mouseX, 0, WIDTH); mouseY = constrain(mouseY, 0, HEIGHT); } buttonA.read(); buttonB.read(); buttonC.read(); buttonUp.read(); buttonLeft.read(); buttonRight.read(); buttonDown.read(); buttonShoulder.read(); } boolean isAboveKey(int keyNum){ return (mouseX > keybXY[keyNum][0]-23 && mouseX < keybXY[keyNum][0]+13 && mouseY > keybXY[keyNum][1]-20 && mouseY < keybXY[keyNum][1]+11); } ================================================ FILE: Memo/ulp.s ================================================ #include "soc/rtc_cntl_reg.h" #include "soc/rtc_io_reg.h" #include "soc/soc_ulp.h" /* Define variables, which go into .bss section (zero-initialized data) */ .bss .global toggle_counter toggle_counter: .long 0 /* Code goes into .text section */ .text .global entry entry: /* Read toggle counter */ move r3, toggle_counter ld r0, r3, 0 /* Increment */ add r0, r0, 1 /* Save counter in memory */ st r0, r3, 0 /* Save counter in r3 to use it later */ move r3, r0 /* Disable hold of RTC_GPIO12 output */ WRITE_RTC_REG(RTC_IO_TOUCH_PAD2_REG,RTC_IO_TOUCH_PAD2_HOLD_S,1,0) /* Toggle RTC_GPIO12 output */ and r0, r0, 0x01 jump toggle_clear, eq /* Set the RTC_GPIO12 output HIGH */ WRITE_RTC_REG(RTC_GPIO_OUT_W1TS_REG,RTC_GPIO_OUT_DATA_W1TS_S+12,1,1) jump toggle_complete .global toggle_clear toggle_clear: /* Set the RTC_GPIO12 output LOW (clear output) */ WRITE_RTC_REG(RTC_GPIO_OUT_W1TC_REG,RTC_GPIO_OUT_DATA_W1TC_S+12,1,1) .global toggle_complete toggle_complete: /* Enable hold on RTC_GPIO12 output */ WRITE_RTC_REG(RTC_IO_TOUCH_PAD2_REG,RTC_IO_TOUCH_PAD2_HOLD_S,1,1) halt ================================================ FILE: Memo/ulp_main.h ================================================ #include "Arduino.h" extern uint32_t ulp_entry; extern uint32_t ulp_toggle_clear; extern uint32_t ulp_toggle_complete; ================================================ FILE: README.md ================================================ # ESP32-Handheld ![My image](https://cdn.hackaday.io/images/7388051584724557389.JPG) Tested with Arduino for ESP32 Core 1.0.4 The lastes firmware needs the modified Adafruit SharpMem library. This library includes a hugely faster screen clearing function and hardware SPI. ![](paint.gif) ![](keyboard.gif) ![](ANCS.gif)