├── .DS_Store ├── .gitignore ├── README.md ├── classic-lite ├── .DS_Store ├── LICENSE ├── cube-clock-lite.code-workspace ├── lib │ ├── .DS_Store │ ├── DHT10_cokoino │ │ ├── DHT10.cpp │ │ ├── DHT10.h │ │ └── examples │ │ │ └── DHT10 │ │ │ └── DHT10.ino │ ├── ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays │ │ ├── .DS_Store │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTING.md │ │ ├── README.md │ │ ├── README_GEOMETRY_64_48.md │ │ ├── UPGRADE-3.0.md │ │ ├── UPGRADE-4.0.md │ │ ├── component.mk │ │ ├── examples │ │ │ ├── SSD1306ClockDemo │ │ │ │ ├── SSD1306ClockDemo.ino │ │ │ │ └── images.h │ │ │ ├── SSD1306DrawingDemo │ │ │ │ └── SSD1306DrawingDemo.ino │ │ │ ├── SSD1306OTADemo │ │ │ │ └── SSD1306OTADemo.ino │ │ │ ├── SSD1306SimpleDemo │ │ │ │ ├── SSD1306SimpleDemo.ino │ │ │ │ └── images.h │ │ │ ├── SSD1306TwoScreenDemo │ │ │ │ ├── SSD1306TwoScreenDemo.ino │ │ │ │ └── images.h │ │ │ └── SSD1306UiDemo │ │ │ │ ├── SSD1306UiDemo.ino │ │ │ │ └── images.h │ │ ├── keywords.txt │ │ ├── library.json │ │ ├── library.properties │ │ ├── license │ │ ├── platformio.ini │ │ ├── resources │ │ │ ├── DemoFrame1.jpg │ │ │ ├── DemoFrame2.jpg │ │ │ ├── DemoFrame3.jpg │ │ │ ├── DemoFrame4.jpg │ │ │ ├── FontTool.png │ │ │ ├── SPI_version.jpg │ │ │ ├── glyphEditor.html │ │ │ ├── glyphEditor.png │ │ │ └── xbmPreview.png │ │ └── src │ │ │ ├── OLEDDisplay.cpp │ │ │ ├── OLEDDisplay.h │ │ │ ├── OLEDDisplayFonts.h │ │ │ ├── OLEDDisplayUi.cpp │ │ │ ├── OLEDDisplayUi.h │ │ │ ├── SH1106.h │ │ │ ├── SH1106Brzo.h │ │ │ ├── SH1106Spi.h │ │ │ ├── SH1106Wire.h │ │ │ ├── SSD1306.h │ │ │ ├── SSD1306Brzo.h │ │ │ ├── SSD1306I2C.h │ │ │ ├── SSD1306Spi.h │ │ │ └── SSD1306Wire.h │ ├── EasyNTPClient │ │ ├── .DS_Store │ │ ├── LICENSE │ │ ├── README.md │ │ ├── examples │ │ │ ├── .DS_Store │ │ │ ├── ArduinoEspWifiShield │ │ │ │ ├── .esp8266.test.skip │ │ │ │ └── ArduinoEspWifiShield.ino │ │ │ └── NodeMCU │ │ │ │ ├── .uno.test.skip │ │ │ │ └── NodeMCU.ino │ │ ├── keywords.txt │ │ ├── library.json │ │ ├── library.properties │ │ └── src │ │ │ ├── EasyNTPClient.cpp │ │ │ └── EasyNTPClient.h │ ├── RTClib │ │ ├── .github │ │ │ ├── ISSUE_TEMPLATE.md │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── workflows │ │ │ │ └── githubci.yml │ │ ├── .gitignore │ │ ├── .piopm │ │ ├── README.md │ │ ├── RTClib.cpp │ │ ├── RTClib.h │ │ ├── code-of-conduct.md │ │ ├── examples │ │ │ ├── DS3231_alarm │ │ │ │ └── DS3231_alarm.ino │ │ │ ├── datecalc │ │ │ │ └── datecalc.ino │ │ │ ├── ds1307 │ │ │ │ └── ds1307.ino │ │ │ ├── ds1307SqwPin │ │ │ │ └── ds1307SqwPin.ino │ │ │ ├── ds1307nvram │ │ │ │ └── ds1307nvram.ino │ │ │ ├── ds3231 │ │ │ │ └── ds3231.ino │ │ │ ├── interrupts1Hz │ │ │ │ ├── .leonardo.test.only │ │ │ │ ├── .mega2560.test.only │ │ │ │ ├── .uno.test.only │ │ │ │ └── interrupts1Hz.ino │ │ │ ├── pcf8523 │ │ │ │ └── pcf8523.ino │ │ │ ├── pcf8523Countdown │ │ │ │ └── pcf8523Countdown.ino │ │ │ ├── pcf8563 │ │ │ │ └── pcf8563.ino │ │ │ ├── pcf8563_interrupt │ │ │ │ └── pcf8563_interrupt.ino │ │ │ ├── softrtc │ │ │ │ └── softrtc.ino │ │ │ ├── timestamp │ │ │ │ └── timestamp.ino │ │ │ └── toString │ │ ├── keywords.txt │ │ ├── library.properties │ │ └── license.txt │ ├── SimpleDHT │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SimpleDHT.cpp │ │ ├── SimpleDHT.h │ │ ├── examples │ │ │ ├── DHT11Default │ │ │ │ └── DHT11Default.ino │ │ │ ├── DHT11ErrCount │ │ │ │ └── DHT11ErrCount.ino │ │ │ ├── DHT11WithRawBits │ │ │ │ └── DHT11WithRawBits.ino │ │ │ ├── DHT22Default │ │ │ │ └── DHT22Default.ino │ │ │ ├── DHT22ErrCount │ │ │ │ └── DHT22ErrCount.ino │ │ │ ├── DHT22Integer │ │ │ │ └── DHT22Integer.ino │ │ │ ├── DHT22WithRawBits │ │ │ │ └── DHT22WithRawBits.ino │ │ │ └── TwoSensorsDefault │ │ │ │ └── TwoSensorsDefault.ino │ │ ├── keywords.txt │ │ └── library.properties │ ├── U8g2 │ │ ├── LICENSE │ │ ├── README.md │ │ ├── examples │ │ │ ├── full_buffer │ │ │ │ ├── FPS │ │ │ │ │ └── FPS.ino │ │ │ │ ├── FontUsage │ │ │ │ │ └── FontUsage.ino │ │ │ │ ├── GraphicsTest │ │ │ │ │ └── GraphicsTest.ino │ │ │ │ ├── HelloWorld │ │ │ │ │ └── HelloWorld.ino │ │ │ │ ├── IconMenu │ │ │ │ │ └── IconMenu.ino │ │ │ │ ├── PrintUTF8 │ │ │ │ │ └── PrintUTF8.ino │ │ │ │ ├── ScreenShot │ │ │ │ │ └── ScreenShot.ino │ │ │ │ ├── SelectionList │ │ │ │ │ └── SelectionList.ino │ │ │ │ ├── Shennong │ │ │ │ │ └── Shennong.ino │ │ │ │ ├── U8g2Logo │ │ │ │ │ └── U8g2Logo.ino │ │ │ │ ├── UpdateArea │ │ │ │ │ └── UpdateArea.ino │ │ │ │ └── Weather │ │ │ │ │ └── Weather.ino │ │ │ ├── games │ │ │ │ ├── LittleRookChess │ │ │ │ │ └── LittleRookChess.ino │ │ │ │ └── SpaceTrash │ │ │ │ │ └── SpaceTrash.ino │ │ │ ├── page_buffer │ │ │ │ ├── A2Printer │ │ │ │ │ └── A2Printer.ino │ │ │ │ ├── Chinese │ │ │ │ │ └── Chinese.ino │ │ │ │ ├── ClipWindow │ │ │ │ │ └── ClipWindow.ino │ │ │ │ ├── Clock │ │ │ │ │ └── Clock.ino │ │ │ │ ├── ContrastTest │ │ │ │ │ └── ContrastTest.ino │ │ │ │ ├── Devanagari │ │ │ │ │ └── Devanagari.ino │ │ │ │ ├── DirectAccess │ │ │ │ │ └── DirectAccess.ino │ │ │ │ ├── DrawLog │ │ │ │ │ └── DrawLog.ino │ │ │ │ ├── ExtUTF8 │ │ │ │ │ └── ExtUTF8.ino │ │ │ │ ├── FPS │ │ │ │ │ └── FPS.ino │ │ │ │ ├── FlipMode │ │ │ │ │ └── FlipMode.ino │ │ │ │ ├── GraphicsTest │ │ │ │ │ └── GraphicsTest.ino │ │ │ │ ├── HelloWorld │ │ │ │ │ └── HelloWorld.ino │ │ │ │ ├── IconMenu │ │ │ │ │ └── IconMenu.ino │ │ │ │ ├── Japanese │ │ │ │ │ └── Japanese.ino │ │ │ │ ├── Korean │ │ │ │ │ └── Korean.ino │ │ │ │ ├── LoadFromSD │ │ │ │ │ └── LoadFromSD.ino │ │ │ │ ├── PowerSaveTest │ │ │ │ │ └── PowerSaveTest.ino │ │ │ │ ├── PrintHelloWorld │ │ │ │ │ └── PrintHelloWorld.ino │ │ │ │ ├── PrintProgmem │ │ │ │ │ └── PrintProgmem.ino │ │ │ │ ├── PrintUTF8 │ │ │ │ │ └── PrintUTF8.ino │ │ │ │ ├── ScrollingText │ │ │ │ │ └── ScrollingText.ino │ │ │ │ ├── SelectionList │ │ │ │ │ └── SelectionList.ino │ │ │ │ ├── Serial │ │ │ │ │ └── Serial.ino │ │ │ │ ├── Shennong │ │ │ │ │ └── Shennong.ino │ │ │ │ ├── StateBufferLoop │ │ │ │ │ └── StateBufferLoop.ino │ │ │ │ ├── Terminal │ │ │ │ │ └── Terminal.ino │ │ │ │ ├── U8g2Logo │ │ │ │ │ └── U8g2Logo.ino │ │ │ │ ├── UpdatePartly │ │ │ │ │ └── UpdatePartly.ino │ │ │ │ ├── Weather │ │ │ │ │ └── Weather.ino │ │ │ │ ├── XBM │ │ │ │ │ └── XBM.ino │ │ │ │ └── XORTest │ │ │ │ │ └── XORTest.ino │ │ │ └── u8x8 │ │ │ │ ├── 16x16Font │ │ │ │ └── 16x16Font.ino │ │ │ │ ├── ArduboyTest │ │ │ │ └── ArduboyTest.ino │ │ │ │ ├── FlipMode │ │ │ │ └── FlipMode.ino │ │ │ │ ├── GraphicsTest │ │ │ │ └── GraphicsTest.ino │ │ │ │ ├── HelloWorld │ │ │ │ └── HelloWorld.ino │ │ │ │ ├── MessageBox │ │ │ │ └── MessageBox.ino │ │ │ │ └── Terminal │ │ │ │ └── Terminal.ino │ │ ├── extras │ │ │ └── ChangeLog │ │ ├── keywords.txt │ │ ├── library.properties │ │ └── src │ │ │ ├── U8g2lib.cpp │ │ │ ├── U8g2lib.h │ │ │ ├── U8x8lib.cpp │ │ │ ├── U8x8lib.h │ │ │ └── clib │ │ │ ├── u8g2.h │ │ │ ├── u8g2_bitmap.c │ │ │ ├── u8g2_box.c │ │ │ ├── u8g2_buffer.c │ │ │ ├── u8g2_circle.c │ │ │ ├── u8g2_cleardisplay.c │ │ │ ├── u8g2_d_memory.c │ │ │ ├── u8g2_d_setup.c │ │ │ ├── u8g2_font.c │ │ │ ├── u8g2_fonts.c │ │ │ ├── u8g2_hvline.c │ │ │ ├── u8g2_input_value.c │ │ │ ├── u8g2_intersection.c │ │ │ ├── u8g2_kerning.c │ │ │ ├── u8g2_line.c │ │ │ ├── u8g2_ll_hvline.c │ │ │ ├── u8g2_message.c │ │ │ ├── u8g2_polygon.c │ │ │ ├── u8g2_selection_list.c │ │ │ ├── u8g2_setup.c │ │ │ ├── u8log.c │ │ │ ├── u8log_u8g2.c │ │ │ ├── u8log_u8x8.c │ │ │ ├── u8x8.h │ │ │ ├── u8x8_8x8.c │ │ │ ├── u8x8_byte.c │ │ │ ├── u8x8_cad.c │ │ │ ├── u8x8_capture.c │ │ │ ├── u8x8_d_a2printer.c │ │ │ ├── u8x8_d_il3820_296x128.c │ │ │ ├── u8x8_d_ist3020.c │ │ │ ├── u8x8_d_ist7920.c │ │ │ ├── u8x8_d_ks0108.c │ │ │ ├── u8x8_d_lc7981.c │ │ │ ├── u8x8_d_ld7032_60x32.c │ │ │ ├── u8x8_d_ls013b7dh03.c │ │ │ ├── u8x8_d_max7219.c │ │ │ ├── u8x8_d_pcd8544_84x48.c │ │ │ ├── u8x8_d_pcf8812.c │ │ │ ├── u8x8_d_pcf8814_hx1230.c │ │ │ ├── u8x8_d_s1d15e06.c │ │ │ ├── u8x8_d_sbn1661.c │ │ │ ├── u8x8_d_sed1330.c │ │ │ ├── u8x8_d_sh1106_64x32.c │ │ │ ├── u8x8_d_sh1106_72x40.c │ │ │ ├── u8x8_d_sh1107.c │ │ │ ├── u8x8_d_sh1108.c │ │ │ ├── u8x8_d_sh1122.c │ │ │ ├── u8x8_d_ssd1305.c │ │ │ ├── u8x8_d_ssd1306_128x32.c │ │ │ ├── u8x8_d_ssd1306_128x64_noname.c │ │ │ ├── u8x8_d_ssd1306_2040x16.c │ │ │ ├── u8x8_d_ssd1306_48x64.c │ │ │ ├── u8x8_d_ssd1306_64x32.c │ │ │ ├── u8x8_d_ssd1306_64x48.c │ │ │ ├── u8x8_d_ssd1306_72x40.c │ │ │ ├── u8x8_d_ssd1306_96x16.c │ │ │ ├── u8x8_d_ssd1309.c │ │ │ ├── u8x8_d_ssd1316.c │ │ │ ├── u8x8_d_ssd1317.c │ │ │ ├── u8x8_d_ssd1318.c │ │ │ ├── u8x8_d_ssd1322.c │ │ │ ├── u8x8_d_ssd1325.c │ │ │ ├── u8x8_d_ssd1326.c │ │ │ ├── u8x8_d_ssd1327.c │ │ │ ├── u8x8_d_ssd1329.c │ │ │ ├── u8x8_d_ssd1606_172x72.c │ │ │ ├── u8x8_d_ssd1607_200x200.c │ │ │ ├── u8x8_d_st7511.c │ │ │ ├── u8x8_d_st75256.c │ │ │ ├── u8x8_d_st7528.c │ │ │ ├── u8x8_d_st75320.c │ │ │ ├── u8x8_d_st7565.c │ │ │ ├── u8x8_d_st7567.c │ │ │ ├── u8x8_d_st7571.c │ │ │ ├── u8x8_d_st7586s_erc240160.c │ │ │ ├── u8x8_d_st7586s_s028hn118a.c │ │ │ ├── u8x8_d_st7586s_ymc240160.c │ │ │ ├── u8x8_d_st7588.c │ │ │ ├── u8x8_d_st7920.c │ │ │ ├── u8x8_d_t6963.c │ │ │ ├── u8x8_d_uc1601.c │ │ │ ├── u8x8_d_uc1604.c │ │ │ ├── u8x8_d_uc1608.c │ │ │ ├── u8x8_d_uc1610.c │ │ │ ├── u8x8_d_uc1611.c │ │ │ ├── u8x8_d_uc1617.c │ │ │ ├── u8x8_d_uc1638.c │ │ │ ├── u8x8_d_uc1701_dogs102.c │ │ │ ├── u8x8_d_uc1701_mini12864.c │ │ │ ├── u8x8_debounce.c │ │ │ ├── u8x8_display.c │ │ │ ├── u8x8_fonts.c │ │ │ ├── u8x8_gpio.c │ │ │ ├── u8x8_input_value.c │ │ │ ├── u8x8_message.c │ │ │ ├── u8x8_selection_list.c │ │ │ ├── u8x8_setup.c │ │ │ ├── u8x8_string.c │ │ │ ├── u8x8_u16toa.c │ │ │ └── u8x8_u8toa.c │ └── U8glib │ │ ├── README.md │ │ ├── examples │ │ ├── A2Printer │ │ │ └── A2Printer.ino │ │ ├── Bitmap │ │ │ └── Bitmap.ino │ │ ├── Chess │ │ │ └── Chess.ino │ │ ├── Console │ │ │ └── Console.ino │ │ ├── F │ │ │ └── F.ino │ │ ├── FPS │ │ │ └── FPS.ino │ │ ├── GraphicsTest │ │ │ └── GraphicsTest.ino │ │ ├── HelloWorld │ │ │ └── HelloWorld.ino │ │ ├── Menu │ │ │ └── Menu.ino │ │ ├── PrintTest │ │ │ └── PrintTest.ino │ │ ├── Rotation │ │ │ └── Rotation.ino │ │ ├── Scale │ │ │ └── Scale.ino │ │ ├── TextRotX │ │ │ └── TextRotX.ino │ │ ├── Touch4WSetup │ │ │ └── Touch4WSetup.ino │ │ ├── Touch4WTest │ │ │ └── Touch4WTest.ino │ │ ├── U8gLogo │ │ │ └── U8gLogo.ino │ │ └── XBM │ │ │ └── XBM.ino │ │ ├── extras │ │ ├── ChangeLog │ │ └── INSTALL.TXT │ │ ├── library.properties │ │ ├── license.txt │ │ └── src │ │ ├── U8glib.cpp │ │ ├── U8glib.h │ │ └── clib │ │ ├── chessengine.c │ │ ├── u8g.h │ │ ├── u8g_bitmap.c │ │ ├── u8g_circle.c │ │ ├── u8g_clip.c │ │ ├── u8g_com_api.c │ │ ├── u8g_com_api_16gr.c │ │ ├── u8g_com_arduino_attiny85_hw_spi.c │ │ ├── u8g_com_arduino_common.c │ │ ├── u8g_com_arduino_fast_parallel.c │ │ ├── u8g_com_arduino_hw_spi.c │ │ ├── u8g_com_arduino_hw_usart_spi.c │ │ ├── u8g_com_arduino_no_en_parallel.c │ │ ├── u8g_com_arduino_parallel.c │ │ ├── u8g_com_arduino_port_d_wr.c │ │ ├── u8g_com_arduino_ssd_i2c.c │ │ ├── u8g_com_arduino_st7920_custom.c │ │ ├── u8g_com_arduino_st7920_hw_spi.c │ │ ├── u8g_com_arduino_st7920_spi.c │ │ ├── u8g_com_arduino_std_sw_spi.c │ │ ├── u8g_com_arduino_sw_spi.c │ │ ├── u8g_com_arduino_t6963.c │ │ ├── u8g_com_arduino_uc_i2c.c │ │ ├── u8g_com_atmega_hw_spi.c │ │ ├── u8g_com_atmega_parallel.c │ │ ├── u8g_com_atmega_st7920_hw_spi.c │ │ ├── u8g_com_atmega_st7920_spi.c │ │ ├── u8g_com_atmega_sw_spi.c │ │ ├── u8g_com_atxmega_hw_spi.c │ │ ├── u8g_com_atxmega_st7920_hw_spi.c │ │ ├── u8g_com_i2c.c │ │ ├── u8g_com_io.c │ │ ├── u8g_com_linux_ssd_i2c.c │ │ ├── u8g_com_msp430_hw_spi.c │ │ ├── u8g_com_null.c │ │ ├── u8g_com_psoc5_ssd_hw_parallel.c │ │ ├── u8g_com_raspberrypi_hw_spi.c │ │ ├── u8g_com_raspberrypi_ssd_i2c.c │ │ ├── u8g_com_std_sw_spi.c │ │ ├── u8g_cursor.c │ │ ├── u8g_delay.c │ │ ├── u8g_dev_a2_micro_printer.c │ │ ├── u8g_dev_flipdisc_2x7.c │ │ ├── u8g_dev_gprof.c │ │ ├── u8g_dev_ht1632.c │ │ ├── u8g_dev_ili9325d_320x240.c │ │ ├── u8g_dev_ks0108_128x64.c │ │ ├── u8g_dev_lc7981_160x80.c │ │ ├── u8g_dev_lc7981_240x128.c │ │ ├── u8g_dev_lc7981_240x64.c │ │ ├── u8g_dev_lc7981_320x64.c │ │ ├── u8g_dev_ld7032_60x32.c │ │ ├── u8g_dev_null.c │ │ ├── u8g_dev_pcd8544_84x48.c │ │ ├── u8g_dev_pcf8812_96x65.c │ │ ├── u8g_dev_sbn1661_122x32.c │ │ ├── u8g_dev_ssd1306_128x32.c │ │ ├── u8g_dev_ssd1306_128x64.c │ │ ├── u8g_dev_ssd1306_64x48.c │ │ ├── u8g_dev_ssd1309_128x64.c │ │ ├── u8g_dev_ssd1322_nhd31oled_bw.c │ │ ├── u8g_dev_ssd1322_nhd31oled_gr.c │ │ ├── u8g_dev_ssd1325_nhd27oled_bw.c │ │ ├── u8g_dev_ssd1325_nhd27oled_bw_new.c │ │ ├── u8g_dev_ssd1325_nhd27oled_gr.c │ │ ├── u8g_dev_ssd1325_nhd27oled_gr_new.c │ │ ├── u8g_dev_ssd1327_96x96_gr.c │ │ ├── u8g_dev_ssd1351_128x128.c │ │ ├── u8g_dev_ssd1353_160x128.c │ │ ├── u8g_dev_st7565_64128n.c │ │ ├── u8g_dev_st7565_dogm128.c │ │ ├── u8g_dev_st7565_dogm132.c │ │ ├── u8g_dev_st7565_lm6059.c │ │ ├── u8g_dev_st7565_lm6063.c │ │ ├── u8g_dev_st7565_nhd_c12832.c │ │ ├── u8g_dev_st7565_nhd_c12864.c │ │ ├── u8g_dev_st7687_c144mvgd.c │ │ ├── u8g_dev_st7920_128x64.c │ │ ├── u8g_dev_st7920_192x32.c │ │ ├── u8g_dev_st7920_202x32.c │ │ ├── u8g_dev_t6963_128x128.c │ │ ├── u8g_dev_t6963_128x64.c │ │ ├── u8g_dev_t6963_240x128.c │ │ ├── u8g_dev_t6963_240x64.c │ │ ├── u8g_dev_tls8204_84x48.c │ │ ├── u8g_dev_uc1601_c128032.c │ │ ├── u8g_dev_uc1608_240x128.c │ │ ├── u8g_dev_uc1608_240x64.c │ │ ├── u8g_dev_uc1610_dogxl160.c │ │ ├── u8g_dev_uc1611_dogm240.c │ │ ├── u8g_dev_uc1611_dogxl240.c │ │ ├── u8g_dev_uc1701_dogs102.c │ │ ├── u8g_dev_uc1701_mini12864.c │ │ ├── u8g_ellipse.c │ │ ├── u8g_font.c │ │ ├── u8g_font_data.c │ │ ├── u8g_line.c │ │ ├── u8g_ll_api.c │ │ ├── u8g_page.c │ │ ├── u8g_pb.c │ │ ├── u8g_pb14v1.c │ │ ├── u8g_pb16h1.c │ │ ├── u8g_pb16h2.c │ │ ├── u8g_pb16v1.c │ │ ├── u8g_pb16v2.c │ │ ├── u8g_pb32h1.c │ │ ├── u8g_pb8h1.c │ │ ├── u8g_pb8h1f.c │ │ ├── u8g_pb8h2.c │ │ ├── u8g_pb8h8.c │ │ ├── u8g_pb8v1.c │ │ ├── u8g_pb8v2.c │ │ ├── u8g_pbxh16.c │ │ ├── u8g_pbxh24.c │ │ ├── u8g_polygon.c │ │ ├── u8g_rect.c │ │ ├── u8g_rot.c │ │ ├── u8g_scale.c │ │ ├── u8g_state.c │ │ ├── u8g_u16toa.c │ │ ├── u8g_u8toa.c │ │ └── u8g_virtual_screen.c ├── platformio.ini └── src │ ├── DSEG7Classic-BoldFont.h │ ├── fonts.h │ ├── icons.h │ ├── main.cpp │ └── settings.h └── t1-lite ├── .gitignore ├── LICENSE ├── README.md ├── cube-clock-lite.code-workspace ├── lib ├── DHT10_cokoino │ ├── DHT10.cpp │ ├── DHT10.h │ └── examples │ │ └── DHT10 │ │ └── DHT10.ino ├── DoubleResetDetect │ ├── LICENSE │ ├── README.md │ ├── examples │ │ └── Minimal │ │ │ └── Minimal.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── DoubleResetDetect.cpp │ │ └── DoubleResetDetect.h ├── ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── README.md │ ├── README_GEOMETRY_64_48.md │ ├── UPGRADE-3.0.md │ ├── UPGRADE-4.0.md │ ├── component.mk │ ├── examples │ │ ├── SSD1306ClockDemo │ │ │ ├── SSD1306ClockDemo.ino │ │ │ └── images.h │ │ ├── SSD1306DrawingDemo │ │ │ └── SSD1306DrawingDemo.ino │ │ ├── SSD1306OTADemo │ │ │ └── SSD1306OTADemo.ino │ │ ├── SSD1306SimpleDemo │ │ │ ├── SSD1306SimpleDemo.ino │ │ │ └── images.h │ │ ├── SSD1306TwoScreenDemo │ │ │ ├── SSD1306TwoScreenDemo.ino │ │ │ └── images.h │ │ └── SSD1306UiDemo │ │ │ ├── SSD1306UiDemo.ino │ │ │ └── images.h │ ├── keywords.txt │ ├── library.json │ ├── library.properties │ ├── license │ ├── platformio.ini │ ├── resources │ │ ├── DemoFrame1.jpg │ │ ├── DemoFrame2.jpg │ │ ├── DemoFrame3.jpg │ │ ├── DemoFrame4.jpg │ │ ├── FontTool.png │ │ ├── SPI_version.jpg │ │ ├── glyphEditor.html │ │ ├── glyphEditor.png │ │ └── xbmPreview.png │ └── src │ │ ├── OLEDDisplay.cpp │ │ ├── OLEDDisplay.h │ │ ├── OLEDDisplayFonts.h │ │ ├── OLEDDisplayUi.cpp │ │ ├── OLEDDisplayUi.h │ │ ├── SH1106.h │ │ ├── SH1106Brzo.h │ │ ├── SH1106Spi.h │ │ ├── SH1106Wire.h │ │ ├── SSD1306.h │ │ ├── SSD1306Brzo.h │ │ ├── SSD1306I2C.h │ │ ├── SSD1306Spi.h │ │ └── SSD1306Wire.h ├── EasyNTPClient │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── ArduinoEspWifiShield │ │ │ ├── .esp8266.test.skip │ │ │ └── ArduinoEspWifiShield.ino │ │ └── NodeMCU │ │ │ ├── .uno.test.skip │ │ │ └── NodeMCU.ino │ ├── keywords.txt │ ├── library.json │ ├── library.properties │ └── src │ │ ├── EasyNTPClient.cpp │ │ └── EasyNTPClient.h ├── RTClib │ ├── .github │ │ ├── ISSUE_TEMPLATE.md │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ └── workflows │ │ │ └── githubci.yml │ ├── .gitignore │ ├── .piopm │ ├── README.md │ ├── RTClib.cpp │ ├── RTClib.h │ ├── code-of-conduct.md │ ├── examples │ │ ├── DS3231_alarm │ │ │ └── DS3231_alarm.ino │ │ ├── datecalc │ │ │ └── datecalc.ino │ │ ├── ds1307 │ │ │ └── ds1307.ino │ │ ├── ds1307SqwPin │ │ │ └── ds1307SqwPin.ino │ │ ├── ds1307nvram │ │ │ └── ds1307nvram.ino │ │ ├── ds3231 │ │ │ └── ds3231.ino │ │ ├── interrupts1Hz │ │ │ ├── .leonardo.test.only │ │ │ ├── .mega2560.test.only │ │ │ ├── .uno.test.only │ │ │ └── interrupts1Hz.ino │ │ ├── pcf8523 │ │ │ └── pcf8523.ino │ │ ├── pcf8523Countdown │ │ │ └── pcf8523Countdown.ino │ │ ├── pcf8563 │ │ │ └── pcf8563.ino │ │ ├── pcf8563_interrupt │ │ │ └── pcf8563_interrupt.ino │ │ ├── softrtc │ │ │ └── softrtc.ino │ │ ├── timestamp │ │ │ └── timestamp.ino │ │ └── toString │ ├── keywords.txt │ ├── library.properties │ └── license.txt ├── SimpleDHT │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── SimpleDHT.cpp │ ├── SimpleDHT.h │ ├── examples │ │ ├── DHT11Default │ │ │ └── DHT11Default.ino │ │ ├── DHT11ErrCount │ │ │ └── DHT11ErrCount.ino │ │ ├── DHT11WithRawBits │ │ │ └── DHT11WithRawBits.ino │ │ ├── DHT22Default │ │ │ └── DHT22Default.ino │ │ ├── DHT22ErrCount │ │ │ └── DHT22ErrCount.ino │ │ ├── DHT22Integer │ │ │ └── DHT22Integer.ino │ │ ├── DHT22WithRawBits │ │ │ └── DHT22WithRawBits.ino │ │ └── TwoSensorsDefault │ │ │ └── TwoSensorsDefault.ino │ ├── keywords.txt │ └── library.properties ├── U8g2 │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── full_buffer │ │ │ ├── FPS │ │ │ │ └── FPS.ino │ │ │ ├── FontUsage │ │ │ │ └── FontUsage.ino │ │ │ ├── GraphicsTest │ │ │ │ └── GraphicsTest.ino │ │ │ ├── HelloWorld │ │ │ │ └── HelloWorld.ino │ │ │ ├── IconMenu │ │ │ │ └── IconMenu.ino │ │ │ ├── PrintUTF8 │ │ │ │ └── PrintUTF8.ino │ │ │ ├── ScreenShot │ │ │ │ └── ScreenShot.ino │ │ │ ├── SelectionList │ │ │ │ └── SelectionList.ino │ │ │ ├── Shennong │ │ │ │ └── Shennong.ino │ │ │ ├── U8g2Logo │ │ │ │ └── U8g2Logo.ino │ │ │ ├── UpdateArea │ │ │ │ └── UpdateArea.ino │ │ │ └── Weather │ │ │ │ └── Weather.ino │ │ ├── games │ │ │ ├── LittleRookChess │ │ │ │ └── LittleRookChess.ino │ │ │ └── SpaceTrash │ │ │ │ └── SpaceTrash.ino │ │ ├── page_buffer │ │ │ ├── A2Printer │ │ │ │ └── A2Printer.ino │ │ │ ├── Chinese │ │ │ │ └── Chinese.ino │ │ │ ├── ClipWindow │ │ │ │ └── ClipWindow.ino │ │ │ ├── Clock │ │ │ │ └── Clock.ino │ │ │ ├── ContrastTest │ │ │ │ └── ContrastTest.ino │ │ │ ├── Devanagari │ │ │ │ └── Devanagari.ino │ │ │ ├── DirectAccess │ │ │ │ └── DirectAccess.ino │ │ │ ├── DrawLog │ │ │ │ └── DrawLog.ino │ │ │ ├── ExtUTF8 │ │ │ │ └── ExtUTF8.ino │ │ │ ├── FPS │ │ │ │ └── FPS.ino │ │ │ ├── FlipMode │ │ │ │ └── FlipMode.ino │ │ │ ├── GraphicsTest │ │ │ │ └── GraphicsTest.ino │ │ │ ├── HelloWorld │ │ │ │ └── HelloWorld.ino │ │ │ ├── IconMenu │ │ │ │ └── IconMenu.ino │ │ │ ├── Japanese │ │ │ │ └── Japanese.ino │ │ │ ├── Korean │ │ │ │ └── Korean.ino │ │ │ ├── LoadFromSD │ │ │ │ └── LoadFromSD.ino │ │ │ ├── PowerSaveTest │ │ │ │ └── PowerSaveTest.ino │ │ │ ├── PrintHelloWorld │ │ │ │ └── PrintHelloWorld.ino │ │ │ ├── PrintProgmem │ │ │ │ └── PrintProgmem.ino │ │ │ ├── PrintUTF8 │ │ │ │ └── PrintUTF8.ino │ │ │ ├── ScrollingText │ │ │ │ └── ScrollingText.ino │ │ │ ├── SelectionList │ │ │ │ └── SelectionList.ino │ │ │ ├── Serial │ │ │ │ └── Serial.ino │ │ │ ├── Shennong │ │ │ │ └── Shennong.ino │ │ │ ├── StateBufferLoop │ │ │ │ └── StateBufferLoop.ino │ │ │ ├── Terminal │ │ │ │ └── Terminal.ino │ │ │ ├── U8g2Logo │ │ │ │ └── U8g2Logo.ino │ │ │ ├── UpdatePartly │ │ │ │ └── UpdatePartly.ino │ │ │ ├── Weather │ │ │ │ └── Weather.ino │ │ │ ├── XBM │ │ │ │ └── XBM.ino │ │ │ └── XORTest │ │ │ │ └── XORTest.ino │ │ └── u8x8 │ │ │ ├── 16x16Font │ │ │ └── 16x16Font.ino │ │ │ ├── ArduboyTest │ │ │ └── ArduboyTest.ino │ │ │ ├── FlipMode │ │ │ └── FlipMode.ino │ │ │ ├── GraphicsTest │ │ │ └── GraphicsTest.ino │ │ │ ├── HelloWorld │ │ │ └── HelloWorld.ino │ │ │ ├── MessageBox │ │ │ └── MessageBox.ino │ │ │ └── Terminal │ │ │ └── Terminal.ino │ ├── extras │ │ └── ChangeLog │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── U8g2lib.cpp │ │ ├── U8g2lib.h │ │ ├── U8x8lib.cpp │ │ ├── U8x8lib.h │ │ └── clib │ │ ├── u8g2.h │ │ ├── u8g2_bitmap.c │ │ ├── u8g2_box.c │ │ ├── u8g2_buffer.c │ │ ├── u8g2_circle.c │ │ ├── u8g2_cleardisplay.c │ │ ├── u8g2_d_memory.c │ │ ├── u8g2_d_setup.c │ │ ├── u8g2_font.c │ │ ├── u8g2_fonts.c │ │ ├── u8g2_hvline.c │ │ ├── u8g2_input_value.c │ │ ├── u8g2_intersection.c │ │ ├── u8g2_kerning.c │ │ ├── u8g2_line.c │ │ ├── u8g2_ll_hvline.c │ │ ├── u8g2_message.c │ │ ├── u8g2_polygon.c │ │ ├── u8g2_selection_list.c │ │ ├── u8g2_setup.c │ │ ├── u8log.c │ │ ├── u8log_u8g2.c │ │ ├── u8log_u8x8.c │ │ ├── u8x8.h │ │ ├── u8x8_8x8.c │ │ ├── u8x8_byte.c │ │ ├── u8x8_cad.c │ │ ├── u8x8_capture.c │ │ ├── u8x8_d_a2printer.c │ │ ├── u8x8_d_il3820_296x128.c │ │ ├── u8x8_d_ist3020.c │ │ ├── u8x8_d_ist7920.c │ │ ├── u8x8_d_ks0108.c │ │ ├── u8x8_d_lc7981.c │ │ ├── u8x8_d_ld7032_60x32.c │ │ ├── u8x8_d_ls013b7dh03.c │ │ ├── u8x8_d_max7219.c │ │ ├── u8x8_d_pcd8544_84x48.c │ │ ├── u8x8_d_pcf8812.c │ │ ├── u8x8_d_pcf8814_hx1230.c │ │ ├── u8x8_d_s1d15e06.c │ │ ├── u8x8_d_sbn1661.c │ │ ├── u8x8_d_sed1330.c │ │ ├── u8x8_d_sh1106_64x32.c │ │ ├── u8x8_d_sh1106_72x40.c │ │ ├── u8x8_d_sh1107.c │ │ ├── u8x8_d_sh1108.c │ │ ├── u8x8_d_sh1122.c │ │ ├── u8x8_d_ssd1305.c │ │ ├── u8x8_d_ssd1306_128x32.c │ │ ├── u8x8_d_ssd1306_128x64_noname.c │ │ ├── u8x8_d_ssd1306_2040x16.c │ │ ├── u8x8_d_ssd1306_48x64.c │ │ ├── u8x8_d_ssd1306_64x32.c │ │ ├── u8x8_d_ssd1306_64x48.c │ │ ├── u8x8_d_ssd1306_72x40.c │ │ ├── u8x8_d_ssd1306_96x16.c │ │ ├── u8x8_d_ssd1309.c │ │ ├── u8x8_d_ssd1316.c │ │ ├── u8x8_d_ssd1317.c │ │ ├── u8x8_d_ssd1318.c │ │ ├── u8x8_d_ssd1322.c │ │ ├── u8x8_d_ssd1325.c │ │ ├── u8x8_d_ssd1326.c │ │ ├── u8x8_d_ssd1327.c │ │ ├── u8x8_d_ssd1329.c │ │ ├── u8x8_d_ssd1606_172x72.c │ │ ├── u8x8_d_ssd1607_200x200.c │ │ ├── u8x8_d_st7511.c │ │ ├── u8x8_d_st75256.c │ │ ├── u8x8_d_st7528.c │ │ ├── u8x8_d_st75320.c │ │ ├── u8x8_d_st7565.c │ │ ├── u8x8_d_st7567.c │ │ ├── u8x8_d_st7571.c │ │ ├── u8x8_d_st7586s_erc240160.c │ │ ├── u8x8_d_st7586s_s028hn118a.c │ │ ├── u8x8_d_st7586s_ymc240160.c │ │ ├── u8x8_d_st7588.c │ │ ├── u8x8_d_st7920.c │ │ ├── u8x8_d_t6963.c │ │ ├── u8x8_d_uc1601.c │ │ ├── u8x8_d_uc1604.c │ │ ├── u8x8_d_uc1608.c │ │ ├── u8x8_d_uc1610.c │ │ ├── u8x8_d_uc1611.c │ │ ├── u8x8_d_uc1617.c │ │ ├── u8x8_d_uc1638.c │ │ ├── u8x8_d_uc1701_dogs102.c │ │ ├── u8x8_d_uc1701_mini12864.c │ │ ├── u8x8_debounce.c │ │ ├── u8x8_display.c │ │ ├── u8x8_fonts.c │ │ ├── u8x8_gpio.c │ │ ├── u8x8_input_value.c │ │ ├── u8x8_message.c │ │ ├── u8x8_selection_list.c │ │ ├── u8x8_setup.c │ │ ├── u8x8_string.c │ │ ├── u8x8_u16toa.c │ │ └── u8x8_u8toa.c └── U8glib │ ├── README.md │ ├── examples │ ├── A2Printer │ │ └── A2Printer.ino │ ├── Bitmap │ │ └── Bitmap.ino │ ├── Chess │ │ └── Chess.ino │ ├── Console │ │ └── Console.ino │ ├── F │ │ └── F.ino │ ├── FPS │ │ └── FPS.ino │ ├── GraphicsTest │ │ └── GraphicsTest.ino │ ├── HelloWorld │ │ └── HelloWorld.ino │ ├── Menu │ │ └── Menu.ino │ ├── PrintTest │ │ └── PrintTest.ino │ ├── Rotation │ │ └── Rotation.ino │ ├── Scale │ │ └── Scale.ino │ ├── TextRotX │ │ └── TextRotX.ino │ ├── Touch4WSetup │ │ └── Touch4WSetup.ino │ ├── Touch4WTest │ │ └── Touch4WTest.ino │ ├── U8gLogo │ │ └── U8gLogo.ino │ └── XBM │ │ └── XBM.ino │ ├── extras │ ├── ChangeLog │ └── INSTALL.TXT │ ├── library.properties │ ├── license.txt │ └── src │ ├── U8glib.cpp │ ├── U8glib.h │ └── clib │ ├── chessengine.c │ ├── u8g.h │ ├── u8g_bitmap.c │ ├── u8g_circle.c │ ├── u8g_clip.c │ ├── u8g_com_api.c │ ├── u8g_com_api_16gr.c │ ├── u8g_com_arduino_attiny85_hw_spi.c │ ├── u8g_com_arduino_common.c │ ├── u8g_com_arduino_fast_parallel.c │ ├── u8g_com_arduino_hw_spi.c │ ├── u8g_com_arduino_hw_usart_spi.c │ ├── u8g_com_arduino_no_en_parallel.c │ ├── u8g_com_arduino_parallel.c │ ├── u8g_com_arduino_port_d_wr.c │ ├── u8g_com_arduino_ssd_i2c.c │ ├── u8g_com_arduino_st7920_custom.c │ ├── u8g_com_arduino_st7920_hw_spi.c │ ├── u8g_com_arduino_st7920_spi.c │ ├── u8g_com_arduino_std_sw_spi.c │ ├── u8g_com_arduino_sw_spi.c │ ├── u8g_com_arduino_t6963.c │ ├── u8g_com_arduino_uc_i2c.c │ ├── u8g_com_atmega_hw_spi.c │ ├── u8g_com_atmega_parallel.c │ ├── u8g_com_atmega_st7920_hw_spi.c │ ├── u8g_com_atmega_st7920_spi.c │ ├── u8g_com_atmega_sw_spi.c │ ├── u8g_com_atxmega_hw_spi.c │ ├── u8g_com_atxmega_st7920_hw_spi.c │ ├── u8g_com_i2c.c │ ├── u8g_com_io.c │ ├── u8g_com_linux_ssd_i2c.c │ ├── u8g_com_msp430_hw_spi.c │ ├── u8g_com_null.c │ ├── u8g_com_psoc5_ssd_hw_parallel.c │ ├── u8g_com_raspberrypi_hw_spi.c │ ├── u8g_com_raspberrypi_ssd_i2c.c │ ├── u8g_com_std_sw_spi.c │ ├── u8g_cursor.c │ ├── u8g_delay.c │ ├── u8g_dev_a2_micro_printer.c │ ├── u8g_dev_flipdisc_2x7.c │ ├── u8g_dev_gprof.c │ ├── u8g_dev_ht1632.c │ ├── u8g_dev_ili9325d_320x240.c │ ├── u8g_dev_ks0108_128x64.c │ ├── u8g_dev_lc7981_160x80.c │ ├── u8g_dev_lc7981_240x128.c │ ├── u8g_dev_lc7981_240x64.c │ ├── u8g_dev_lc7981_320x64.c │ ├── u8g_dev_ld7032_60x32.c │ ├── u8g_dev_null.c │ ├── u8g_dev_pcd8544_84x48.c │ ├── u8g_dev_pcf8812_96x65.c │ ├── u8g_dev_sbn1661_122x32.c │ ├── u8g_dev_ssd1306_128x32.c │ ├── u8g_dev_ssd1306_128x64.c │ ├── u8g_dev_ssd1306_64x48.c │ ├── u8g_dev_ssd1309_128x64.c │ ├── u8g_dev_ssd1322_nhd31oled_bw.c │ ├── u8g_dev_ssd1322_nhd31oled_gr.c │ ├── u8g_dev_ssd1325_nhd27oled_bw.c │ ├── u8g_dev_ssd1325_nhd27oled_bw_new.c │ ├── u8g_dev_ssd1325_nhd27oled_gr.c │ ├── u8g_dev_ssd1325_nhd27oled_gr_new.c │ ├── u8g_dev_ssd1327_96x96_gr.c │ ├── u8g_dev_ssd1351_128x128.c │ ├── u8g_dev_ssd1353_160x128.c │ ├── u8g_dev_st7565_64128n.c │ ├── u8g_dev_st7565_dogm128.c │ ├── u8g_dev_st7565_dogm132.c │ ├── u8g_dev_st7565_lm6059.c │ ├── u8g_dev_st7565_lm6063.c │ ├── u8g_dev_st7565_nhd_c12832.c │ ├── u8g_dev_st7565_nhd_c12864.c │ ├── u8g_dev_st7687_c144mvgd.c │ ├── u8g_dev_st7920_128x64.c │ ├── u8g_dev_st7920_192x32.c │ ├── u8g_dev_st7920_202x32.c │ ├── u8g_dev_t6963_128x128.c │ ├── u8g_dev_t6963_128x64.c │ ├── u8g_dev_t6963_240x128.c │ ├── u8g_dev_t6963_240x64.c │ ├── u8g_dev_tls8204_84x48.c │ ├── u8g_dev_uc1601_c128032.c │ ├── u8g_dev_uc1608_240x128.c │ ├── u8g_dev_uc1608_240x64.c │ ├── u8g_dev_uc1610_dogxl160.c │ ├── u8g_dev_uc1611_dogm240.c │ ├── u8g_dev_uc1611_dogxl240.c │ ├── u8g_dev_uc1701_dogs102.c │ ├── u8g_dev_uc1701_mini12864.c │ ├── u8g_ellipse.c │ ├── u8g_font.c │ ├── u8g_font_data.c │ ├── u8g_line.c │ ├── u8g_ll_api.c │ ├── u8g_page.c │ ├── u8g_pb.c │ ├── u8g_pb14v1.c │ ├── u8g_pb16h1.c │ ├── u8g_pb16h2.c │ ├── u8g_pb16v1.c │ ├── u8g_pb16v2.c │ ├── u8g_pb32h1.c │ ├── u8g_pb8h1.c │ ├── u8g_pb8h1f.c │ ├── u8g_pb8h2.c │ ├── u8g_pb8h8.c │ ├── u8g_pb8v1.c │ ├── u8g_pb8v2.c │ ├── u8g_pbxh16.c │ ├── u8g_pbxh24.c │ ├── u8g_polygon.c │ ├── u8g_rect.c │ ├── u8g_rot.c │ ├── u8g_scale.c │ ├── u8g_state.c │ ├── u8g_u16toa.c │ ├── u8g_u8toa.c │ └── u8g_virtual_screen.c ├── platformio.ini └── src ├── DSEG7Classic-BoldFont.h ├── fonts.h ├── icons.h ├── main.cpp └── settings.h /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cube-clock-lite 2 | A network clock, display on NXEZ CUBE. 3 | 4 | Visit the homepage for more infomation: 5 | 6 | [https://make.quwj.com/project/231](https://make.quwj.com/project/231) 7 | 8 | [https://make.quwj.com/project/405](https://make.quwj.com/project/405) -------------------------------------------------------------------------------- /classic-lite/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/.DS_Store -------------------------------------------------------------------------------- /classic-lite/cube-clock-lite.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": { 8 | "files.associations": { 9 | "sstream": "cpp" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /classic-lite/lib/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/.DS_Store -------------------------------------------------------------------------------- /classic-lite/lib/DHT10_cokoino/DHT10.cpp: -------------------------------------------------------------------------------- 1 | // FILE: DHT10.cpp 2 | // AUTHOR: mo cokoino 3 | // PURPOSE: I2C library for DHT10 for Arduino. 4 | // VERSION: 0.0.1 5 | // HISTORY: See DHT10.cpp 6 | // URL: https://github.com/Cokoino/DHT10-lilbrary 7 | 8 | #include 9 | #include "DHT10.h" 10 | 11 | #define DHT10_ADDRESS ((uint8_t)0x38) 12 | 13 | //////////////////////////////////////////////////////////////////// 14 | void DHT10::begin(){ 15 | Wire.begin(); 16 | } 17 | ////////////////////////////////////////////////////////////////////. 18 | int8_t DHT10::read(){ 19 | //trigger measurement data 20 | delay(50); 21 | Wire.beginTransmission(DHT10_ADDRESS); 22 | Wire.write(0xac); 23 | Wire.write(0x33); 24 | Wire.write(0x00); 25 | int8_t status = Wire.endTransmission(); 26 | if(status !=DHT10_OK) return DHT10_CONNECT_ERROR; 27 | 28 | //check busy 29 | char ct = 0; 30 | uint8_t st; 31 | do{ 32 | Wire.requestFrom(DHT10_ADDRESS, 1); 33 | st = Wire.read(); 34 | delay(4); 35 | if(ct++>25) return DHT10_BUSY; 36 | }while((st & 0x80)==0x80); 37 | 38 | //check CAL 39 | if((st & 0x08)!=0x08){ 40 | Wire.beginTransmission(DHT10_ADDRESS); 41 | Wire.write(0xe1); //configrate DHT10 42 | Wire.write(0x08); 43 | Wire.write(0x00); 44 | Wire.endTransmission(); 45 | delay(50); 46 | Wire.beginTransmission(DHT10_ADDRESS); 47 | Wire.write(0xba); //soft reset DHT10 48 | Wire.endTransmission(); 49 | delay(200); 50 | return DHT10_CAL_ERROR; 51 | } 52 | 53 | //read humidity and temperature 54 | Wire.requestFrom(DHT10_ADDRESS, 6); 55 | st = Wire.read(); 56 | for (int i = 0; i < 5; i++){ 57 | data[i] = Wire.read(); 58 | } 59 | 60 | //processing data 61 | temperature_humidity(); 62 | return DHT10_OK; 63 | } 64 | //////////////////////////////////////////////////////////////////// 65 | void DHT10::temperature_humidity(void){ 66 | humidity = ((float)data[0])/256; 67 | humidity = humidity + ((float)data[1])/64/1024; 68 | humidity = humidity + ((float)data[2])/16/1024/1024; 69 | humidity = humidity*100; 70 | temperature = ((float)(data[2]%16))/16; 71 | temperature = temperature + ((float)data[3])/4096; 72 | temperature = temperature + ((float)data[4])/1024/1024; 73 | temperature = temperature*200 - 50; 74 | } 75 | // end of file 76 | -------------------------------------------------------------------------------- /classic-lite/lib/DHT10_cokoino/DHT10.h: -------------------------------------------------------------------------------- 1 | #ifndef DHT10_H 2 | #define DHT10_H 3 | // 4 | // FILE: DHT10.h 5 | // AUTHOR: mo cokoino 6 | // PURPOSE: DHT_I2C library for Arduino . 7 | // VERSION: 0.0.1 8 | // URL: https://github.com/Cokoino/DHT10-lilbrary 9 | 10 | #include "Wire.h" 11 | #include "Arduino.h" 12 | 13 | #define DHT10_VERSION "0.0.1" 14 | #define DHT10_OK 0 15 | #define DHT10_CONNECT_ERROR -1 16 | #define DHT10_BUSY -2 17 | #define DHT10_CAL_ERROR -3 18 | 19 | class DHT10 20 | { 21 | public: 22 | void begin(); 23 | int8_t read(); 24 | void temperature_humidity(); 25 | float humidity; 26 | float temperature; 27 | private: 28 | uint8_t data[5]; 29 | }; 30 | 31 | #endif 32 | // END OF FILE 33 | -------------------------------------------------------------------------------- /classic-lite/lib/DHT10_cokoino/examples/DHT10/DHT10.ino: -------------------------------------------------------------------------------- 1 | // AUTHOR: mo cokoino 2 | // VERSION: 0.0.1 3 | // PURPOSE: Demo for DHT10 I2C humidity & temperature sensor 4 | // URL: https://github.com/Cokoino/DHT10-lilbrary 5 | 6 | #include 7 | DHT10 DHT; 8 | void setup(){ 9 | DHT.begin(); 10 | Serial.begin(115200); 11 | Serial.print("DHT10 library version: "); 12 | Serial.println(DHT10_VERSION); 13 | delay(2000); 14 | Serial.println("Humidity(%), Temperature(C)"); 15 | } 16 | void loop(){ 17 | int status = DHT.read(); 18 | if(status == DHT10_OK){ 19 | Serial.print(DHT.humidity); 20 | Serial.print(",\t"); 21 | Serial.println(DHT.temperature); 22 | } 23 | delay(2000); //recommend delay 2 second 24 | } 25 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/.DS_Store -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(COMPONENT_ADD_INCLUDEDIRS src) 2 | set(COMPONENT_PRIV_REQUIRES arduino-esp32) 3 | set(COMPONENT_SRCDIRS src) 4 | register_component() 5 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/README_GEOMETRY_64_48.md: -------------------------------------------------------------------------------- 1 | # GEOMETRY_64_48 2 | 3 | The 64x48 geometry setting are working with the `Wire.h` and `brzo_i2c` libraries. 4 | 5 | I've tested it successfully with a WEMOS D1 mini Lite and a WEMOS OLED shield 6 | 7 | Initialization code: 8 | 9 | - Wire 10 | ``` 11 | #include 12 | #include 13 | SSD1306Wire display(0x3c, D2, D1, GEOMETRY_64_48 ); // WEMOS OLED shield 14 | ``` 15 | 16 | - BRZO i2c 17 | ``` 18 | #include 19 | SSD1306Brzo display(0x3c, D2, D1, GEOMETRY_64_48 ); // WEMOS OLED Shield 20 | ``` 21 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/UPGRADE-4.0.md: -------------------------------------------------------------------------------- 1 | # Upgrade from 3.x to 4.0 2 | 3 | There are changes that breaks compatibility with older versions. 4 | 5 | 1. You'll have to change data type for all your binary resources such as images and fonts from 6 | 7 | ```c 8 | const char MySymbol[] PROGMEM = { 9 | ``` 10 | 11 | to 12 | 13 | ```c 14 | const uint8_t MySymbol[] PROGMEM = { 15 | ``` 16 | 17 | 1. Arguments of `setContrast` from `char` to `uint8_t` 18 | 19 | ```c++ 20 | void OLEDDisplay::setContrast(char contrast, char precharge, char comdetect); 21 | ``` 22 | 23 | to 24 | 25 | ```c++ 26 | void OLEDDisplay::setContrast(uint8_t contrast, uint8_t precharge, uint8_t comdetect); 27 | ``` 28 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/component.mk: -------------------------------------------------------------------------------- 1 | COMPONENT_ADD_INCLUDEDIRS := src 2 | COMPONENT_SRCDIRS := src 3 | CXXFLAGS += -Wno-ignored-qualifiers 4 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/examples/SSD1306ClockDemo/images.h: -------------------------------------------------------------------------------- 1 | const unsigned char activeSymbol[] PROGMEM = { 2 | B00000000, 3 | B00000000, 4 | B00011000, 5 | B00100100, 6 | B01000010, 7 | B01000010, 8 | B00100100, 9 | B00011000 10 | }; 11 | 12 | const unsigned char inactiveSymbol[] PROGMEM = { 13 | B00000000, 14 | B00000000, 15 | B00000000, 16 | B00000000, 17 | B00011000, 18 | B00011000, 19 | B00000000, 20 | B00000000 21 | }; 22 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/examples/SSD1306SimpleDemo/images.h: -------------------------------------------------------------------------------- 1 | #define WiFi_Logo_width 60 2 | #define WiFi_Logo_height 36 3 | const uint8_t WiFi_Logo_bits[] PROGMEM = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 7 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 9 | 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 10 | 0x00, 0xFF, 0xFF, 0xFF, 0x07, 0xC0, 0x83, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 11 | 0x01, 0x00, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x0C, 0x00, 12 | 0xC0, 0xFF, 0xFF, 0x7C, 0x00, 0x60, 0x0C, 0x00, 0xC0, 0x31, 0x46, 0x7C, 13 | 0xFC, 0x77, 0x08, 0x00, 0xE0, 0x23, 0xC6, 0x3C, 0xFC, 0x67, 0x18, 0x00, 14 | 0xE0, 0x23, 0xE4, 0x3F, 0x1C, 0x00, 0x18, 0x00, 0xE0, 0x23, 0x60, 0x3C, 15 | 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x03, 0x60, 0x3C, 0x1C, 0x70, 0x18, 0x00, 16 | 0xE0, 0x07, 0x60, 0x3C, 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 17 | 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 18 | 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x8F, 0x71, 0x3C, 19 | 0x1C, 0x70, 0x18, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x08, 0x00, 20 | 0xC0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x0C, 0x00, 0x80, 0xFF, 0xFF, 0x1F, 21 | 0x00, 0x00, 0x06, 0x00, 0x80, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x07, 0x00, 22 | 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 23 | 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 24 | 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 25 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 26 | 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | }; 29 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/examples/SSD1306TwoScreenDemo/images.h: -------------------------------------------------------------------------------- 1 | #define WiFi_Logo_width 60 2 | #define WiFi_Logo_height 36 3 | const uint8_t WiFi_Logo_bits[] PROGMEM = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 7 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 9 | 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 10 | 0x00, 0xFF, 0xFF, 0xFF, 0x07, 0xC0, 0x83, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 11 | 0x01, 0x00, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x0C, 0x00, 12 | 0xC0, 0xFF, 0xFF, 0x7C, 0x00, 0x60, 0x0C, 0x00, 0xC0, 0x31, 0x46, 0x7C, 13 | 0xFC, 0x77, 0x08, 0x00, 0xE0, 0x23, 0xC6, 0x3C, 0xFC, 0x67, 0x18, 0x00, 14 | 0xE0, 0x23, 0xE4, 0x3F, 0x1C, 0x00, 0x18, 0x00, 0xE0, 0x23, 0x60, 0x3C, 15 | 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x03, 0x60, 0x3C, 0x1C, 0x70, 0x18, 0x00, 16 | 0xE0, 0x07, 0x60, 0x3C, 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 17 | 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 18 | 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x8F, 0x71, 0x3C, 19 | 0x1C, 0x70, 0x18, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x08, 0x00, 20 | 0xC0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x0C, 0x00, 0x80, 0xFF, 0xFF, 0x1F, 21 | 0x00, 0x00, 0x06, 0x00, 0x80, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x07, 0x00, 22 | 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 23 | 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 24 | 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 25 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 26 | 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | }; 29 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/examples/SSD1306UiDemo/images.h: -------------------------------------------------------------------------------- 1 | #define WiFi_Logo_width 60 2 | #define WiFi_Logo_height 36 3 | const uint8_t WiFi_Logo_bits[] PROGMEM = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 7 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 9 | 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 10 | 0x00, 0xFF, 0xFF, 0xFF, 0x07, 0xC0, 0x83, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 11 | 0x01, 0x00, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x0C, 0x00, 12 | 0xC0, 0xFF, 0xFF, 0x7C, 0x00, 0x60, 0x0C, 0x00, 0xC0, 0x31, 0x46, 0x7C, 13 | 0xFC, 0x77, 0x08, 0x00, 0xE0, 0x23, 0xC6, 0x3C, 0xFC, 0x67, 0x18, 0x00, 14 | 0xE0, 0x23, 0xE4, 0x3F, 0x1C, 0x00, 0x18, 0x00, 0xE0, 0x23, 0x60, 0x3C, 15 | 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x03, 0x60, 0x3C, 0x1C, 0x70, 0x18, 0x00, 16 | 0xE0, 0x07, 0x60, 0x3C, 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 17 | 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 18 | 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x8F, 0x71, 0x3C, 19 | 0x1C, 0x70, 0x18, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x08, 0x00, 20 | 0xC0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x0C, 0x00, 0x80, 0xFF, 0xFF, 0x1F, 21 | 0x00, 0x00, 0x06, 0x00, 0x80, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x07, 0x00, 22 | 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 23 | 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 24 | 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 25 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 26 | 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | }; 29 | 30 | const uint8_t activeSymbol[] PROGMEM = { 31 | B00000000, 32 | B00000000, 33 | B00011000, 34 | B00100100, 35 | B01000010, 36 | B01000010, 37 | B00100100, 38 | B00011000 39 | }; 40 | 41 | const uint8_t inactiveSymbol[] PROGMEM = { 42 | B00000000, 43 | B00000000, 44 | B00000000, 45 | B00000000, 46 | B00011000, 47 | B00011000, 48 | B00000000, 49 | B00000000 50 | }; 51 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ESP8266 and ESP32 OLED driver for SSD1306 displays", 3 | "version": "4.2.0", 4 | "keywords": "ssd1306, oled, display, i2c", 5 | "description": "I2C display driver for SSD1306 OLED displays connected to ESP8266, ESP32, Mbed-OS", 6 | "repository": 7 | { 8 | "type": "git", 9 | "url": "https://github.com/ThingPulse/esp8266-oled-ssd1306" 10 | }, 11 | "authors": 12 | [ 13 | { 14 | "name": "Daniel Eichhorn, ThingPulse", 15 | "email": "squix78@gmail.com", 16 | "url": "https://thingpulse.com" 17 | }, 18 | { 19 | "name": "Fabrice Weinberg", 20 | "email": "fabrice@weinberg.me" 21 | } 22 | ], 23 | "frameworks": "arduino", 24 | "platforms": [ 25 | "espressif8266", 26 | "espressif32", 27 | "nordicnrf52" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266 and ESP32 OLED driver for SSD1306 displays 2 | version=4.2.0 3 | author=ThingPulse, Fabrice Weinberg 4 | maintainer=ThingPulse 5 | sentence=I2C display driver for SSD1306 OLED displays connected to ESP8266, ESP32, Mbed-OS 6 | paragraph=The following geometries are currently supported: 128x64, 128x32, 64x48. The init sequence was inspired by Adafruit's library for the same display. 7 | category=Display 8 | url=https://github.com/ThingPulse/esp8266-oled-ssd1306 9 | architectures=esp8266,esp32 10 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 by Daniel Eichhorn 4 | Copyright (c) 2016 by Fabrice Weinberg 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | 24 | See more at http://blog.squix.ch 25 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; http://docs.platformio.org/page/projectconf.html 10 | 11 | [env:d1_mini] 12 | platform = espressif8266 13 | board = d1_mini 14 | framework = arduino 15 | upload_speed = 921600 16 | board_build.f_cpu = 160000000L 17 | upload_port = /dev/cu.SLAB_USBtoUART 18 | monitor_port = /dev/cu.SLAB_USBtoUART 19 | lib_deps = 20 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame1.jpg -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame2.jpg -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame3.jpg -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame4.jpg -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/FontTool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/FontTool.png -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/SPI_version.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/SPI_version.jpg -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/glyphEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/glyphEditor.png -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/xbmPreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/xbmPreview.png -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/src/SH1106.h: -------------------------------------------------------------------------------- 1 | /** 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2018 by ThingPulse, Daniel Eichhorn 5 | * Copyright (c) 2018 by Fabrice Weinberg 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | * 25 | * ThingPulse invests considerable time and money to develop these open source libraries. 26 | * Please support us by buying our products (and not the clones) from 27 | * https://thingpulse.com 28 | * 29 | */ 30 | 31 | #ifndef SH1106_h 32 | #define SH1106_h 33 | #include "SH1106Wire.h" 34 | 35 | // For make SH1106 an alias for SH1106Wire 36 | typedef SH1106Wire SH1106; 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /classic-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/src/SSD1306.h: -------------------------------------------------------------------------------- 1 | /** 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2018 by ThingPulse, Daniel Eichhorn 5 | * Copyright (c) 2018 by Fabrice Weinberg 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | * 25 | * ThingPulse invests considerable time and money to develop these open source libraries. 26 | * Please support us by buying our products (and not the clones) from 27 | * https://thingpulse.com 28 | * 29 | */ 30 | 31 | #ifndef SSD1306_h 32 | #define SSD1306_h 33 | #include "SSD1306Wire.h" 34 | 35 | // For legacy support make SSD1306 an alias for SSD1306 36 | typedef SSD1306Wire SSD1306; 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/EasyNTPClient/.DS_Store -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Harsha Alva 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/README.md: -------------------------------------------------------------------------------- 1 | # EasyNTPClient 2 | 3 | [![Collaborizm](https://img.shields.io/badge/Collaborizm-Join%20now-blue.svg)](https://www.collaborizm.com/) 4 | [![Build Status](https://travis-ci.org/aharshac/EasyNTPClient.svg?branch=master)](https://travis-ci.org/aharshac/EasyNTPClient) 5 | 6 | Arduino library to read time from Network Time Protocol (NTP) servers. 7 | 8 |   9 | 10 | ## Features 11 | - Handles all heavy lifting involved with managing connections to and parsing time from an NTP server. 12 | - As easy as providing a **UDP** object to the constructor during initialization. 13 | - Works on **Arduino** and **ESP8266**. 14 | 15 |   16 | 17 | ## Examples 18 | 1. **NodeMCU** 19 | Using EasyNTPClient on a NodeMCU (ESP8266) 20 | 21 | 2. **ArduinoEspWifiShield** 22 | Using EasyNTPClient on an Arduino UNO with an ESP-01 (ESP8266) WiFi module. 23 | By [**Claran Martis**](https://www.collaborizm.com/profile/SJne7FcMg) 24 | 25 |   26 | 27 | ## Reference 28 | ### Class **EasyNTPClient** 29 | #### 1. Initialization #### 30 | 1. No frills 31 | ```c 32 | EasyNTPClient(UDP &udp) 33 | 34 | Parameters: 35 | udp: Reference to an UDP object. 36 | Returns: 37 | EasyNTPClient object. 38 | ``` 39 | 40 | 2. Custom server pool 41 | ```c 42 | EasyNTPClient(UDP& udp, const char* serverPool) 43 | 44 | Parameters: 45 | udp: Reference to an UDP object. 46 | serverPool: NTP server pool. Default = "pool.ntp.org" 47 | Returns: 48 | EasyNTPClient object. 49 | ``` 50 | 51 | 3. Time offset 52 | ```c 53 | EasyNTPClient(UDP& udp, const char* serverPool, int offset); 54 | 55 | Parameters: 56 | udp: Reference to an UDP object. 57 | serverPool: NTP server pool domain name. Default = "pool.ntp.org" 58 | offset: Difference from UTC in seconds. Default = 0 59 | Returns: 60 | EasyNTPClient object. 61 | ``` 62 | 63 | #### 2. Methods ### 64 | 1. Get time offset 65 | ```c 66 | int getTimeOffset() 67 | 68 | Returns: 69 | EasyNTPClient object. 70 | ``` 71 | 72 | 2. Set time offset 73 | ```c 74 | void setTimeOffset(int offset); 75 | 76 | Parameters: 77 | offset: Difference from UTC in seconds. 78 | ``` 79 | 80 | 3. Get time in UNIX format 81 | ```c 82 | unsigned long getUnixTime(); 83 | 84 | Returns: 85 | UTC time in UNIX time format (seconds) 86 | ``` -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/examples/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/EasyNTPClient/examples/.DS_Store -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/examples/ArduinoEspWifiShield/.esp8266.test.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/EasyNTPClient/examples/ArduinoEspWifiShield/.esp8266.test.skip -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/examples/ArduinoEspWifiShield/ArduinoEspWifiShield.ino: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EasyNTPClient example: ArduinoEspWifiShield 4 | 5 | This example shows the basic usage of the EasyNTPClient on an Arduino UNO with an ESP-01 (ESP8266) WiFi module. 6 | The output is visible in the Serial Monitor at 9600 baud rate. 7 | 8 | For more details see: https://github.com/aharshac/EasyNTPClient 9 | 10 | An example by Claran Martis 11 | https://www.collaborizm.com/profile/SJne7FcMg 12 | 13 | */ 14 | 15 | 16 | /* 17 | 18 | Pin Connectiions 19 | 20 | +--------+-----------------------------+ 21 | | ESP-01 | Connection | 22 | +--------+-----------------------------+ 23 | | TXD | Arduino D3 | 24 | +--------+-----------------------------+ 25 | | CH_PD | External Power Supply +3.3V | 26 | +--------+-----------------------------+ 27 | | RST | Arduino Reset | 28 | +--------+-----------------------------+ 29 | | VCC | External Power Supply +3.3V | 30 | +--------+-----------------------------+ 31 | | RXD | Arduino D2 | 32 | +--------+-----------------------------+ 33 | | GPIO0 | {None} | 34 | +--------+-----------------------------+ 35 | | GPIO2 | {None} | 36 | +--------+-----------------------------+ 37 | | GND | Common GND | 38 | +--------+-----------------------------+ 39 | 40 | */ 41 | 42 | #include 43 | 44 | #include 45 | #include 46 | #include 47 | #include 48 | 49 | #include 50 | 51 | 52 | char ssid[] = "ssid"; // your network SSID (name) 53 | char password[] = "password"; // your network password 54 | 55 | const int pinEspRx = 2; // Esp Rx <----> Arduino Tx 56 | const int pinEspTx = 3; // Esp Tx <----> Arduino Rx 57 | SoftwareSerial ESP8266(pinEspTx, pinEspRx); 58 | 59 | WiFiEspUDP udp; 60 | EasyNTPClient ntpClient(udp, "pool.ntp.org", ((5*60*60)+(30*60))); // IST = GMT + 5:30 61 | 62 | void setup(){ 63 | Serial.begin(9600); 64 | ESP8266.begin(115200); 65 | WiFi.init(&ESP8266); 66 | WiFi.begin(ssid, password); 67 | 68 | while (WiFi.status() != WL_CONNECTED) { 69 | delay(500); 70 | Serial.print("."); 71 | } 72 | udp.begin(123); 73 | } 74 | 75 | void loop() { 76 | Serial.println(ntpClient.getUnixTime()); 77 | 78 | delay(20000); // wait for 20 seconds before refreshing. 79 | } -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/examples/NodeMCU/.uno.test.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/EasyNTPClient/examples/NodeMCU/.uno.test.skip -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/examples/NodeMCU/NodeMCU.ino: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EasyNTPClient example: NodeMCU 4 | 5 | This example shows the basic usage of the EasyNTPClient on a NodeMCU (ESP8266). 6 | The output is visible in the Serial Monitor at 9600 baud rate. 7 | 8 | For more details see: https://github.com/aharshac/EasyNTPClient 9 | 10 | */ 11 | 12 | /* 13 | * 14 | * Board/shield platform 15 | * 16 | * Arduino WiFi shield: #include 17 | * 18 | * WiFi 101 shield or MKR1000: #include 19 | * 20 | * ESP8266/NodeMCU: #include 21 | * 22 | */ 23 | 24 | #include 25 | 26 | #include 27 | #include 28 | 29 | 30 | const char *ssid = ""; 31 | const char *password = ""; 32 | 33 | WiFiUDP udp; 34 | 35 | EasyNTPClient ntpClient(udp, "pool.ntp.org", ((5*60*60)+(30*60))); // IST = GMT + 5:30 36 | 37 | void setup(){ 38 | Serial.begin(9600); 39 | WiFi.begin(ssid, password); 40 | 41 | while (WiFi.status() != WL_CONNECTED) { 42 | delay(500); 43 | Serial.print("."); 44 | } 45 | } 46 | 47 | void loop() { 48 | Serial.println(ntpClient.getUnixTime()); 49 | 50 | delay(20000); // wait for 20 seconds before refreshing. 51 | } -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For StringSplitter 3 | ####################################### 4 | # Class (KEYWORD1) 5 | ####################################### 6 | 7 | EasyNTPClient KEYWORD1 8 | 9 | ####################################### 10 | # Methods and Functions (KEYWORD2) 11 | ####################################### 12 | 13 | getTimeOffset KEYWORD2 14 | setTimeOffset KEYWORD2 15 | getUnixTime KEYWORD2 16 | 17 | ####################################### 18 | # Constants (LITERAL1) 19 | ####################################### 20 | 21 | -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EasyNTPClient", 3 | "keywords": "easy, udp, web, nodemcu, esp, esp8266, ntp, client, time", 4 | "description": "Library to read time from Network Time Protocol (NTP) servers", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/aharshac/EasyNTPClient" 8 | }, 9 | "version": "1.1.0", 10 | "authors": { 11 | "name": "Harsha Alva", 12 | "url": "https://alvaharsha.me" 13 | }, 14 | "frameworks": "arduino", 15 | "platforms": "espressif" 16 | } -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/library.properties: -------------------------------------------------------------------------------- 1 | name=EasyNTPClient 2 | version=1.1.0 3 | author=Harsha Alva 4 | maintainer=Harsha Alva 5 | sentence=Library to read time from Network Time Protocol (NTP) servers. 6 | paragraph=Handles the connection to an NTP pool and parses Internet Time to UNIX time format. 7 | category=Timing 8 | url=https://github.com/aharshac/EasyNTPClient 9 | architectures=* 10 | -------------------------------------------------------------------------------- /classic-lite/lib/EasyNTPClient/src/EasyNTPClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | EasyNTPClient - Arduino library to read time from Network Time Protocol (NTP) servers. 3 | Created by Harsha Alva, June 29, 2017. 4 | Released into the public domain. 5 | 6 | Based on work by: 7 | * Francesco Potortì, 2013 8 | * https://playground.arduino.cc/Code/NTPclient 9 | * 10 | * Sandeep Mistry, 2016 11 | * https://github.com/arduino-libraries/NTPClient 12 | */ 13 | 14 | #ifndef EasyNTPClient_h 15 | #define EasyNTPClient_h 16 | 17 | #include "Arduino.h" 18 | #include 19 | 20 | class EasyNTPClient 21 | { 22 | public: 23 | EasyNTPClient(UDP &udp); 24 | EasyNTPClient(UDP& udp, const char* serverPool); 25 | EasyNTPClient(UDP& udp, const char* serverPool, int offset); 26 | int getTimeOffset(); 27 | void setTimeOffset(int offset); 28 | unsigned long getUnixTime(); 29 | 30 | private: 31 | UDP *mUdp; 32 | const char* mServerPool = "pool.ntp.org"; 33 | int mOffset = 0; 34 | unsigned int mUpdateInterval = 60000; 35 | unsigned long mLastUpdate = 0; 36 | long mServerTime = 0; 37 | unsigned long getServerTime(); 38 | }; 39 | 40 | #endif -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thank you for creating a pull request to contribute to Adafruit's GitHub code! 2 | Before you open the request please review the following guidelines and tips to 3 | help it be more easily integrated: 4 | 5 | - **Describe the scope of your change--i.e. what the change does and what parts 6 | of the code were modified.** This will help us understand any risks of integrating 7 | the code. 8 | 9 | - **Describe any known limitations with your change.** For example if the change 10 | doesn't apply to a supported platform of the library please mention it. 11 | 12 | - **Please run any tests or examples that can exercise your modified code.** We 13 | strive to not break users of the code and running tests/examples helps with this 14 | process. 15 | 16 | Thank you again for contributing! We will try to test and integrate the change 17 | as soon as we can, but be aware we have many GitHub repositories to manage and 18 | can't immediately respond to every request. There is no need to bump or check in 19 | on a pull request (it will clutter the discussion of the request). 20 | 21 | Also don't be worried if the request is closed or not integrated--sometimes the 22 | priorities of Adafruit's GitHub code (education, ease of use) might not match the 23 | priorities of the pull request. Don't fret, the open source community thrives on 24 | forks and GitHub makes it easy to keep your changes in a forked repo. 25 | 26 | After reviewing the guidelines above you can delete this text from the pull request. 27 | -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/.github/workflows/githubci.yml: -------------------------------------------------------------------------------- 1 | name: Arduino Library CI 2 | 3 | on: [pull_request, push, repository_dispatch] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/setup-python@v1 11 | with: 12 | python-version: '3.x' 13 | - uses: actions/checkout@v2 14 | - uses: actions/checkout@v2 15 | with: 16 | repository: adafruit/ci-arduino 17 | path: ci 18 | 19 | - name: pre-install 20 | run: bash ci/actions_install.sh 21 | 22 | - name: test platforms 23 | run: python3 ci/build_platform.py main_platforms 24 | 25 | - name: clang 26 | run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r . 27 | 28 | - name: doxygen 29 | env: 30 | GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }} 31 | PRETTYNAME : "RTClib" 32 | run: bash ci/doxy_gen_and_deploy.sh 33 | -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | html 3 | Doxyfile* 4 | doxygen_sqlite3.db 5 | -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/.piopm: -------------------------------------------------------------------------------- 1 | {"type": "library", "name": "RTClib", "version": "1.12.4", "spec": {"owner": "adafruit", "id": 83, "name": "RTClib", "requirements": null, "url": null}} -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/examples/ds1307SqwPin/ds1307SqwPin.ino: -------------------------------------------------------------------------------- 1 | // SQW/OUT pin mode using a DS1307 RTC connected via I2C. 2 | // 3 | // According to the data sheet (http://datasheets.maxim-ic.com/en/ds/DS1307.pdf), the 4 | // DS1307's SQW/OUT pin can be set to low, high, 1Hz, 4.096kHz, 8.192kHz, or 32.768kHz. 5 | // 6 | // This sketch reads the state of the pin, then iterates through the possible values at 7 | // 5 second intervals. 8 | // 9 | 10 | // NOTE: 11 | // You must connect a pull up resistor (~10kohm) from the SQW pin up to VCC. Without 12 | // this pull up the wave output will not work! 13 | 14 | #include "RTClib.h" 15 | 16 | RTC_DS1307 rtc; 17 | 18 | int mode_index = 0; 19 | 20 | Ds1307SqwPinMode modes[] = { DS1307_OFF, DS1307_ON, DS1307_SquareWave1HZ, DS1307_SquareWave4kHz, DS1307_SquareWave8kHz, DS1307_SquareWave32kHz}; 21 | 22 | 23 | void print_mode() { 24 | Ds1307SqwPinMode mode = rtc.readSqwPinMode(); 25 | 26 | Serial.print("Sqw Pin Mode: "); 27 | switch(mode) { 28 | case DS1307_OFF: Serial.println("OFF"); break; 29 | case DS1307_ON: Serial.println("ON"); break; 30 | case DS1307_SquareWave1HZ: Serial.println("1Hz"); break; 31 | case DS1307_SquareWave4kHz: Serial.println("4.096kHz"); break; 32 | case DS1307_SquareWave8kHz: Serial.println("8.192kHz"); break; 33 | case DS1307_SquareWave32kHz: Serial.println("32.768kHz"); break; 34 | default: Serial.println("UNKNOWN"); break; 35 | } 36 | } 37 | 38 | void setup () { 39 | Serial.begin(57600); 40 | 41 | #ifndef ESP8266 42 | while (!Serial); // wait for serial port to connect. Needed for native USB 43 | #endif 44 | 45 | if (! rtc.begin()) { 46 | Serial.println("Couldn't find RTC"); 47 | Serial.flush(); 48 | abort(); 49 | } 50 | 51 | print_mode(); 52 | } 53 | 54 | void loop () { 55 | rtc.writeSqwPinMode(modes[mode_index++]); 56 | print_mode(); 57 | 58 | if (mode_index > 5) { 59 | mode_index = 0; 60 | } 61 | 62 | delay(5000); 63 | } 64 | -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/examples/ds1307nvram/ds1307nvram.ino: -------------------------------------------------------------------------------- 1 | // Example of using the non-volatile RAM storage on the DS1307. 2 | // You can write up to 56 bytes from address 0 to 55. 3 | // Data will be persisted as long as the DS1307 has battery power. 4 | 5 | #include "RTClib.h" 6 | 7 | RTC_DS1307 rtc; 8 | 9 | void printnvram(uint8_t address) { 10 | Serial.print("Address 0x"); 11 | Serial.print(address, HEX); 12 | Serial.print(" = 0x"); 13 | Serial.println(rtc.readnvram(address), HEX); 14 | } 15 | 16 | void setup () { 17 | Serial.begin(57600); 18 | 19 | #ifndef ESP8266 20 | while (!Serial); // wait for serial port to connect. Needed for native USB 21 | #endif 22 | 23 | if (! rtc.begin()) { 24 | Serial.println("Couldn't find RTC"); 25 | Serial.flush(); 26 | abort(); 27 | } 28 | 29 | // Print old RAM contents on startup. 30 | Serial.println("Current NVRAM values:"); 31 | for (int i = 0; i < 6; ++i) { 32 | printnvram(i); 33 | } 34 | 35 | // Write some bytes to non-volatile RAM storage. 36 | // NOTE: You can only read and write from addresses 0 to 55 (i.e. 56 byte values). 37 | Serial.println("Writing NVRAM values."); 38 | // Example writing one byte at a time: 39 | rtc.writenvram(0, 0xFE); 40 | rtc.writenvram(1, 0xED); 41 | // Example writing multiple bytes: 42 | uint8_t writeData[4] = { 0xBE, 0xEF, 0x01, 0x02 }; 43 | rtc.writenvram(2, writeData, 4); 44 | 45 | // Read bytes from non-volatile RAM storage. 46 | Serial.println("Reading NVRAM values:"); 47 | // Example reading one byte at a time. 48 | Serial.println(rtc.readnvram(0), HEX); 49 | Serial.println(rtc.readnvram(1), HEX); 50 | // Example reading multiple bytes: 51 | uint8_t readData[4] = {0}; 52 | rtc.readnvram(readData, 4, 2); 53 | Serial.println(readData[0], HEX); 54 | Serial.println(readData[1], HEX); 55 | Serial.println(readData[2], HEX); 56 | Serial.println(readData[3], HEX); 57 | 58 | } 59 | 60 | void loop () { 61 | // Do nothing in the loop. 62 | } 63 | -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/examples/interrupts1Hz/.leonardo.test.only: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/RTClib/examples/interrupts1Hz/.leonardo.test.only -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/examples/interrupts1Hz/.mega2560.test.only: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/RTClib/examples/interrupts1Hz/.mega2560.test.only -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/examples/interrupts1Hz/.uno.test.only: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/RTClib/examples/interrupts1Hz/.uno.test.only -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/examples/softrtc/softrtc.ino: -------------------------------------------------------------------------------- 1 | // Date and time functions using just software, based on millis() & timer 2 | 3 | #include "RTClib.h" 4 | 5 | RTC_Millis rtc; 6 | 7 | void setup () { 8 | Serial.begin(57600); 9 | 10 | #ifndef ESP8266 11 | while (!Serial); // wait for serial port to connect. Needed for native USB 12 | #endif 13 | 14 | // following line sets the RTC to the date & time this sketch was compiled 15 | rtc.begin(DateTime(F(__DATE__), F(__TIME__))); 16 | // This line sets the RTC with an explicit date & time, for example to set 17 | // January 21, 2014 at 3am you would call: 18 | // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); 19 | } 20 | 21 | void loop () { 22 | DateTime now = rtc.now(); 23 | 24 | Serial.print(now.year(), DEC); 25 | Serial.print('/'); 26 | Serial.print(now.month(), DEC); 27 | Serial.print('/'); 28 | Serial.print(now.day(), DEC); 29 | Serial.print(' '); 30 | Serial.print(now.hour(), DEC); 31 | Serial.print(':'); 32 | Serial.print(now.minute(), DEC); 33 | Serial.print(':'); 34 | Serial.print(now.second(), DEC); 35 | Serial.println(); 36 | 37 | Serial.print(" seconds since 1970: "); 38 | Serial.println(now.unixtime()); 39 | 40 | // calculate a date which is 7 days and 30 seconds into the future 41 | DateTime future (now.unixtime() + 7 * 86400L + 30); 42 | 43 | Serial.print(" now + 7d + 30s: "); 44 | Serial.print(future.year(), DEC); 45 | Serial.print('/'); 46 | Serial.print(future.month(), DEC); 47 | Serial.print('/'); 48 | Serial.print(future.day(), DEC); 49 | Serial.print(' '); 50 | Serial.print(future.hour(), DEC); 51 | Serial.print(':'); 52 | Serial.print(future.minute(), DEC); 53 | Serial.print(':'); 54 | Serial.print(future.second(), DEC); 55 | Serial.println(); 56 | 57 | Serial.println(); 58 | delay(3000); 59 | } 60 | -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/examples/timestamp/timestamp.ino: -------------------------------------------------------------------------------- 1 | /* Timestamp functions using a DS1307 RTC connected via I2C and Wire lib 2 | ** 3 | ** Useful for file name 4 | ** ` SD.open(time.timestamp()+".log", FILE_WRITE) ` 5 | ** 6 | ** 7 | ** Created: 2015-06-01 by AxelTB 8 | ** Last Edit: 9 | */ 10 | 11 | #include "RTClib.h" 12 | 13 | RTC_DS1307 rtc; 14 | 15 | void setup () { 16 | Serial.begin(57600); 17 | 18 | #ifndef ESP8266 19 | while (!Serial); // wait for serial port to connect. Needed for native USB 20 | #endif 21 | 22 | if (! rtc.begin()) { 23 | Serial.println("Couldn't find RTC"); 24 | Serial.flush(); 25 | abort(); 26 | } 27 | 28 | if (! rtc.isrunning()) { 29 | Serial.println("RTC is NOT running, let's set the time!"); 30 | // When time needs to be set on a new device, or after a power loss, the 31 | // following line sets the RTC to the date & time this sketch was compiled 32 | rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); 33 | // This line sets the RTC with an explicit date & time, for example to set 34 | // January 21, 2014 at 3am you would call: 35 | // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); 36 | } 37 | 38 | // When time needs to be re-set on a previously configured device, the 39 | // following line sets the RTC to the date & time this sketch was compiled 40 | // rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); 41 | // This line sets the RTC with an explicit date & time, for example to set 42 | // January 21, 2014 at 3am you would call: 43 | // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); 44 | } 45 | 46 | void loop() { 47 | DateTime time = rtc.now(); 48 | 49 | //Full Timestamp 50 | Serial.println(String("DateTime::TIMESTAMP_FULL:\t")+time.timestamp(DateTime::TIMESTAMP_FULL)); 51 | 52 | //Date Only 53 | Serial.println(String("DateTime::TIMESTAMP_DATE:\t")+time.timestamp(DateTime::TIMESTAMP_DATE)); 54 | 55 | //Full Timestamp 56 | Serial.println(String("DateTime::TIMESTAMP_TIME:\t")+time.timestamp(DateTime::TIMESTAMP_TIME)); 57 | 58 | Serial.println("\n"); 59 | 60 | //Delay 5s 61 | delay(5000); 62 | } 63 | -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/examples/toString/toString.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | RTC_DS1307 rtc; 5 | 6 | 7 | void setup () { 8 | Serial.begin(57600); 9 | 10 | #ifndef ESP8266 11 | while (!Serial); // wait for serial port to connect. Needed for native USB 12 | #endif 13 | 14 | if (! rtc.begin()) { 15 | Serial.println("Couldn't find RTC"); 16 | Serial.flush(); 17 | abort(); 18 | } 19 | 20 | if (! rtc.isrunning()) { 21 | Serial.println("RTC is NOT running, let's set the time!"); 22 | // When time needs to be set on a new device, or after a power loss, the 23 | // following line sets the RTC to the date & time this sketch was compiled 24 | rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); 25 | // This line sets the RTC with an explicit date & time, for example to set 26 | // January 21, 2014 at 3am you would call: 27 | // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); 28 | } 29 | 30 | // When time needs to be re-set on a previously configured device, the 31 | // following line sets the RTC to the date & time this sketch was compiled 32 | // rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); 33 | // This line sets the RTC with an explicit date & time, for example to set 34 | // January 21, 2014 at 3am you would call: 35 | // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); 36 | } 37 | 38 | void loop() { 39 | 40 | DateTime now = rtc.now(); 41 | 42 | //buffer can be defined using following combinations: 43 | //hh - the hour with a leading zero (00 to 23) 44 | //mm - the minute with a leading zero (00 to 59) 45 | //ss - the whole second with a leading zero where applicable (00 to 59) 46 | //YYYY - the year as four digit number 47 | //YY - the year as two digit number (00-99) 48 | //MM - the month as number with a leading zero (01-12) 49 | //MMM - the abbreviated English month name ('Jan' to 'Dec') 50 | //DD - the day as number with a leading zero (01 to 31) 51 | //DDD - the abbreviated English day name ('Mon' to 'Sun') 52 | 53 | char buf1[] = "hh:mm"; 54 | Serial.println(now.toString(buf1)); 55 | 56 | char buf2[] = "YYMMDD-hh:mm:ss"; 57 | Serial.println(now.toString(buf2)); 58 | 59 | char buf3[] = "Today is DDD, MMM DD YYYY"; 60 | Serial.println(now.toString(buf3)); 61 | 62 | char buf4[] = "MM-DD-YYYY"; 63 | Serial.println(now.toString(buf4)); 64 | 65 | delay(1000); 66 | } 67 | -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For RTClib 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | DateTime KEYWORD1 10 | TimeSpan KEYWORD1 11 | RTC_DS1307 KEYWORD1 12 | RTC_DS3231 KEYWORD1 13 | RTC_PCF8523 KEYWORD1 14 | RTC_PCF8563 KEYWORD1 15 | RTC_Millis KEYWORD1 16 | RTC_Micros KEYWORD1 17 | Ds1307SqwPinMode KEYWORD1 18 | Ds3231SqwPinMode KEYWORD1 19 | Ds3231Alarm1Mode KEYWORD1 20 | Ds3231Alarm2Mode KEYWORD1 21 | Pcf8523SqwPinMode KEYWORD1 22 | PCF8523TimerClockFreq KEYWORD1 23 | PCF8523TimerIntPulse KEYWORD1 24 | Pcf8523OffsetMode KEYWORD1 25 | Pcf8563SqwPinMode KEYWORD1 26 | 27 | ####################################### 28 | # Methods and Functions (KEYWORD2) 29 | ####################################### 30 | 31 | isValid KEYWORD2 32 | year KEYWORD2 33 | month KEYWORD2 34 | day KEYWORD2 35 | hour KEYWORD2 36 | twelveHour KEYWORD2 37 | isPM KEYWORD2 38 | minute KEYWORD2 39 | second KEYWORD2 40 | dayOfTheWeek KEYWORD2 41 | secondstime KEYWORD2 42 | unixtime KEYWORD2 43 | days KEYWORD2 44 | hours KEYWORD2 45 | minutes KEYWORD2 46 | seconds KEYWORD2 47 | totalseconds KEYWORD2 48 | begin KEYWORD2 49 | adjust KEYWORD2 50 | adjustDrift KEYWORD2 51 | isrunning KEYWORD2 52 | now KEYWORD2 53 | readSqwPinMode KEYWORD2 54 | writeSqwPinMode KEYWORD2 55 | timestamp KEYWORD2 56 | toString KEYWORD2 57 | readnvram KEYWORD2 58 | writenvram KEYWORD2 59 | setAlarm1 KEYWORD2 60 | setAlarm2 KEYWORD2 61 | disableAlarm KEYWORD2 62 | clearAlarm KEYWORD2 63 | alarmFired KEYWORD2 64 | getTemperature KEYWORD2 65 | lostPower KEYWORD2 66 | initialized KEYWORD2 67 | enableSecondTimer KEYWORD2 68 | disableSecondTimer KEYWORD2 69 | enableCountdownTimer KEYWORD2 70 | disableCountdownTimer KEYWORD2 71 | deconfigureAllTimers KEYWORD2 72 | calibrate KEYWORD2 73 | enable32K KEYWORD2 74 | disable32K KEYWORD2 75 | isEnabled32K KEYWORD2 76 | 77 | ####################################### 78 | # Constants (LITERAL1) 79 | ####################################### 80 | TIMESTAMP_FULL LITERAL1 81 | TIMESTAMP_DATE LITERAL1 82 | TIMESTAMP_TIME LITERAL1 83 | 84 | -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/library.properties: -------------------------------------------------------------------------------- 1 | name=RTClib 2 | version=1.12.4 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=A fork of Jeelab's fantastic RTC library 6 | paragraph=A fork of Jeelab's fantastic RTC library 7 | category=Timing 8 | url=https://github.com/adafruit/RTClib 9 | architectures=* 10 | depends=TinyWireM 11 | -------------------------------------------------------------------------------- /classic-lite/lib/RTClib/license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Adafruit Industries 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | This library is the culmination of the expertise of many members of the open source community who have dedicated their time and hard work. The best way to ask for help or propose a new idea is to [create a new issue](https://github.com/winlinvip/SimpleDHT/issues/new) while creating a Pull Request with your code changes allows you to share your own innovations with the rest of the community. 4 | 5 | The following are some guidelines to observe when creating issues or PRs: 6 | 7 | - Be friendly; it is important that we can all enjoy a safe space as we are all working on the same project and it is okay for people to have different ideas 8 | 9 | - [Use code blocks](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code); it helps us help you when we can read your code! On that note also refrain from pasting more than 30 lines of code in a post, instead [create a gist](https://gist.github.com/) if you need to share large snippets 10 | 11 | - Use reasonable titles; refrain from using overly long or capitalized titles as they are usually annoying and do little to encourage others to help :smile: 12 | 13 | - Be detailed; refrain from mentioning code problems without sharing your source code and always give information regarding your board and version of the library. 14 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016-2017 winlin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/examples/DHT11Default/DHT11Default.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT11, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT11 = 2; 8 | SimpleDHT11 dht11(pinDHT11); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT11..."); 18 | 19 | // read without samples. 20 | byte temperature = 0; 21 | byte humidity = 0; 22 | int err = SimpleDHTErrSuccess; 23 | if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 24 | Serial.print("Read DHT11 failed, err="); Serial.print(SimpleDHTErrCode(err)); 25 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(1000); 26 | return; 27 | } 28 | 29 | Serial.print("Sample OK: "); 30 | Serial.print((int)temperature); Serial.print(" *C, "); 31 | Serial.print((int)humidity); Serial.println(" H"); 32 | 33 | // DHT11 sampling rate is 1HZ. 34 | delay(1500); 35 | } 36 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/examples/DHT11ErrCount/DHT11ErrCount.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT11, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT11 = 2; 8 | SimpleDHT11 dht11(pinDHT11); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT11 with error count"); 18 | 19 | int cnt = 0; 20 | int err_cnt = 0; 21 | for (;;) { 22 | cnt++; 23 | 24 | byte temperature = 0; 25 | byte humidity = 0; 26 | int err = SimpleDHTErrSuccess; 27 | if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 28 | Serial.print("Read DHT11 failed, err="); Serial.print(SimpleDHTErrCode(err)); 29 | Serial.print(","); Serial.print(SimpleDHTErrDuration(err)); 30 | err_cnt++; 31 | } else { 32 | Serial.print("DHT11, "); 33 | Serial.print((int)temperature); Serial.print(" *C, "); 34 | Serial.print((int)humidity); Serial.print(" H"); 35 | } 36 | Serial.print(", total: "); Serial.print(cnt); 37 | Serial.print(", err: "); Serial.print(err_cnt); 38 | Serial.print(", success rate: "); Serial.print((cnt - err_cnt) * 100.0 / (float)cnt); Serial.println("%"); 39 | 40 | delay(1500); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/examples/DHT11WithRawBits/DHT11WithRawBits.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT11, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT11 = 2; 8 | SimpleDHT11 dht11(pinDHT11); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT11 with RAW bits..."); 18 | 19 | // read with raw sample data. 20 | byte temperature = 0; 21 | byte humidity = 0; 22 | byte data[5] = {0}; 23 | int err = SimpleDHTErrSuccess; 24 | if ((err = dht11.read(&temperature, &humidity, data)) != SimpleDHTErrSuccess) { 25 | Serial.print("Read DHT11 failed, err="); Serial.print(SimpleDHTErrCode(err)); 26 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(1000); 27 | return; 28 | } 29 | 30 | Serial.print("Sample RAW Bits: "); 31 | for (int i = 0; i < 5; i++) { 32 | for(int n=0;n<8;n++) 33 | Serial.print(bitRead(data[i],n)); 34 | Serial.print(' '); 35 | } 36 | Serial.println(""); 37 | 38 | Serial.print("Sample OK: "); 39 | Serial.print((int)temperature); Serial.print(" *C, "); 40 | Serial.print((int)humidity); Serial.println(" H"); 41 | 42 | // DHT11 sampling rate is 1HZ. 43 | delay(1500); 44 | } 45 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/examples/DHT22Default/DHT22Default.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT22, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT22 = 2; 8 | SimpleDHT22 dht22(pinDHT22); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT22..."); 18 | 19 | // read without samples. 20 | // @remark We use read2 to get a float data, such as 10.1*C 21 | // if user doesn't care about the accurate data, use read to get a byte data, such as 10*C. 22 | float temperature = 0; 23 | float humidity = 0; 24 | int err = SimpleDHTErrSuccess; 25 | if ((err = dht22.read2(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 26 | Serial.print("Read DHT22 failed, err="); Serial.print(SimpleDHTErrCode(err)); 27 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(2000); 28 | return; 29 | } 30 | 31 | Serial.print("Sample OK: "); 32 | Serial.print((float)temperature); Serial.print(" *C, "); 33 | Serial.print((float)humidity); Serial.println(" RH%"); 34 | 35 | // DHT22 sampling rate is 0.5HZ. 36 | delay(2500); 37 | } 38 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/examples/DHT22ErrCount/DHT22ErrCount.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT22, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT22 = 2; 8 | SimpleDHT22 dht22(pinDHT22); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT22 with error count"); 18 | 19 | int cnt = 0; 20 | int err_cnt = 0; 21 | for (;;) { 22 | cnt++; 23 | 24 | float temperature = 0; 25 | float humidity = 0; 26 | int err = SimpleDHTErrSuccess; 27 | if ((err = dht22.read2(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 28 | Serial.print("Read DHT22 failed, err="); Serial.print(SimpleDHTErrCode(err)); 29 | Serial.print(","); Serial.print(SimpleDHTErrDuration(err)); 30 | err_cnt++; 31 | } else { 32 | Serial.print("DHT22, "); 33 | Serial.print((float)temperature); Serial.print(" *C, "); 34 | Serial.print((float)humidity); Serial.print(" RH%"); 35 | } 36 | Serial.print(", total: "); Serial.print(cnt); 37 | Serial.print(", err: "); Serial.print(err_cnt); 38 | Serial.print(", success rate: "); Serial.print((cnt - err_cnt) * 100.0 / (float)cnt); Serial.println("%"); 39 | 40 | delay(2500); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/examples/DHT22Integer/DHT22Integer.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT22, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT22 = 2; 8 | SimpleDHT22 dht22(pinDHT22); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT22..."); 18 | 19 | // read without samples. 20 | byte temperature = 0; 21 | byte humidity = 0; 22 | int err = SimpleDHTErrSuccess; 23 | if ((err = dht22.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 24 | Serial.print("Read DHT22 failed, err="); Serial.print(SimpleDHTErrCode(err)); 25 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(2000); 26 | return; 27 | } 28 | 29 | Serial.print("Sample OK: "); 30 | Serial.print((int)temperature); Serial.print(" *C, "); 31 | Serial.print((int)humidity); Serial.println(" RH%"); 32 | 33 | // DHT22 sampling rate is 0.5HZ. 34 | delay(2500); 35 | } 36 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/examples/DHT22WithRawBits/DHT22WithRawBits.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT22, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT22 = 2; 8 | SimpleDHT22 dht22(pinDHT22); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT22 with RAW bits..."); 18 | 19 | // read with raw sample data. 20 | // @remark We use read2 to get a float data, such as 10.1*C 21 | // if user doesn't care about the accurate data, use read to get a byte data, such as 10*C. 22 | float temperature = 0; 23 | float humidity = 0; 24 | byte data[5] = {0}; 25 | int err = SimpleDHTErrSuccess; 26 | if ((err = dht22.read2(&temperature, &humidity, data)) != SimpleDHTErrSuccess) { 27 | Serial.print("Read DHT22 failed, err="); Serial.print(SimpleDHTErrCode(err)); 28 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(2000); 29 | return; 30 | } 31 | 32 | Serial.print("Sample RAW Bits: "); 33 | for (int i = 0; i < 5; i++) { 34 | for (int n = 0; n < 8; n++) 35 | Serial.print(bitRead(data[i], n)); 36 | Serial.print(' '); 37 | } 38 | Serial.println(""); 39 | 40 | Serial.print("Sample OK: "); 41 | Serial.print((float)temperature); Serial.print(" *C, "); 42 | Serial.print((float)humidity); Serial.println(" RH%"); 43 | 44 | // DHT22 sampling rate is 0.5HZ. 45 | delay(2500); 46 | } 47 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/examples/TwoSensorsDefault/TwoSensorsDefault.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // Created by santosomar Ωr using SimpleDHT library to read data from two DHT11 sensors 4 | // for DHT11, 5 | // VCC: 5V or 3V 6 | // GND: GND 7 | // SENSOR 1 is in Digital Data pin: 2 8 | // SENSOR 2 is in Digital Data pin: 4 9 | 10 | int dataPinSensor1 = 2; 11 | int dataPinSensor2 = 4; 12 | SimpleDHT11 dht1(dataPinSensor1); 13 | SimpleDHT11 dht2(dataPinSensor2); 14 | 15 | void setup() { 16 | Serial.begin(115200); 17 | } 18 | 19 | void loop() { 20 | // Reading data from sensor 1... 21 | Serial.println("================================="); 22 | 23 | // Reading data from sensor 1... 24 | Serial.println("Getting data from sensor 1..."); 25 | 26 | // read without samples. 27 | byte temperature = 0; 28 | byte humidity = 0; 29 | int err = SimpleDHTErrSuccess; 30 | if ((err = dht1.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 31 | Serial.print("Read Sensor 1 failed, err="); Serial.print(SimpleDHTErrCode(err)); 32 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(1000); 33 | return; 34 | } 35 | 36 | // converting Celsius to Fahrenheit 37 | byte f = temperature * 1.8 + 32; 38 | Serial.print("Sample OK: "); 39 | Serial.print((int)temperature); Serial.print(" *C, "); 40 | Serial.print((int)f); Serial.print(" *F, "); 41 | Serial.print((int)humidity); Serial.println(" H humidity"); 42 | 43 | 44 | // Reading data from sensor 2... 45 | // ============================ 46 | Serial.println("Getting data from sensor 2..."); 47 | 48 | byte temperature2 = 0; 49 | byte humidity2 = 0; 50 | if ((err = dht2.read(&temperature2, &humidity2, NULL)) != SimpleDHTErrSuccess) { 51 | Serial.print("Read Sensor 2 failed, err="); Serial.print(SimpleDHTErrCode(err)); 52 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(1000); 53 | return; 54 | } 55 | 56 | // converting Celsius to Fahrenheit 57 | byte fb = temperature2 * 1.8 + 32; 58 | 59 | Serial.print("Sample OK: "); 60 | Serial.print((int)temperature2); Serial.print(" *C, "); 61 | Serial.print((int)fb); Serial.print(" *F, "); 62 | Serial.print((int)humidity2); Serial.println(" H humidity"); 63 | 64 | // DHT11 sampling rate is 1HZ. 65 | delay(1500); 66 | } 67 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/keywords.txt: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Syntax Coloring Map For SimpleDHT 3 | ########################################### 4 | 5 | ########################################### 6 | # Datatypes (KEYWORD1) 7 | ########################################### 8 | SimpleDHT11 KEYWORD1 9 | SimpleDHT22 KEYWORD1 10 | 11 | ########################################### 12 | # Methods and Functions (KEYWORD2) 13 | ########################################### 14 | read KEYWORD2 15 | 16 | ########################################### 17 | # Constants (LITERAL1) 18 | ########################################### 19 | -------------------------------------------------------------------------------- /classic-lite/lib/SimpleDHT/library.properties: -------------------------------------------------------------------------------- 1 | name=SimpleDHT 2 | version=1.0.14 3 | author=Winlin 4 | maintainer=Winlin 5 | sentence=Arduino Temp & Humidity Sensors for DHT11 and DHT22. 6 | paragraph=Simple C++ code with lots of comments, strictly follow the standard DHT protocol, supports 0.5HZ(DHT22) or 1HZ(DHT11) sampling rate. 7 | category=Sensors 8 | url=https://github.com/winlinvip/SimpleDHT 9 | architectures=* 10 | -------------------------------------------------------------------------------- /classic-lite/lib/U8g2/README.md: -------------------------------------------------------------------------------- 1 | # U8g2_Arduino: Arduino Monochrome Graphics Library 2 | 3 | ![https://raw.githubusercontent.com/wiki/olikraus/u8g2/img/uc1701_dogs102_uno_board_320.jpg](https://raw.githubusercontent.com/wiki/olikraus/u8g2/img/uc1701_dogs102_uno_board_320.jpg) 4 | 5 | U8glib V2 library for Arduino 6 | 7 | Description: https://github.com/olikraus/u8g2/wiki 8 | 9 | Issue Tracker: https://github.com/olikraus/u8g2/issues 10 | 11 | Download (2.28.10): https://github.com/olikraus/U8g2_Arduino/archive/master.zip 12 | 13 | -------------------------------------------------------------------------------- /classic-lite/lib/U8g2/library.properties: -------------------------------------------------------------------------------- 1 | name=U8g2 2 | version=2.28.10 3 | author=oliver 4 | maintainer=oliver 5 | sentence=Monochrome LCD, OLED and eInk Library. Display controller: SSD1305, SSD1306, SSD1309, SSD1316, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, SH1108, SH1122, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1617, UC1701, ST7511, ST7528, ST7565, ST7567, ST7571, ST7586, ST7588, ST75256, ST75320, NT7534, ST7920, IST3020, IST7920, LD7032, KS0108, KS0713, SED1520, SBN1661, IL3820, MAX7219. Interfaces: I2C, SPI, Parallel. 6 | paragraph=Monochrome LCD, OLED and eInk Library. Successor of U8glib. Supported display controller: SSD1305, SSD1306, SSD1309, SSD1316, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, SH1108, SH1122, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1617, UC1701, ST7511, ST7528, ST7565, ST7567, ST7571, ST7586, ST7588, ST75256, ST75320, NT7534, ST7920, IST3020, IST7920, LD7032, KS0108, KS0713, SED1520, SBN1661, IL3820, MAX7219. Supported interfaces: I2C, SPI, Parallel. Features: UTF8, >700 fonts, U8x8 char output. 7 | category=Display 8 | url=https://github.com/olikraus/u8g2 9 | architectures=* 10 | license=BSD-2-Clause 11 | -------------------------------------------------------------------------------- /classic-lite/lib/U8g2/src/U8g2lib.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | U8g2lib.cpp 4 | 5 | Arduino specific functions 6 | 7 | 8 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 9 | 10 | Copyright (c) 2016, olikraus@gmail.com 11 | All rights reserved. 12 | 13 | Redistribution and use in source and binary forms, with or without modification, 14 | are permitted provided that the following conditions are met: 15 | 16 | * Redistributions of source code must retain the above copyright notice, this list 17 | of conditions and the following disclaimer. 18 | 19 | * Redistributions in binary form must reproduce the above copyright notice, this 20 | list of conditions and the following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 24 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 25 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 26 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 28 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 30 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 31 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 32 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 33 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 35 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | 37 | */ 38 | 39 | 40 | #include "U8g2lib.h" 41 | 42 | static Print *u8g2_print_for_screenshot; 43 | 44 | 45 | void u8g2_print_callback(const char *s) 46 | { 47 | yield(); 48 | u8g2_print_for_screenshot->print(s); 49 | } 50 | 51 | void U8G2::writeBufferPBM(Print &p) 52 | { 53 | u8g2_print_for_screenshot = &p; 54 | u8g2_WriteBufferPBM(getU8g2(), u8g2_print_callback); 55 | } 56 | 57 | void U8G2::writeBufferXBM(Print &p) 58 | { 59 | u8g2_print_for_screenshot = &p; 60 | u8g2_WriteBufferXBM(getU8g2(), u8g2_print_callback); 61 | } 62 | 63 | void U8G2::writeBufferPBM2(Print &p) 64 | { 65 | u8g2_print_for_screenshot = &p; 66 | u8g2_WriteBufferPBM2(getU8g2(), u8g2_print_callback); 67 | } 68 | 69 | void U8G2::writeBufferXBM2(Print &p) 70 | { 71 | u8g2_print_for_screenshot = &p; 72 | u8g2_WriteBufferXBM2(getU8g2(), u8g2_print_callback); 73 | } 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /classic-lite/lib/U8g2/src/clib/u8g2_cleardisplay.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g2_cleardisplay.c 4 | 5 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 6 | 7 | Copyright (c) 2016, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | */ 35 | #include "u8g2.h" 36 | 37 | /* Clear screen buffer & display reliable for all u8g2 displays. */ 38 | /* This is done with u8g2 picture loop, because we can not use the u8x8 function in all cases */ 39 | void u8g2_ClearDisplay(u8g2_t *u8g2) 40 | { 41 | u8g2_FirstPage(u8g2); 42 | do { 43 | } while ( u8g2_NextPage(u8g2) ); 44 | /* 45 | This function is usually called during startup (u8g2.begin()). 46 | However the user might want to use full buffer mode with clear and 47 | send commands. 48 | This will not work because the current tile row is modified by the picture 49 | loop above. To fix this, reset the tile row to 0, issue #370 50 | A workaround would be, that the user sets the current tile row to 0 manually. 51 | */ 52 | u8g2_SetBufferCurrTileRow(u8g2, 0); 53 | } 54 | 55 | -------------------------------------------------------------------------------- /classic-lite/lib/U8g2/src/clib/u8g2_fonts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/U8g2/src/clib/u8g2_fonts.c -------------------------------------------------------------------------------- /classic-lite/lib/U8g2/src/clib/u8x8_fonts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/U8g2/src/clib/u8x8_fonts.c -------------------------------------------------------------------------------- /classic-lite/lib/U8g2/src/clib/u8x8_gpio.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8x8_gpio.c 4 | 5 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 6 | 7 | Copyright (c) 2016, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | */ 35 | 36 | 37 | #include "u8x8.h" 38 | 39 | 40 | void u8x8_gpio_call(u8x8_t *u8x8, uint8_t msg, uint8_t arg) 41 | { 42 | u8x8->gpio_and_delay_cb(u8x8, msg, arg, NULL); 43 | } 44 | 45 | /* 46 | void u8x8_gpio_Delay(u8x8_t *u8x8, uint8_t msg, uint8_t dly) 47 | { 48 | u8x8->gpio_and_delay_cb(u8x8, msg, dly, NULL); 49 | } 50 | */ -------------------------------------------------------------------------------- /classic-lite/lib/U8g2/src/clib/u8x8_u16toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8x8_u16toa.c 4 | 5 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 6 | 7 | Copyright (c) 2016, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | 35 | */ 36 | 37 | 38 | #include "u8x8.h" 39 | 40 | const char *u8x8_u16toap(char * dest, uint16_t v) 41 | { 42 | uint8_t pos; 43 | uint8_t d; 44 | uint16_t c; 45 | c = 10000; 46 | for( pos = 0; pos < 5; pos++ ) 47 | { 48 | d = '0'; 49 | while( v >= c ) 50 | { 51 | v -= c; 52 | d++; 53 | } 54 | dest[pos] = d; 55 | c /= 10; 56 | } 57 | dest[5] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8x8_u16toa(uint16_t v, uint8_t d) 63 | { 64 | static char buf[6]; 65 | d = 5-d; 66 | return u8x8_u16toap(buf, v) + d; 67 | } 68 | 69 | const char *u8x8_utoa(uint16_t v) 70 | { 71 | const char *s = u8x8_u16toa(v, 5); 72 | while( *s == '0' ) 73 | s++; 74 | if ( *s == '\0' ) 75 | s--; 76 | return s; 77 | } -------------------------------------------------------------------------------- /classic-lite/lib/U8g2/src/clib/u8x8_u8toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8x8_u8toa.c 4 | 5 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 6 | 7 | Copyright (c) 2016, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | */ 35 | 36 | 37 | #include "u8x8.h" 38 | 39 | static const unsigned char u8x8_u8toa_tab[3] = { 100, 10, 1 } ; 40 | const char *u8x8_u8toap(char * dest, uint8_t v) 41 | { 42 | uint8_t pos; 43 | uint8_t d; 44 | uint8_t c; 45 | for( pos = 0; pos < 3; pos++ ) 46 | { 47 | d = '0'; 48 | c = *(u8x8_u8toa_tab+pos); 49 | while( v >= c ) 50 | { 51 | v -= c; 52 | d++; 53 | } 54 | dest[pos] = d; 55 | } 56 | dest[3] = '\0'; 57 | return dest; 58 | } 59 | 60 | /* v = value, d = number of digits */ 61 | const char *u8x8_u8toa(uint8_t v, uint8_t d) 62 | { 63 | static char buf[4]; 64 | d = 3-d; 65 | return u8x8_u8toap(buf, v) + d; 66 | } 67 | 68 | -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/README.md: -------------------------------------------------------------------------------- 1 | 2 | # U8glib 3 | 4 | A graphics library with support for many different monochrome displays. 5 | 6 | ![nhd_oled180.jpg](https://github.com/olikraus/u8glib/wiki/otherpic/nhd_oled180.jpg) ![dogs102_180.jpg](https://github.com/olikraus/u8glib/wiki/otherpic/dogs102_180.jpg) 7 | 8 | Left: NHD-2.7-12864 OLED (SSD1325), right: EA DOGS102 LCD (UC1701) 9 | 10 | * [Gallery](https://github.com/olikraus/u8glib/wiki/gallery) 11 | * [Bintray](https://bintray.com/olikraus/u8glib) download links: 12 | * [U8glib for Arduino](https://bintray.com/olikraus/u8glib/Arduino) 13 | * [U8glib for AVR](https://bintray.com/olikraus/u8glib/AVR) 14 | * [U8glib for ARM](https://bintray.com/olikraus/u8glib/ARM) 15 | * Converter for BDF fonts: [bdf2u8g_101.exe on google drive](https://drive.google.com/folderview?id=0B5b6Dv0wCeCRLWJkYTh2TUlYVDg&usp=sharing). 16 | * Supported environments: 17 | * [Arduino (ATMEGA and ARM)](http://www.arduino.cc/) 18 | * [AVR (ATMEGA)](https://github.com/olikraus/u8glib/wiki/avr) 19 | * [ARM (with example for LPC1114)](https://github.com/olikraus/u8glib/wiki/lpc1114) 20 | * Library for graphic LCDs and OLEDs 21 | * [U8glib documentation and tutorials](https://github.com/olikraus/u8glib/wiki) 22 | * Graphical user interface library (GUI) available: [M2tklib](http://code.google.com/p/m2tklib/) 23 | * COM interfaces: Software SPI, Hardware SPI, 8Bit parallel 24 | * Large number of [fonts](https://github.com/olikraus/u8glib/wiki/fontsize) 25 | * Monospaced and proportional fonts 26 | * Mouse-Cursor support 27 | * Landscape and portrait mode 28 | * Many supported [devices](https://github.com/olikraus/u8glib/wiki/device) (SSD1325, ST7565, ST7920, UC1608, UC1610, UC1701, PCD8544, PCF8812, KS0108, LC7981, SBN1661, SSD1306, SH1106, T6963, LD7032) 29 | * Well-defined interface to the device subsystem 30 | 31 | -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/extras/INSTALL.TXT: -------------------------------------------------------------------------------- 1 | 2 | U8GLIB 3 | http://code.google.com/p/u8glib/ 4 | 5 | Install instructions for the Arduino environment. 6 | 7 | 1. Start Arduino IDE 8 | 2. In the Arduino IDE, import the library from the "Add Library" Menu. 9 | 10 | Alternative install instructions for the Arduino environment. 11 | 12 | 1. Unzip u8glib_arduino_vX.XX.zip into the "libraries" folder of the 13 | Arduino install directory 14 | 2. Start Arduino IDE 15 | 16 | Install instructions for the Chipkit (Arduino) environment. 17 | 18 | 1. cd /libraries 19 | 2. unzip u8glib_arduino_vX.XX.zip 20 | 3. cd ///hardware/pic32/libraries 21 | 4. again: u8glib_arduino_vX.XX.zip 22 | 5. Open hardware/pic32/cores/pic32/Print.h 23 | Remove line 24 | #define BYTE 0 25 | from the file, use PRINT_BYTE instead of BYTE. 26 | -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/library.properties: -------------------------------------------------------------------------------- 1 | name=U8glib 2 | version=1.19.1 3 | author=oliver 4 | maintainer=oliver 5 | sentence=A library for monochrome TFTs and OLEDs 6 | paragraph=Supported display controller: SSD1306, SSD1309, SSD1322, SSD1325, SSD1327, SH1106, UC1601, UC1610, UC1611, UC1701, ST7565, ST7920, KS0108, LC7981, PCD8544, PCF8812, SBN1661, TLS8204, T6963. 7 | category=Display 8 | url=https://github.com/olikraus/u8glib 9 | architectures=avr,sam -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/src/clib/chessengine.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/U8glib/src/clib/chessengine.c -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/src/clib/u8g_com_arduino_common.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_com_arduino_common.c 4 | 5 | shared procedures for the arduino communication procedures 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | #if defined(ARDUINO) 42 | 43 | #if ARDUINO < 100 44 | #include 45 | #else 46 | #include 47 | #endif 48 | 49 | void u8g_com_arduino_digital_write(u8g_t *u8g, uint8_t pin_index, uint8_t value) 50 | { 51 | uint8_t pin; 52 | pin = u8g->pin_list[pin_index]; 53 | if ( pin != U8G_PIN_NONE ) 54 | digitalWrite(pin, value); 55 | } 56 | 57 | /* this procedure does not set the RW pin */ 58 | void u8g_com_arduino_assign_pin_output_high(u8g_t *u8g) 59 | { 60 | uint8_t i; 61 | /* skip the RW pin, which is the last pin in the list */ 62 | for( i = 0; i < U8G_PIN_LIST_LEN-1; i++ ) 63 | { 64 | if ( u8g->pin_list[i] != U8G_PIN_NONE ) 65 | { 66 | pinMode(u8g->pin_list[i], OUTPUT); 67 | digitalWrite(u8g->pin_list[i], HIGH); 68 | } 69 | } 70 | } 71 | 72 | 73 | #endif 74 | 75 | 76 | -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/src/clib/u8g_com_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_com_null.c 4 | 5 | communication null device 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | uint8_t u8g_com_null_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) 42 | { 43 | switch(msg) 44 | { 45 | case U8G_COM_MSG_INIT: 46 | break; 47 | case U8G_COM_MSG_STOP: 48 | break; 49 | 50 | 51 | case U8G_COM_MSG_CHIP_SELECT: 52 | /* arg_val contains the chip number, which should be enabled */ 53 | break; 54 | 55 | 56 | case U8G_COM_MSG_WRITE_BYTE: 57 | break; 58 | case U8G_COM_MSG_WRITE_SEQ: 59 | break; 60 | } 61 | return 1; 62 | } 63 | 64 | -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/src/clib/u8g_dev_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_dev_null.c 4 | 5 | Universal 8bit Graphics Library 6 | 7 | Copyright (c) 2011, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | 35 | */ 36 | 37 | #include "u8g.h" 38 | 39 | uint8_t u8g_dev_null(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) 40 | { 41 | switch(msg) 42 | { 43 | case U8G_DEV_MSG_SET_8PIXEL: /* most often used command */ 44 | break; 45 | case U8G_DEV_MSG_SET_PIXEL: 46 | break; 47 | case U8G_DEV_MSG_INIT: 48 | break; 49 | case U8G_DEV_MSG_STOP: 50 | break; 51 | case U8G_DEV_MSG_PAGE_FIRST: 52 | break; 53 | case U8G_DEV_MSG_PAGE_NEXT: 54 | break; 55 | #ifdef U8G_DEV_MSG_IS_BBX_INTERSECTION 56 | case U8G_DEV_MSG_IS_BBX_INTERSECTION: 57 | return 1; 58 | #endif 59 | case U8G_DEV_MSG_GET_PAGE_BOX: 60 | break; 61 | case U8G_DEV_MSG_SET_COLOR_ENTRY: 62 | break; 63 | case U8G_DEV_MSG_SET_XY_CB: 64 | break; 65 | } 66 | return 1; 67 | } 68 | -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/src/clib/u8g_font_data.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/classic-lite/lib/U8glib/src/clib/u8g_font_data.c -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/src/clib/u8g_page.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_page.c 4 | 5 | page helper functions, only called by the dev handler. 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | /* 42 | setup page count structure 43 | conditions: page_height <= total_height 44 | */ 45 | void u8g_page_Init(u8g_page_t *p, u8g_uint_t page_height, u8g_uint_t total_height ) 46 | { 47 | p->page_height = page_height; 48 | p->total_height = total_height; 49 | p->page = 0; 50 | u8g_page_First(p); 51 | } 52 | 53 | void u8g_page_First(u8g_page_t *p) 54 | { 55 | p->page_y0 = 0; 56 | p->page_y1 = p->page_height; 57 | p->page_y1--; 58 | p->page = 0; 59 | } 60 | 61 | uint8_t u8g_page_Next(u8g_page_t * p) 62 | { 63 | register u8g_uint_t y1; 64 | p->page_y0 += p->page_height; 65 | if ( p->page_y0 >= p->total_height ) 66 | return 0; 67 | p->page++; 68 | y1 = p->page_y1; 69 | y1 += p->page_height; 70 | if ( y1 >= p->total_height ) 71 | { 72 | y1 = p->total_height; 73 | y1--; 74 | } 75 | p->page_y1 = y1; 76 | 77 | return 1; 78 | } 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/src/clib/u8g_u16toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_u16toa.c 4 | 5 | 6 | Universal 8bit Graphics Library 7 | 8 | Copyright (c) 2012, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | 38 | #include "u8g.h" 39 | 40 | const char *u8g_u16toap(char * dest, uint16_t v) 41 | { 42 | uint8_t pos; 43 | uint8_t d; 44 | uint16_t c; 45 | c = 10000; 46 | for( pos = 0; pos < 5; pos++ ) 47 | { 48 | d = '0'; 49 | while( v >= c ) 50 | { 51 | v -= c; 52 | d++; 53 | } 54 | dest[pos] = d; 55 | c /= 10; 56 | } 57 | dest[5] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8g_u16toa(uint16_t v, uint8_t d) 63 | { 64 | static char buf[6]; 65 | d = 5-d; 66 | return u8g_u16toap(buf, v) + d; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /classic-lite/lib/U8glib/src/clib/u8g_u8toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_u8toa.c 4 | 5 | 6 | Universal 8bit Graphics Library 7 | 8 | Copyright (c) 2011, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | 38 | #include "u8g.h" 39 | 40 | static const unsigned char u8g_u8toa_tab[3] = { 100, 10, 1 } ; 41 | const char *u8g_u8toap(char * dest, uint8_t v) 42 | { 43 | uint8_t pos; 44 | uint8_t d; 45 | uint8_t c; 46 | for( pos = 0; pos < 3; pos++ ) 47 | { 48 | d = '0'; 49 | c = *(u8g_u8toa_tab+pos); 50 | while( v >= c ) 51 | { 52 | v -= c; 53 | d++; 54 | } 55 | dest[pos] = d; 56 | } 57 | dest[3] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8g_u8toa(uint8_t v, uint8_t d) 63 | { 64 | static char buf[4]; 65 | d = 3-d; 66 | return u8g_u8toap(buf, v) + d; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /classic-lite/platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; http://docs.platformio.org/page/projectconf.html 10 | 11 | [env:d1_mini] 12 | platform = espressif8266 13 | board = d1_mini 14 | framework = arduino 15 | upload_speed = 921600 16 | monitor_speed = 115200 17 | board_build.f_cpu = 160000000L -------------------------------------------------------------------------------- /classic-lite/src/settings.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2021 by NXEZ.com 3 | See more at https://www.nxez.com 4 | */ 5 | 6 | //#define spiOLED 7 | #define i2cOLED 8 | 9 | #ifdef spiOLED 10 | #include "SSD1306Spi.h" 11 | #endif 12 | #ifdef i2cOLED 13 | #include "SSD1306Wire.h" 14 | #include "SH1106.h" 15 | #endif 16 | #include "OLEDDisplayUi.h" 17 | 18 | // Setup 19 | const int UPDATE_INTERVAL_SECS = 3 * 60; 20 | const int UPDATE_INTERVAL_SECS_DHT = 10; 21 | int UTC_OFFSET = 8; 22 | 23 | #ifdef spiOLED 24 | // Pin definitions for SPI OLED 25 | #define OLED_CS D8 // Chip select 26 | #define OLED_DC D2 // Data/Command 27 | #define OLED_RESET D0 // RESET - If you get an error on this line, either change Tools->Board to the board you are using or change "D0" to the appropriate pin number for your board. 28 | #endif 29 | 30 | #ifdef i2cOLED 31 | // Pin definitions for I2C OLED 32 | //const int I2C_DISPLAY_ADDRESS = 0x3C; 33 | const int I2C_DISPLAY_ADDRESS = 0x3C; 34 | const int SDA_PIN = D2; 35 | const int SDC_PIN = D1; 36 | #endif 37 | 38 | // ----------------------------------- 39 | // Example Locales (uncomment only 1) 40 | #define HoChiMinh 41 | //------------------------------------ 42 | 43 | #ifdef HoChiMinh 44 | //DST rules for Central European Time Zone 45 | //#define UTC_OFFSET +8 46 | // Uncomment for 24 Hour style clock 47 | #define STYLE_24HR 48 | 49 | #define NTP_SERVERS "pool.ntp.org" 50 | 51 | #endif 52 | 53 | #ifdef spiOLED 54 | SSD1306Spi display(OLED_RESET, OLED_DC, OLED_CS); // SPI OLED 55 | #endif 56 | #ifdef i2cOLED 57 | //SSD1306Wire display(I2C_DISPLAY_ADDRESS, SDA_PIN, SDC_PIN); // I2C OLED 58 | SH1106 display(I2C_DISPLAY_ADDRESS, SDA_PIN, SDC_PIN); // I2C OLED 59 | #endif 60 | 61 | OLEDDisplayUi ui(&display); 62 | 63 | 64 | // WIFI 65 | const char* WIFI_SSID = "WIFI_SSID"; 66 | const char* WIFI_PWD = "WIFI_PWD"; 67 | 68 | const boolean IS_METRIC = true; 69 | 70 | //DHT10/DHT22 71 | const String TEMPERATURE_SENSOR_TYPE = "DHT10"; 72 | /*************************** 73 | * End Settings 74 | **************************/ -------------------------------------------------------------------------------- /t1-lite/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | **/.DS_Store 3 | 4 | .metadata 5 | .project 6 | RemoteSystemsTempFiles 7 | 8 | .pio 9 | .pioenvs 10 | .piolibdeps 11 | .vscode 12 | .clang_complete 13 | .gcc-flags.json 14 | -------------------------------------------------------------------------------- /t1-lite/README.md: -------------------------------------------------------------------------------- 1 | # cube-clock-lite 2 | A network clock, display on NXEZ CUBE. 3 | 4 | Visit the homepage for more infomation: 5 | [https://make.quwj.com/project/231](https://make.quwj.com/project/231) -------------------------------------------------------------------------------- /t1-lite/cube-clock-lite.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": { 8 | "files.associations": { 9 | "sstream": "cpp" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /t1-lite/lib/DHT10_cokoino/DHT10.cpp: -------------------------------------------------------------------------------- 1 | // FILE: DHT10.cpp 2 | // AUTHOR: mo cokoino 3 | // PURPOSE: I2C library for DHT10 for Arduino. 4 | // VERSION: 0.0.1 5 | // HISTORY: See DHT10.cpp 6 | // URL: https://github.com/Cokoino/DHT10-lilbrary 7 | 8 | #include 9 | #include "DHT10.h" 10 | 11 | #define DHT10_ADDRESS ((uint8_t)0x38) 12 | 13 | //////////////////////////////////////////////////////////////////// 14 | void DHT10::begin(){ 15 | Wire.begin(); 16 | } 17 | ////////////////////////////////////////////////////////////////////. 18 | int8_t DHT10::read(){ 19 | //trigger measurement data 20 | delay(50); 21 | Wire.beginTransmission(DHT10_ADDRESS); 22 | Wire.write(0xac); 23 | Wire.write(0x33); 24 | Wire.write(0x00); 25 | int8_t status = Wire.endTransmission(); 26 | if(status !=DHT10_OK) return DHT10_CONNECT_ERROR; 27 | 28 | //check busy 29 | char ct = 0; 30 | uint8_t st; 31 | do{ 32 | Wire.requestFrom(DHT10_ADDRESS, 1); 33 | st = Wire.read(); 34 | delay(4); 35 | if(ct++>25) return DHT10_BUSY; 36 | }while((st & 0x80)==0x80); 37 | 38 | //check CAL 39 | if((st & 0x08)!=0x08){ 40 | Wire.beginTransmission(DHT10_ADDRESS); 41 | Wire.write(0xe1); //configrate DHT10 42 | Wire.write(0x08); 43 | Wire.write(0x00); 44 | Wire.endTransmission(); 45 | delay(50); 46 | Wire.beginTransmission(DHT10_ADDRESS); 47 | Wire.write(0xba); //soft reset DHT10 48 | Wire.endTransmission(); 49 | delay(200); 50 | return DHT10_CAL_ERROR; 51 | } 52 | 53 | //read humidity and temperature 54 | Wire.requestFrom(DHT10_ADDRESS, 6); 55 | st = Wire.read(); 56 | for (int i = 0; i < 5; i++){ 57 | data[i] = Wire.read(); 58 | } 59 | 60 | //processing data 61 | temperature_humidity(); 62 | return DHT10_OK; 63 | } 64 | //////////////////////////////////////////////////////////////////// 65 | void DHT10::temperature_humidity(void){ 66 | humidity = ((float)data[0])/256; 67 | humidity = humidity + ((float)data[1])/64/1024; 68 | humidity = humidity + ((float)data[2])/16/1024/1024; 69 | humidity = humidity*100; 70 | temperature = ((float)(data[2]%16))/16; 71 | temperature = temperature + ((float)data[3])/4096; 72 | temperature = temperature + ((float)data[4])/1024/1024; 73 | temperature = temperature*200 - 50; 74 | } 75 | // end of file 76 | -------------------------------------------------------------------------------- /t1-lite/lib/DHT10_cokoino/DHT10.h: -------------------------------------------------------------------------------- 1 | #ifndef DHT10_H 2 | #define DHT10_H 3 | // 4 | // FILE: DHT10.h 5 | // AUTHOR: mo cokoino 6 | // PURPOSE: DHT_I2C library for Arduino . 7 | // VERSION: 0.0.1 8 | // URL: https://github.com/Cokoino/DHT10-lilbrary 9 | 10 | #include "Wire.h" 11 | #include "Arduino.h" 12 | 13 | #define DHT10_VERSION "0.0.1" 14 | #define DHT10_OK 0 15 | #define DHT10_CONNECT_ERROR -1 16 | #define DHT10_BUSY -2 17 | #define DHT10_CAL_ERROR -3 18 | 19 | class DHT10 20 | { 21 | public: 22 | void begin(); 23 | int8_t read(); 24 | void temperature_humidity(); 25 | float humidity; 26 | float temperature; 27 | private: 28 | uint8_t data[5]; 29 | }; 30 | 31 | #endif 32 | // END OF FILE 33 | -------------------------------------------------------------------------------- /t1-lite/lib/DHT10_cokoino/examples/DHT10/DHT10.ino: -------------------------------------------------------------------------------- 1 | // AUTHOR: mo cokoino 2 | // VERSION: 0.0.1 3 | // PURPOSE: Demo for DHT10 I2C humidity & temperature sensor 4 | // URL: https://github.com/Cokoino/DHT10-lilbrary 5 | 6 | #include 7 | DHT10 DHT; 8 | void setup(){ 9 | DHT.begin(); 10 | Serial.begin(115200); 11 | Serial.print("DHT10 library version: "); 12 | Serial.println(DHT10_VERSION); 13 | delay(2000); 14 | Serial.println("Humidity(%), Temperature(C)"); 15 | } 16 | void loop(){ 17 | int status = DHT.read(); 18 | if(status == DHT10_OK){ 19 | Serial.print(DHT.humidity); 20 | Serial.print(",\t"); 21 | Serial.println(DHT.temperature); 22 | } 23 | delay(2000); //recommend delay 2 second 24 | } 25 | -------------------------------------------------------------------------------- /t1-lite/lib/DoubleResetDetect/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Jens-Christian Skibakk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /t1-lite/lib/DoubleResetDetect/README.md: -------------------------------------------------------------------------------- 1 | # Double Reset Detect 2 | 3 | #### Description 4 | Arduino library to check for double reset on ESP8266 5 | 6 | This library gives one a opportunity to support an alternative boot mode. E.g. configuring WiFi using WiFiManager 7 | 8 | #### Supported hardware 9 | - ESP8266 [Arduino for ESP8266](https://github.com/esp8266/Arduino/) 10 | 11 | #### Usage 12 | See [example](examples/Minimal/Minimal.ino) for how to use library 13 | -------------------------------------------------------------------------------- /t1-lite/lib/DoubleResetDetect/examples/Minimal/Minimal.ino: -------------------------------------------------------------------------------- 1 | /* Minimal.ino 2 | * 3 | * Copyright (C) 2018 Jens-Christian Skibakk 4 | * 5 | * This software may be modified and distributed under the terms 6 | * of the MIT license. See the LICENSE file for details. 7 | */ 8 | 9 | #include 10 | 11 | // maximum number of seconds between resets that 12 | // counts as a double reset 13 | #define DRD_TIMEOUT 2.0 14 | 15 | // address to the block in the RTC user memory 16 | // change it if it collides with another usage 17 | // of the address block 18 | #define DRD_ADDRESS 0x00 19 | 20 | DoubleResetDetect drd(DRD_TIMEOUT, DRD_ADDRESS); 21 | 22 | void setup() 23 | { 24 | Serial.begin(74880); 25 | 26 | Serial.println(); 27 | Serial.println("***************************************"); 28 | Serial.println("* Minimal double reset detect example *"); 29 | Serial.println("***************************************"); 30 | Serial.println(); 31 | 32 | if (drd.detect()) 33 | { 34 | Serial.println("** Double reset boot **"); 35 | } 36 | else 37 | { 38 | Serial.println("** Normal boot **"); 39 | } 40 | } 41 | 42 | void loop() 43 | { 44 | // do stuff here 45 | } -------------------------------------------------------------------------------- /t1-lite/lib/DoubleResetDetect/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For DoubleResetDetect 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | DoubleResetDetect KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | detect KEYWORD2 16 | 17 | ####################################### 18 | # Instances (KEYWORD2) 19 | ####################################### 20 | 21 | ####################################### 22 | # Constants (LITERAL1) 23 | ####################################### -------------------------------------------------------------------------------- /t1-lite/lib/DoubleResetDetect/library.properties: -------------------------------------------------------------------------------- 1 | name=DoubleResetDetect 2 | version=1.0.0 3 | author=Jens-Christian Skibakk 4 | maintainer=Jens-Christian Skibakk 5 | sentence=Arduino library to check for double reset on ESP8266 6 | paragraph=This library gives one a opportunity to support a alternative boot mode. E.g. configuring WiFi using WiFiManager 7 | category=Device Control 8 | url=https://github.com/jenscski/DoubleResetDetect 9 | architectures=esp8266 10 | includes=DoubleResetDetect.h 11 | -------------------------------------------------------------------------------- /t1-lite/lib/DoubleResetDetect/src/DoubleResetDetect.cpp: -------------------------------------------------------------------------------- 1 | /* DoubleResetDetect.cpp 2 | * 3 | * Copyright (C) 2018 Jens-Christian Skibakk 4 | * 5 | * This software may be modified and distributed under the terms 6 | * of the MIT license. See the LICENSE file for details. 7 | */ 8 | 9 | #include 10 | 11 | DoubleResetDetect::DoubleResetDetect(float timeout, uint32_t address) 12 | : _timeout(timeout) 13 | , _address(address) 14 | , _status(-1) 15 | { 16 | } 17 | 18 | bool DoubleResetDetect::detect() 19 | { 20 | if (_status < 0) 21 | { 22 | uint32_t data; 23 | ESP.rtcUserMemoryRead(_address, &data, sizeof(data)); 24 | _status = data == 0xAAAAAAAA ? 1 : 0; 25 | 26 | if (_status == 1) 27 | { 28 | clearFlag(_address); 29 | } 30 | else 31 | { 32 | data = 0xAAAAAAAA; 33 | ESP.rtcUserMemoryWrite(_address, &data, sizeof(data)); 34 | 35 | _ticker.once(_timeout, clearFlag, _address); 36 | } 37 | } 38 | 39 | return _status == 1; 40 | } 41 | 42 | void DoubleResetDetect::clearFlag(const uint32_t address) 43 | { 44 | uint32_t data = 0x5555555; 45 | ESP.rtcUserMemoryWrite(address, &data, sizeof(data)); 46 | } 47 | -------------------------------------------------------------------------------- /t1-lite/lib/DoubleResetDetect/src/DoubleResetDetect.h: -------------------------------------------------------------------------------- 1 | /* DoubleResetDetect.cpp 2 | * 3 | * Copyright (C) 2018 Jens-Christian Skibakk 4 | * 5 | * This software may be modified and distributed under the terms 6 | * of the MIT license. See the LICENSE file for details. 7 | */ 8 | 9 | #include 10 | #include 11 | 12 | class DoubleResetDetect 13 | { 14 | public: 15 | // Constructor 16 | DoubleResetDetect(float, uint32_t); 17 | 18 | // Functions 19 | bool detect(void); 20 | 21 | private: 22 | // Variables 23 | float _timeout; 24 | uint32_t _address; 25 | int8_t _status; 26 | Ticker _ticker; 27 | 28 | // Functions 29 | static void clearFlag(uint32_t address); 30 | }; 31 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(COMPONENT_ADD_INCLUDEDIRS src) 2 | set(COMPONENT_PRIV_REQUIRES arduino-esp32) 3 | set(COMPONENT_SRCDIRS src) 4 | register_component() 5 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/README_GEOMETRY_64_48.md: -------------------------------------------------------------------------------- 1 | # GEOMETRY_64_48 2 | 3 | The 64x48 geometry setting are working with the `Wire.h` and `brzo_i2c` libraries. 4 | 5 | I've tested it successfully with a WEMOS D1 mini Lite and a WEMOS OLED shield 6 | 7 | Initialization code: 8 | 9 | - Wire 10 | ``` 11 | #include 12 | #include 13 | SSD1306Wire display(0x3c, D2, D1, GEOMETRY_64_48 ); // WEMOS OLED shield 14 | ``` 15 | 16 | - BRZO i2c 17 | ``` 18 | #include 19 | SSD1306Brzo display(0x3c, D2, D1, GEOMETRY_64_48 ); // WEMOS OLED Shield 20 | ``` 21 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/UPGRADE-4.0.md: -------------------------------------------------------------------------------- 1 | # Upgrade from 3.x to 4.0 2 | 3 | There are changes that breaks compatibility with older versions. 4 | 5 | 1. You'll have to change data type for all your binary resources such as images and fonts from 6 | 7 | ```c 8 | const char MySymbol[] PROGMEM = { 9 | ``` 10 | 11 | to 12 | 13 | ```c 14 | const uint8_t MySymbol[] PROGMEM = { 15 | ``` 16 | 17 | 1. Arguments of `setContrast` from `char` to `uint8_t` 18 | 19 | ```c++ 20 | void OLEDDisplay::setContrast(char contrast, char precharge, char comdetect); 21 | ``` 22 | 23 | to 24 | 25 | ```c++ 26 | void OLEDDisplay::setContrast(uint8_t contrast, uint8_t precharge, uint8_t comdetect); 27 | ``` 28 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/component.mk: -------------------------------------------------------------------------------- 1 | COMPONENT_ADD_INCLUDEDIRS := src 2 | COMPONENT_SRCDIRS := src 3 | CXXFLAGS += -Wno-ignored-qualifiers 4 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/examples/SSD1306ClockDemo/images.h: -------------------------------------------------------------------------------- 1 | const unsigned char activeSymbol[] PROGMEM = { 2 | B00000000, 3 | B00000000, 4 | B00011000, 5 | B00100100, 6 | B01000010, 7 | B01000010, 8 | B00100100, 9 | B00011000 10 | }; 11 | 12 | const unsigned char inactiveSymbol[] PROGMEM = { 13 | B00000000, 14 | B00000000, 15 | B00000000, 16 | B00000000, 17 | B00011000, 18 | B00011000, 19 | B00000000, 20 | B00000000 21 | }; 22 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/examples/SSD1306SimpleDemo/images.h: -------------------------------------------------------------------------------- 1 | #define WiFi_Logo_width 60 2 | #define WiFi_Logo_height 36 3 | const uint8_t WiFi_Logo_bits[] PROGMEM = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 7 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 9 | 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 10 | 0x00, 0xFF, 0xFF, 0xFF, 0x07, 0xC0, 0x83, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 11 | 0x01, 0x00, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x0C, 0x00, 12 | 0xC0, 0xFF, 0xFF, 0x7C, 0x00, 0x60, 0x0C, 0x00, 0xC0, 0x31, 0x46, 0x7C, 13 | 0xFC, 0x77, 0x08, 0x00, 0xE0, 0x23, 0xC6, 0x3C, 0xFC, 0x67, 0x18, 0x00, 14 | 0xE0, 0x23, 0xE4, 0x3F, 0x1C, 0x00, 0x18, 0x00, 0xE0, 0x23, 0x60, 0x3C, 15 | 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x03, 0x60, 0x3C, 0x1C, 0x70, 0x18, 0x00, 16 | 0xE0, 0x07, 0x60, 0x3C, 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 17 | 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 18 | 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x8F, 0x71, 0x3C, 19 | 0x1C, 0x70, 0x18, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x08, 0x00, 20 | 0xC0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x0C, 0x00, 0x80, 0xFF, 0xFF, 0x1F, 21 | 0x00, 0x00, 0x06, 0x00, 0x80, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x07, 0x00, 22 | 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 23 | 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 24 | 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 25 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 26 | 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | }; 29 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/examples/SSD1306TwoScreenDemo/images.h: -------------------------------------------------------------------------------- 1 | #define WiFi_Logo_width 60 2 | #define WiFi_Logo_height 36 3 | const uint8_t WiFi_Logo_bits[] PROGMEM = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 7 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 9 | 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 10 | 0x00, 0xFF, 0xFF, 0xFF, 0x07, 0xC0, 0x83, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 11 | 0x01, 0x00, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x0C, 0x00, 12 | 0xC0, 0xFF, 0xFF, 0x7C, 0x00, 0x60, 0x0C, 0x00, 0xC0, 0x31, 0x46, 0x7C, 13 | 0xFC, 0x77, 0x08, 0x00, 0xE0, 0x23, 0xC6, 0x3C, 0xFC, 0x67, 0x18, 0x00, 14 | 0xE0, 0x23, 0xE4, 0x3F, 0x1C, 0x00, 0x18, 0x00, 0xE0, 0x23, 0x60, 0x3C, 15 | 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x03, 0x60, 0x3C, 0x1C, 0x70, 0x18, 0x00, 16 | 0xE0, 0x07, 0x60, 0x3C, 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 17 | 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 18 | 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x8F, 0x71, 0x3C, 19 | 0x1C, 0x70, 0x18, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x08, 0x00, 20 | 0xC0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x0C, 0x00, 0x80, 0xFF, 0xFF, 0x1F, 21 | 0x00, 0x00, 0x06, 0x00, 0x80, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x07, 0x00, 22 | 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 23 | 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 24 | 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 25 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 26 | 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | }; 29 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/examples/SSD1306UiDemo/images.h: -------------------------------------------------------------------------------- 1 | #define WiFi_Logo_width 60 2 | #define WiFi_Logo_height 36 3 | const uint8_t WiFi_Logo_bits[] PROGMEM = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 7 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 9 | 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 10 | 0x00, 0xFF, 0xFF, 0xFF, 0x07, 0xC0, 0x83, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 11 | 0x01, 0x00, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x0C, 0x00, 12 | 0xC0, 0xFF, 0xFF, 0x7C, 0x00, 0x60, 0x0C, 0x00, 0xC0, 0x31, 0x46, 0x7C, 13 | 0xFC, 0x77, 0x08, 0x00, 0xE0, 0x23, 0xC6, 0x3C, 0xFC, 0x67, 0x18, 0x00, 14 | 0xE0, 0x23, 0xE4, 0x3F, 0x1C, 0x00, 0x18, 0x00, 0xE0, 0x23, 0x60, 0x3C, 15 | 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x03, 0x60, 0x3C, 0x1C, 0x70, 0x18, 0x00, 16 | 0xE0, 0x07, 0x60, 0x3C, 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 17 | 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 18 | 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x8F, 0x71, 0x3C, 19 | 0x1C, 0x70, 0x18, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x08, 0x00, 20 | 0xC0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x0C, 0x00, 0x80, 0xFF, 0xFF, 0x1F, 21 | 0x00, 0x00, 0x06, 0x00, 0x80, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x07, 0x00, 22 | 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 23 | 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 24 | 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 25 | 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 26 | 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | }; 29 | 30 | const uint8_t activeSymbol[] PROGMEM = { 31 | B00000000, 32 | B00000000, 33 | B00011000, 34 | B00100100, 35 | B01000010, 36 | B01000010, 37 | B00100100, 38 | B00011000 39 | }; 40 | 41 | const uint8_t inactiveSymbol[] PROGMEM = { 42 | B00000000, 43 | B00000000, 44 | B00000000, 45 | B00000000, 46 | B00011000, 47 | B00011000, 48 | B00000000, 49 | B00000000 50 | }; 51 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ESP8266 and ESP32 OLED driver for SSD1306 displays", 3 | "version": "4.2.0", 4 | "keywords": "ssd1306, oled, display, i2c", 5 | "description": "I2C display driver for SSD1306 OLED displays connected to ESP8266, ESP32, Mbed-OS", 6 | "repository": 7 | { 8 | "type": "git", 9 | "url": "https://github.com/ThingPulse/esp8266-oled-ssd1306" 10 | }, 11 | "authors": 12 | [ 13 | { 14 | "name": "Daniel Eichhorn, ThingPulse", 15 | "email": "squix78@gmail.com", 16 | "url": "https://thingpulse.com" 17 | }, 18 | { 19 | "name": "Fabrice Weinberg", 20 | "email": "fabrice@weinberg.me" 21 | } 22 | ], 23 | "frameworks": "arduino", 24 | "platforms": [ 25 | "espressif8266", 26 | "espressif32", 27 | "nordicnrf52" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266 and ESP32 OLED driver for SSD1306 displays 2 | version=4.2.0 3 | author=ThingPulse, Fabrice Weinberg 4 | maintainer=ThingPulse 5 | sentence=I2C display driver for SSD1306 OLED displays connected to ESP8266, ESP32, Mbed-OS 6 | paragraph=The following geometries are currently supported: 128x64, 128x32, 64x48. The init sequence was inspired by Adafruit's library for the same display. 7 | category=Display 8 | url=https://github.com/ThingPulse/esp8266-oled-ssd1306 9 | architectures=esp8266,esp32 10 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 by Daniel Eichhorn 4 | Copyright (c) 2016 by Fabrice Weinberg 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | 24 | See more at http://blog.squix.ch 25 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; http://docs.platformio.org/page/projectconf.html 10 | 11 | [env:d1_mini] 12 | platform = espressif8266 13 | board = d1_mini 14 | framework = arduino 15 | upload_speed = 921600 16 | board_build.f_cpu = 160000000L 17 | upload_port = /dev/cu.SLAB_USBtoUART 18 | monitor_port = /dev/cu.SLAB_USBtoUART 19 | lib_deps = 20 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame1.jpg -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame2.jpg -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame3.jpg -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/DemoFrame4.jpg -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/FontTool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/FontTool.png -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/SPI_version.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/SPI_version.jpg -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/glyphEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/glyphEditor.png -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/xbmPreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/resources/xbmPreview.png -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/src/SH1106.h: -------------------------------------------------------------------------------- 1 | /** 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2018 by ThingPulse, Daniel Eichhorn 5 | * Copyright (c) 2018 by Fabrice Weinberg 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | * 25 | * ThingPulse invests considerable time and money to develop these open source libraries. 26 | * Please support us by buying our products (and not the clones) from 27 | * https://thingpulse.com 28 | * 29 | */ 30 | 31 | #ifndef SH1106_h 32 | #define SH1106_h 33 | #include "SH1106Wire.h" 34 | 35 | // For make SH1106 an alias for SH1106Wire 36 | typedef SH1106Wire SH1106; 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /t1-lite/lib/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/src/SSD1306.h: -------------------------------------------------------------------------------- 1 | /** 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2018 by ThingPulse, Daniel Eichhorn 5 | * Copyright (c) 2018 by Fabrice Weinberg 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | * 25 | * ThingPulse invests considerable time and money to develop these open source libraries. 26 | * Please support us by buying our products (and not the clones) from 27 | * https://thingpulse.com 28 | * 29 | */ 30 | 31 | #ifndef SSD1306_h 32 | #define SSD1306_h 33 | #include "SSD1306Wire.h" 34 | 35 | // For legacy support make SSD1306 an alias for SSD1306 36 | typedef SSD1306Wire SSD1306; 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /t1-lite/lib/EasyNTPClient/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Harsha Alva 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /t1-lite/lib/EasyNTPClient/README.md: -------------------------------------------------------------------------------- 1 | # EasyNTPClient 2 | 3 | [![Collaborizm](https://img.shields.io/badge/Collaborizm-Join%20now-blue.svg)](https://www.collaborizm.com/) 4 | [![Build Status](https://travis-ci.org/aharshac/EasyNTPClient.svg?branch=master)](https://travis-ci.org/aharshac/EasyNTPClient) 5 | 6 | Arduino library to read time from Network Time Protocol (NTP) servers. 7 | 8 |   9 | 10 | ## Features 11 | - Handles all heavy lifting involved with managing connections to and parsing time from an NTP server. 12 | - As easy as providing a **UDP** object to the constructor during initialization. 13 | - Works on **Arduino** and **ESP8266**. 14 | 15 |   16 | 17 | ## Examples 18 | 1. **NodeMCU** 19 | Using EasyNTPClient on a NodeMCU (ESP8266) 20 | 21 | 2. **ArduinoEspWifiShield** 22 | Using EasyNTPClient on an Arduino UNO with an ESP-01 (ESP8266) WiFi module. 23 | By [**Claran Martis**](https://www.collaborizm.com/profile/SJne7FcMg) 24 | 25 |   26 | 27 | ## Reference 28 | ### Class **EasyNTPClient** 29 | #### 1. Initialization #### 30 | 1. No frills 31 | ```c 32 | EasyNTPClient(UDP &udp) 33 | 34 | Parameters: 35 | udp: Reference to an UDP object. 36 | Returns: 37 | EasyNTPClient object. 38 | ``` 39 | 40 | 2. Custom server pool 41 | ```c 42 | EasyNTPClient(UDP& udp, const char* serverPool) 43 | 44 | Parameters: 45 | udp: Reference to an UDP object. 46 | serverPool: NTP server pool. Default = "pool.ntp.org" 47 | Returns: 48 | EasyNTPClient object. 49 | ``` 50 | 51 | 3. Time offset 52 | ```c 53 | EasyNTPClient(UDP& udp, const char* serverPool, int offset); 54 | 55 | Parameters: 56 | udp: Reference to an UDP object. 57 | serverPool: NTP server pool domain name. Default = "pool.ntp.org" 58 | offset: Difference from UTC in seconds. Default = 0 59 | Returns: 60 | EasyNTPClient object. 61 | ``` 62 | 63 | #### 2. Methods ### 64 | 1. Get time offset 65 | ```c 66 | int getTimeOffset() 67 | 68 | Returns: 69 | EasyNTPClient object. 70 | ``` 71 | 72 | 2. Set time offset 73 | ```c 74 | void setTimeOffset(int offset); 75 | 76 | Parameters: 77 | offset: Difference from UTC in seconds. 78 | ``` 79 | 80 | 3. Get time in UNIX format 81 | ```c 82 | unsigned long getUnixTime(); 83 | 84 | Returns: 85 | UTC time in UNIX time format (seconds) 86 | ``` -------------------------------------------------------------------------------- /t1-lite/lib/EasyNTPClient/examples/ArduinoEspWifiShield/.esp8266.test.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/EasyNTPClient/examples/ArduinoEspWifiShield/.esp8266.test.skip -------------------------------------------------------------------------------- /t1-lite/lib/EasyNTPClient/examples/ArduinoEspWifiShield/ArduinoEspWifiShield.ino: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EasyNTPClient example: ArduinoEspWifiShield 4 | 5 | This example shows the basic usage of the EasyNTPClient on an Arduino UNO with an ESP-01 (ESP8266) WiFi module. 6 | The output is visible in the Serial Monitor at 9600 baud rate. 7 | 8 | For more details see: https://github.com/aharshac/EasyNTPClient 9 | 10 | An example by Claran Martis 11 | https://www.collaborizm.com/profile/SJne7FcMg 12 | 13 | */ 14 | 15 | 16 | /* 17 | 18 | Pin Connectiions 19 | 20 | +--------+-----------------------------+ 21 | | ESP-01 | Connection | 22 | +--------+-----------------------------+ 23 | | TXD | Arduino D3 | 24 | +--------+-----------------------------+ 25 | | CH_PD | External Power Supply +3.3V | 26 | +--------+-----------------------------+ 27 | | RST | Arduino Reset | 28 | +--------+-----------------------------+ 29 | | VCC | External Power Supply +3.3V | 30 | +--------+-----------------------------+ 31 | | RXD | Arduino D2 | 32 | +--------+-----------------------------+ 33 | | GPIO0 | {None} | 34 | +--------+-----------------------------+ 35 | | GPIO2 | {None} | 36 | +--------+-----------------------------+ 37 | | GND | Common GND | 38 | +--------+-----------------------------+ 39 | 40 | */ 41 | 42 | #include 43 | 44 | #include 45 | #include 46 | #include 47 | #include 48 | 49 | #include 50 | 51 | 52 | char ssid[] = "ssid"; // your network SSID (name) 53 | char password[] = "password"; // your network password 54 | 55 | const int pinEspRx = 2; // Esp Rx <----> Arduino Tx 56 | const int pinEspTx = 3; // Esp Tx <----> Arduino Rx 57 | SoftwareSerial ESP8266(pinEspTx, pinEspRx); 58 | 59 | WiFiEspUDP udp; 60 | EasyNTPClient ntpClient(udp, "pool.ntp.org", ((5*60*60)+(30*60))); // IST = GMT + 5:30 61 | 62 | void setup(){ 63 | Serial.begin(9600); 64 | ESP8266.begin(115200); 65 | WiFi.init(&ESP8266); 66 | WiFi.begin(ssid, password); 67 | 68 | while (WiFi.status() != WL_CONNECTED) { 69 | delay(500); 70 | Serial.print("."); 71 | } 72 | udp.begin(123); 73 | } 74 | 75 | void loop() { 76 | Serial.println(ntpClient.getUnixTime()); 77 | 78 | delay(20000); // wait for 20 seconds before refreshing. 79 | } -------------------------------------------------------------------------------- /t1-lite/lib/EasyNTPClient/examples/NodeMCU/.uno.test.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/EasyNTPClient/examples/NodeMCU/.uno.test.skip -------------------------------------------------------------------------------- /t1-lite/lib/EasyNTPClient/examples/NodeMCU/NodeMCU.ino: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EasyNTPClient example: NodeMCU 4 | 5 | This example shows the basic usage of the EasyNTPClient on a NodeMCU (ESP8266). 6 | The output is visible in the Serial Monitor at 9600 baud rate. 7 | 8 | For more details see: https://github.com/aharshac/EasyNTPClient 9 | 10 | */ 11 | 12 | /* 13 | * 14 | * Board/shield platform 15 | * 16 | * Arduino WiFi shield: #include 17 | * 18 | * WiFi 101 shield or MKR1000: #include 19 | * 20 | * ESP8266/NodeMCU: #include 21 | * 22 | */ 23 | 24 | #include 25 | 26 | #include 27 | #include 28 | 29 | 30 | const char *ssid = ""; 31 | const char *password = ""; 32 | 33 | WiFiUDP udp; 34 | 35 | EasyNTPClient ntpClient(udp, "pool.ntp.org", ((5*60*60)+(30*60))); // IST = GMT + 5:30 36 | 37 | void setup(){ 38 | Serial.begin(9600); 39 | WiFi.begin(ssid, password); 40 | 41 | while (WiFi.status() != WL_CONNECTED) { 42 | delay(500); 43 | Serial.print("."); 44 | } 45 | } 46 | 47 | void loop() { 48 | Serial.println(ntpClient.getUnixTime()); 49 | 50 | delay(20000); // wait for 20 seconds before refreshing. 51 | } -------------------------------------------------------------------------------- /t1-lite/lib/EasyNTPClient/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For StringSplitter 3 | ####################################### 4 | # Class (KEYWORD1) 5 | ####################################### 6 | 7 | EasyNTPClient KEYWORD1 8 | 9 | ####################################### 10 | # Methods and Functions (KEYWORD2) 11 | ####################################### 12 | 13 | getTimeOffset KEYWORD2 14 | setTimeOffset KEYWORD2 15 | getUnixTime KEYWORD2 16 | 17 | ####################################### 18 | # Constants (LITERAL1) 19 | ####################################### 20 | 21 | -------------------------------------------------------------------------------- /t1-lite/lib/EasyNTPClient/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EasyNTPClient", 3 | "keywords": "easy, udp, web, nodemcu, esp, esp8266, ntp, client, time", 4 | "description": "Library to read time from Network Time Protocol (NTP) servers", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/aharshac/EasyNTPClient" 8 | }, 9 | "version": "1.1.0", 10 | "authors": { 11 | "name": "Harsha Alva", 12 | "url": "https://alvaharsha.me" 13 | }, 14 | "frameworks": "arduino", 15 | "platforms": "espressif" 16 | } -------------------------------------------------------------------------------- /t1-lite/lib/EasyNTPClient/library.properties: -------------------------------------------------------------------------------- 1 | name=EasyNTPClient 2 | version=1.1.0 3 | author=Harsha Alva 4 | maintainer=Harsha Alva 5 | sentence=Library to read time from Network Time Protocol (NTP) servers. 6 | paragraph=Handles the connection to an NTP pool and parses Internet Time to UNIX time format. 7 | category=Timing 8 | url=https://github.com/aharshac/EasyNTPClient 9 | architectures=* 10 | -------------------------------------------------------------------------------- /t1-lite/lib/EasyNTPClient/src/EasyNTPClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | EasyNTPClient - Arduino library to read time from Network Time Protocol (NTP) servers. 3 | Created by Harsha Alva, June 29, 2017. 4 | Released into the public domain. 5 | 6 | Based on work by: 7 | * Francesco Potortì, 2013 8 | * https://playground.arduino.cc/Code/NTPclient 9 | * 10 | * Sandeep Mistry, 2016 11 | * https://github.com/arduino-libraries/NTPClient 12 | */ 13 | 14 | #ifndef EasyNTPClient_h 15 | #define EasyNTPClient_h 16 | 17 | #include "Arduino.h" 18 | #include 19 | 20 | class EasyNTPClient 21 | { 22 | public: 23 | EasyNTPClient(UDP &udp); 24 | EasyNTPClient(UDP& udp, const char* serverPool); 25 | EasyNTPClient(UDP& udp, const char* serverPool, int offset); 26 | int getTimeOffset(); 27 | void setTimeOffset(int offset); 28 | unsigned long getUnixTime(); 29 | 30 | private: 31 | UDP *mUdp; 32 | const char* mServerPool = "pool.ntp.org"; 33 | int mOffset = 0; 34 | unsigned int mUpdateInterval = 60000; 35 | unsigned long mLastUpdate = 0; 36 | long mServerTime = 0; 37 | unsigned long getServerTime(); 38 | }; 39 | 40 | #endif -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thank you for creating a pull request to contribute to Adafruit's GitHub code! 2 | Before you open the request please review the following guidelines and tips to 3 | help it be more easily integrated: 4 | 5 | - **Describe the scope of your change--i.e. what the change does and what parts 6 | of the code were modified.** This will help us understand any risks of integrating 7 | the code. 8 | 9 | - **Describe any known limitations with your change.** For example if the change 10 | doesn't apply to a supported platform of the library please mention it. 11 | 12 | - **Please run any tests or examples that can exercise your modified code.** We 13 | strive to not break users of the code and running tests/examples helps with this 14 | process. 15 | 16 | Thank you again for contributing! We will try to test and integrate the change 17 | as soon as we can, but be aware we have many GitHub repositories to manage and 18 | can't immediately respond to every request. There is no need to bump or check in 19 | on a pull request (it will clutter the discussion of the request). 20 | 21 | Also don't be worried if the request is closed or not integrated--sometimes the 22 | priorities of Adafruit's GitHub code (education, ease of use) might not match the 23 | priorities of the pull request. Don't fret, the open source community thrives on 24 | forks and GitHub makes it easy to keep your changes in a forked repo. 25 | 26 | After reviewing the guidelines above you can delete this text from the pull request. 27 | -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/.github/workflows/githubci.yml: -------------------------------------------------------------------------------- 1 | name: Arduino Library CI 2 | 3 | on: [pull_request, push, repository_dispatch] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/setup-python@v1 11 | with: 12 | python-version: '3.x' 13 | - uses: actions/checkout@v2 14 | - uses: actions/checkout@v2 15 | with: 16 | repository: adafruit/ci-arduino 17 | path: ci 18 | 19 | - name: pre-install 20 | run: bash ci/actions_install.sh 21 | 22 | - name: test platforms 23 | run: python3 ci/build_platform.py main_platforms 24 | 25 | - name: clang 26 | run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r . 27 | 28 | - name: doxygen 29 | env: 30 | GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }} 31 | PRETTYNAME : "RTClib" 32 | run: bash ci/doxy_gen_and_deploy.sh 33 | -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | html 3 | Doxyfile* 4 | doxygen_sqlite3.db 5 | -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/.piopm: -------------------------------------------------------------------------------- 1 | {"type": "library", "name": "RTClib", "version": "1.12.4", "spec": {"owner": "adafruit", "id": 83, "name": "RTClib", "requirements": null, "url": null}} -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/examples/ds1307SqwPin/ds1307SqwPin.ino: -------------------------------------------------------------------------------- 1 | // SQW/OUT pin mode using a DS1307 RTC connected via I2C. 2 | // 3 | // According to the data sheet (http://datasheets.maxim-ic.com/en/ds/DS1307.pdf), the 4 | // DS1307's SQW/OUT pin can be set to low, high, 1Hz, 4.096kHz, 8.192kHz, or 32.768kHz. 5 | // 6 | // This sketch reads the state of the pin, then iterates through the possible values at 7 | // 5 second intervals. 8 | // 9 | 10 | // NOTE: 11 | // You must connect a pull up resistor (~10kohm) from the SQW pin up to VCC. Without 12 | // this pull up the wave output will not work! 13 | 14 | #include "RTClib.h" 15 | 16 | RTC_DS1307 rtc; 17 | 18 | int mode_index = 0; 19 | 20 | Ds1307SqwPinMode modes[] = { DS1307_OFF, DS1307_ON, DS1307_SquareWave1HZ, DS1307_SquareWave4kHz, DS1307_SquareWave8kHz, DS1307_SquareWave32kHz}; 21 | 22 | 23 | void print_mode() { 24 | Ds1307SqwPinMode mode = rtc.readSqwPinMode(); 25 | 26 | Serial.print("Sqw Pin Mode: "); 27 | switch(mode) { 28 | case DS1307_OFF: Serial.println("OFF"); break; 29 | case DS1307_ON: Serial.println("ON"); break; 30 | case DS1307_SquareWave1HZ: Serial.println("1Hz"); break; 31 | case DS1307_SquareWave4kHz: Serial.println("4.096kHz"); break; 32 | case DS1307_SquareWave8kHz: Serial.println("8.192kHz"); break; 33 | case DS1307_SquareWave32kHz: Serial.println("32.768kHz"); break; 34 | default: Serial.println("UNKNOWN"); break; 35 | } 36 | } 37 | 38 | void setup () { 39 | Serial.begin(57600); 40 | 41 | #ifndef ESP8266 42 | while (!Serial); // wait for serial port to connect. Needed for native USB 43 | #endif 44 | 45 | if (! rtc.begin()) { 46 | Serial.println("Couldn't find RTC"); 47 | Serial.flush(); 48 | abort(); 49 | } 50 | 51 | print_mode(); 52 | } 53 | 54 | void loop () { 55 | rtc.writeSqwPinMode(modes[mode_index++]); 56 | print_mode(); 57 | 58 | if (mode_index > 5) { 59 | mode_index = 0; 60 | } 61 | 62 | delay(5000); 63 | } 64 | -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/examples/ds1307nvram/ds1307nvram.ino: -------------------------------------------------------------------------------- 1 | // Example of using the non-volatile RAM storage on the DS1307. 2 | // You can write up to 56 bytes from address 0 to 55. 3 | // Data will be persisted as long as the DS1307 has battery power. 4 | 5 | #include "RTClib.h" 6 | 7 | RTC_DS1307 rtc; 8 | 9 | void printnvram(uint8_t address) { 10 | Serial.print("Address 0x"); 11 | Serial.print(address, HEX); 12 | Serial.print(" = 0x"); 13 | Serial.println(rtc.readnvram(address), HEX); 14 | } 15 | 16 | void setup () { 17 | Serial.begin(57600); 18 | 19 | #ifndef ESP8266 20 | while (!Serial); // wait for serial port to connect. Needed for native USB 21 | #endif 22 | 23 | if (! rtc.begin()) { 24 | Serial.println("Couldn't find RTC"); 25 | Serial.flush(); 26 | abort(); 27 | } 28 | 29 | // Print old RAM contents on startup. 30 | Serial.println("Current NVRAM values:"); 31 | for (int i = 0; i < 6; ++i) { 32 | printnvram(i); 33 | } 34 | 35 | // Write some bytes to non-volatile RAM storage. 36 | // NOTE: You can only read and write from addresses 0 to 55 (i.e. 56 byte values). 37 | Serial.println("Writing NVRAM values."); 38 | // Example writing one byte at a time: 39 | rtc.writenvram(0, 0xFE); 40 | rtc.writenvram(1, 0xED); 41 | // Example writing multiple bytes: 42 | uint8_t writeData[4] = { 0xBE, 0xEF, 0x01, 0x02 }; 43 | rtc.writenvram(2, writeData, 4); 44 | 45 | // Read bytes from non-volatile RAM storage. 46 | Serial.println("Reading NVRAM values:"); 47 | // Example reading one byte at a time. 48 | Serial.println(rtc.readnvram(0), HEX); 49 | Serial.println(rtc.readnvram(1), HEX); 50 | // Example reading multiple bytes: 51 | uint8_t readData[4] = {0}; 52 | rtc.readnvram(readData, 4, 2); 53 | Serial.println(readData[0], HEX); 54 | Serial.println(readData[1], HEX); 55 | Serial.println(readData[2], HEX); 56 | Serial.println(readData[3], HEX); 57 | 58 | } 59 | 60 | void loop () { 61 | // Do nothing in the loop. 62 | } 63 | -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/examples/interrupts1Hz/.leonardo.test.only: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/RTClib/examples/interrupts1Hz/.leonardo.test.only -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/examples/interrupts1Hz/.mega2560.test.only: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/RTClib/examples/interrupts1Hz/.mega2560.test.only -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/examples/interrupts1Hz/.uno.test.only: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/RTClib/examples/interrupts1Hz/.uno.test.only -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/examples/softrtc/softrtc.ino: -------------------------------------------------------------------------------- 1 | // Date and time functions using just software, based on millis() & timer 2 | 3 | #include "RTClib.h" 4 | 5 | RTC_Millis rtc; 6 | 7 | void setup () { 8 | Serial.begin(57600); 9 | 10 | #ifndef ESP8266 11 | while (!Serial); // wait for serial port to connect. Needed for native USB 12 | #endif 13 | 14 | // following line sets the RTC to the date & time this sketch was compiled 15 | rtc.begin(DateTime(F(__DATE__), F(__TIME__))); 16 | // This line sets the RTC with an explicit date & time, for example to set 17 | // January 21, 2014 at 3am you would call: 18 | // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); 19 | } 20 | 21 | void loop () { 22 | DateTime now = rtc.now(); 23 | 24 | Serial.print(now.year(), DEC); 25 | Serial.print('/'); 26 | Serial.print(now.month(), DEC); 27 | Serial.print('/'); 28 | Serial.print(now.day(), DEC); 29 | Serial.print(' '); 30 | Serial.print(now.hour(), DEC); 31 | Serial.print(':'); 32 | Serial.print(now.minute(), DEC); 33 | Serial.print(':'); 34 | Serial.print(now.second(), DEC); 35 | Serial.println(); 36 | 37 | Serial.print(" seconds since 1970: "); 38 | Serial.println(now.unixtime()); 39 | 40 | // calculate a date which is 7 days and 30 seconds into the future 41 | DateTime future (now.unixtime() + 7 * 86400L + 30); 42 | 43 | Serial.print(" now + 7d + 30s: "); 44 | Serial.print(future.year(), DEC); 45 | Serial.print('/'); 46 | Serial.print(future.month(), DEC); 47 | Serial.print('/'); 48 | Serial.print(future.day(), DEC); 49 | Serial.print(' '); 50 | Serial.print(future.hour(), DEC); 51 | Serial.print(':'); 52 | Serial.print(future.minute(), DEC); 53 | Serial.print(':'); 54 | Serial.print(future.second(), DEC); 55 | Serial.println(); 56 | 57 | Serial.println(); 58 | delay(3000); 59 | } 60 | -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/examples/timestamp/timestamp.ino: -------------------------------------------------------------------------------- 1 | /* Timestamp functions using a DS1307 RTC connected via I2C and Wire lib 2 | ** 3 | ** Useful for file name 4 | ** ` SD.open(time.timestamp()+".log", FILE_WRITE) ` 5 | ** 6 | ** 7 | ** Created: 2015-06-01 by AxelTB 8 | ** Last Edit: 9 | */ 10 | 11 | #include "RTClib.h" 12 | 13 | RTC_DS1307 rtc; 14 | 15 | void setup () { 16 | Serial.begin(57600); 17 | 18 | #ifndef ESP8266 19 | while (!Serial); // wait for serial port to connect. Needed for native USB 20 | #endif 21 | 22 | if (! rtc.begin()) { 23 | Serial.println("Couldn't find RTC"); 24 | Serial.flush(); 25 | abort(); 26 | } 27 | 28 | if (! rtc.isrunning()) { 29 | Serial.println("RTC is NOT running, let's set the time!"); 30 | // When time needs to be set on a new device, or after a power loss, the 31 | // following line sets the RTC to the date & time this sketch was compiled 32 | rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); 33 | // This line sets the RTC with an explicit date & time, for example to set 34 | // January 21, 2014 at 3am you would call: 35 | // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); 36 | } 37 | 38 | // When time needs to be re-set on a previously configured device, the 39 | // following line sets the RTC to the date & time this sketch was compiled 40 | // rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); 41 | // This line sets the RTC with an explicit date & time, for example to set 42 | // January 21, 2014 at 3am you would call: 43 | // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); 44 | } 45 | 46 | void loop() { 47 | DateTime time = rtc.now(); 48 | 49 | //Full Timestamp 50 | Serial.println(String("DateTime::TIMESTAMP_FULL:\t")+time.timestamp(DateTime::TIMESTAMP_FULL)); 51 | 52 | //Date Only 53 | Serial.println(String("DateTime::TIMESTAMP_DATE:\t")+time.timestamp(DateTime::TIMESTAMP_DATE)); 54 | 55 | //Full Timestamp 56 | Serial.println(String("DateTime::TIMESTAMP_TIME:\t")+time.timestamp(DateTime::TIMESTAMP_TIME)); 57 | 58 | Serial.println("\n"); 59 | 60 | //Delay 5s 61 | delay(5000); 62 | } 63 | -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/examples/toString/toString.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | RTC_DS1307 rtc; 5 | 6 | 7 | void setup () { 8 | Serial.begin(57600); 9 | 10 | #ifndef ESP8266 11 | while (!Serial); // wait for serial port to connect. Needed for native USB 12 | #endif 13 | 14 | if (! rtc.begin()) { 15 | Serial.println("Couldn't find RTC"); 16 | Serial.flush(); 17 | abort(); 18 | } 19 | 20 | if (! rtc.isrunning()) { 21 | Serial.println("RTC is NOT running, let's set the time!"); 22 | // When time needs to be set on a new device, or after a power loss, the 23 | // following line sets the RTC to the date & time this sketch was compiled 24 | rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); 25 | // This line sets the RTC with an explicit date & time, for example to set 26 | // January 21, 2014 at 3am you would call: 27 | // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); 28 | } 29 | 30 | // When time needs to be re-set on a previously configured device, the 31 | // following line sets the RTC to the date & time this sketch was compiled 32 | // rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); 33 | // This line sets the RTC with an explicit date & time, for example to set 34 | // January 21, 2014 at 3am you would call: 35 | // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); 36 | } 37 | 38 | void loop() { 39 | 40 | DateTime now = rtc.now(); 41 | 42 | //buffer can be defined using following combinations: 43 | //hh - the hour with a leading zero (00 to 23) 44 | //mm - the minute with a leading zero (00 to 59) 45 | //ss - the whole second with a leading zero where applicable (00 to 59) 46 | //YYYY - the year as four digit number 47 | //YY - the year as two digit number (00-99) 48 | //MM - the month as number with a leading zero (01-12) 49 | //MMM - the abbreviated English month name ('Jan' to 'Dec') 50 | //DD - the day as number with a leading zero (01 to 31) 51 | //DDD - the abbreviated English day name ('Mon' to 'Sun') 52 | 53 | char buf1[] = "hh:mm"; 54 | Serial.println(now.toString(buf1)); 55 | 56 | char buf2[] = "YYMMDD-hh:mm:ss"; 57 | Serial.println(now.toString(buf2)); 58 | 59 | char buf3[] = "Today is DDD, MMM DD YYYY"; 60 | Serial.println(now.toString(buf3)); 61 | 62 | char buf4[] = "MM-DD-YYYY"; 63 | Serial.println(now.toString(buf4)); 64 | 65 | delay(1000); 66 | } 67 | -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For RTClib 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | DateTime KEYWORD1 10 | TimeSpan KEYWORD1 11 | RTC_DS1307 KEYWORD1 12 | RTC_DS3231 KEYWORD1 13 | RTC_PCF8523 KEYWORD1 14 | RTC_PCF8563 KEYWORD1 15 | RTC_Millis KEYWORD1 16 | RTC_Micros KEYWORD1 17 | Ds1307SqwPinMode KEYWORD1 18 | Ds3231SqwPinMode KEYWORD1 19 | Ds3231Alarm1Mode KEYWORD1 20 | Ds3231Alarm2Mode KEYWORD1 21 | Pcf8523SqwPinMode KEYWORD1 22 | PCF8523TimerClockFreq KEYWORD1 23 | PCF8523TimerIntPulse KEYWORD1 24 | Pcf8523OffsetMode KEYWORD1 25 | Pcf8563SqwPinMode KEYWORD1 26 | 27 | ####################################### 28 | # Methods and Functions (KEYWORD2) 29 | ####################################### 30 | 31 | isValid KEYWORD2 32 | year KEYWORD2 33 | month KEYWORD2 34 | day KEYWORD2 35 | hour KEYWORD2 36 | twelveHour KEYWORD2 37 | isPM KEYWORD2 38 | minute KEYWORD2 39 | second KEYWORD2 40 | dayOfTheWeek KEYWORD2 41 | secondstime KEYWORD2 42 | unixtime KEYWORD2 43 | days KEYWORD2 44 | hours KEYWORD2 45 | minutes KEYWORD2 46 | seconds KEYWORD2 47 | totalseconds KEYWORD2 48 | begin KEYWORD2 49 | adjust KEYWORD2 50 | adjustDrift KEYWORD2 51 | isrunning KEYWORD2 52 | now KEYWORD2 53 | readSqwPinMode KEYWORD2 54 | writeSqwPinMode KEYWORD2 55 | timestamp KEYWORD2 56 | toString KEYWORD2 57 | readnvram KEYWORD2 58 | writenvram KEYWORD2 59 | setAlarm1 KEYWORD2 60 | setAlarm2 KEYWORD2 61 | disableAlarm KEYWORD2 62 | clearAlarm KEYWORD2 63 | alarmFired KEYWORD2 64 | getTemperature KEYWORD2 65 | lostPower KEYWORD2 66 | initialized KEYWORD2 67 | enableSecondTimer KEYWORD2 68 | disableSecondTimer KEYWORD2 69 | enableCountdownTimer KEYWORD2 70 | disableCountdownTimer KEYWORD2 71 | deconfigureAllTimers KEYWORD2 72 | calibrate KEYWORD2 73 | enable32K KEYWORD2 74 | disable32K KEYWORD2 75 | isEnabled32K KEYWORD2 76 | 77 | ####################################### 78 | # Constants (LITERAL1) 79 | ####################################### 80 | TIMESTAMP_FULL LITERAL1 81 | TIMESTAMP_DATE LITERAL1 82 | TIMESTAMP_TIME LITERAL1 83 | 84 | -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/library.properties: -------------------------------------------------------------------------------- 1 | name=RTClib 2 | version=1.12.4 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=A fork of Jeelab's fantastic RTC library 6 | paragraph=A fork of Jeelab's fantastic RTC library 7 | category=Timing 8 | url=https://github.com/adafruit/RTClib 9 | architectures=* 10 | depends=TinyWireM 11 | -------------------------------------------------------------------------------- /t1-lite/lib/RTClib/license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Adafruit Industries 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | This library is the culmination of the expertise of many members of the open source community who have dedicated their time and hard work. The best way to ask for help or propose a new idea is to [create a new issue](https://github.com/winlinvip/SimpleDHT/issues/new) while creating a Pull Request with your code changes allows you to share your own innovations with the rest of the community. 4 | 5 | The following are some guidelines to observe when creating issues or PRs: 6 | 7 | - Be friendly; it is important that we can all enjoy a safe space as we are all working on the same project and it is okay for people to have different ideas 8 | 9 | - [Use code blocks](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code); it helps us help you when we can read your code! On that note also refrain from pasting more than 30 lines of code in a post, instead [create a gist](https://gist.github.com/) if you need to share large snippets 10 | 11 | - Use reasonable titles; refrain from using overly long or capitalized titles as they are usually annoying and do little to encourage others to help :smile: 12 | 13 | - Be detailed; refrain from mentioning code problems without sharing your source code and always give information regarding your board and version of the library. 14 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016-2017 winlin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/examples/DHT11Default/DHT11Default.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT11, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT11 = 2; 8 | SimpleDHT11 dht11(pinDHT11); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT11..."); 18 | 19 | // read without samples. 20 | byte temperature = 0; 21 | byte humidity = 0; 22 | int err = SimpleDHTErrSuccess; 23 | if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 24 | Serial.print("Read DHT11 failed, err="); Serial.print(SimpleDHTErrCode(err)); 25 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(1000); 26 | return; 27 | } 28 | 29 | Serial.print("Sample OK: "); 30 | Serial.print((int)temperature); Serial.print(" *C, "); 31 | Serial.print((int)humidity); Serial.println(" H"); 32 | 33 | // DHT11 sampling rate is 1HZ. 34 | delay(1500); 35 | } 36 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/examples/DHT11ErrCount/DHT11ErrCount.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT11, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT11 = 2; 8 | SimpleDHT11 dht11(pinDHT11); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT11 with error count"); 18 | 19 | int cnt = 0; 20 | int err_cnt = 0; 21 | for (;;) { 22 | cnt++; 23 | 24 | byte temperature = 0; 25 | byte humidity = 0; 26 | int err = SimpleDHTErrSuccess; 27 | if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 28 | Serial.print("Read DHT11 failed, err="); Serial.print(SimpleDHTErrCode(err)); 29 | Serial.print(","); Serial.print(SimpleDHTErrDuration(err)); 30 | err_cnt++; 31 | } else { 32 | Serial.print("DHT11, "); 33 | Serial.print((int)temperature); Serial.print(" *C, "); 34 | Serial.print((int)humidity); Serial.print(" H"); 35 | } 36 | Serial.print(", total: "); Serial.print(cnt); 37 | Serial.print(", err: "); Serial.print(err_cnt); 38 | Serial.print(", success rate: "); Serial.print((cnt - err_cnt) * 100.0 / (float)cnt); Serial.println("%"); 39 | 40 | delay(1500); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/examples/DHT11WithRawBits/DHT11WithRawBits.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT11, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT11 = 2; 8 | SimpleDHT11 dht11(pinDHT11); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT11 with RAW bits..."); 18 | 19 | // read with raw sample data. 20 | byte temperature = 0; 21 | byte humidity = 0; 22 | byte data[5] = {0}; 23 | int err = SimpleDHTErrSuccess; 24 | if ((err = dht11.read(&temperature, &humidity, data)) != SimpleDHTErrSuccess) { 25 | Serial.print("Read DHT11 failed, err="); Serial.print(SimpleDHTErrCode(err)); 26 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(1000); 27 | return; 28 | } 29 | 30 | Serial.print("Sample RAW Bits: "); 31 | for (int i = 0; i < 5; i++) { 32 | for(int n=0;n<8;n++) 33 | Serial.print(bitRead(data[i],n)); 34 | Serial.print(' '); 35 | } 36 | Serial.println(""); 37 | 38 | Serial.print("Sample OK: "); 39 | Serial.print((int)temperature); Serial.print(" *C, "); 40 | Serial.print((int)humidity); Serial.println(" H"); 41 | 42 | // DHT11 sampling rate is 1HZ. 43 | delay(1500); 44 | } 45 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/examples/DHT22Default/DHT22Default.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT22, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT22 = 2; 8 | SimpleDHT22 dht22(pinDHT22); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT22..."); 18 | 19 | // read without samples. 20 | // @remark We use read2 to get a float data, such as 10.1*C 21 | // if user doesn't care about the accurate data, use read to get a byte data, such as 10*C. 22 | float temperature = 0; 23 | float humidity = 0; 24 | int err = SimpleDHTErrSuccess; 25 | if ((err = dht22.read2(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 26 | Serial.print("Read DHT22 failed, err="); Serial.print(SimpleDHTErrCode(err)); 27 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(2000); 28 | return; 29 | } 30 | 31 | Serial.print("Sample OK: "); 32 | Serial.print((float)temperature); Serial.print(" *C, "); 33 | Serial.print((float)humidity); Serial.println(" RH%"); 34 | 35 | // DHT22 sampling rate is 0.5HZ. 36 | delay(2500); 37 | } 38 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/examples/DHT22ErrCount/DHT22ErrCount.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT22, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT22 = 2; 8 | SimpleDHT22 dht22(pinDHT22); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT22 with error count"); 18 | 19 | int cnt = 0; 20 | int err_cnt = 0; 21 | for (;;) { 22 | cnt++; 23 | 24 | float temperature = 0; 25 | float humidity = 0; 26 | int err = SimpleDHTErrSuccess; 27 | if ((err = dht22.read2(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 28 | Serial.print("Read DHT22 failed, err="); Serial.print(SimpleDHTErrCode(err)); 29 | Serial.print(","); Serial.print(SimpleDHTErrDuration(err)); 30 | err_cnt++; 31 | } else { 32 | Serial.print("DHT22, "); 33 | Serial.print((float)temperature); Serial.print(" *C, "); 34 | Serial.print((float)humidity); Serial.print(" RH%"); 35 | } 36 | Serial.print(", total: "); Serial.print(cnt); 37 | Serial.print(", err: "); Serial.print(err_cnt); 38 | Serial.print(", success rate: "); Serial.print((cnt - err_cnt) * 100.0 / (float)cnt); Serial.println("%"); 39 | 40 | delay(2500); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/examples/DHT22Integer/DHT22Integer.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT22, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT22 = 2; 8 | SimpleDHT22 dht22(pinDHT22); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT22..."); 18 | 19 | // read without samples. 20 | byte temperature = 0; 21 | byte humidity = 0; 22 | int err = SimpleDHTErrSuccess; 23 | if ((err = dht22.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 24 | Serial.print("Read DHT22 failed, err="); Serial.print(SimpleDHTErrCode(err)); 25 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(2000); 26 | return; 27 | } 28 | 29 | Serial.print("Sample OK: "); 30 | Serial.print((int)temperature); Serial.print(" *C, "); 31 | Serial.print((int)humidity); Serial.println(" RH%"); 32 | 33 | // DHT22 sampling rate is 0.5HZ. 34 | delay(2500); 35 | } 36 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/examples/DHT22WithRawBits/DHT22WithRawBits.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // for DHT22, 4 | // VCC: 5V or 3V 5 | // GND: GND 6 | // DATA: 2 7 | int pinDHT22 = 2; 8 | SimpleDHT22 dht22(pinDHT22); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | } 13 | 14 | void loop() { 15 | // start working... 16 | Serial.println("================================="); 17 | Serial.println("Sample DHT22 with RAW bits..."); 18 | 19 | // read with raw sample data. 20 | // @remark We use read2 to get a float data, such as 10.1*C 21 | // if user doesn't care about the accurate data, use read to get a byte data, such as 10*C. 22 | float temperature = 0; 23 | float humidity = 0; 24 | byte data[5] = {0}; 25 | int err = SimpleDHTErrSuccess; 26 | if ((err = dht22.read2(&temperature, &humidity, data)) != SimpleDHTErrSuccess) { 27 | Serial.print("Read DHT22 failed, err="); Serial.print(SimpleDHTErrCode(err)); 28 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(2000); 29 | return; 30 | } 31 | 32 | Serial.print("Sample RAW Bits: "); 33 | for (int i = 0; i < 5; i++) { 34 | for (int n = 0; n < 8; n++) 35 | Serial.print(bitRead(data[i], n)); 36 | Serial.print(' '); 37 | } 38 | Serial.println(""); 39 | 40 | Serial.print("Sample OK: "); 41 | Serial.print((float)temperature); Serial.print(" *C, "); 42 | Serial.print((float)humidity); Serial.println(" RH%"); 43 | 44 | // DHT22 sampling rate is 0.5HZ. 45 | delay(2500); 46 | } 47 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/examples/TwoSensorsDefault/TwoSensorsDefault.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // Created by santosomar Ωr using SimpleDHT library to read data from two DHT11 sensors 4 | // for DHT11, 5 | // VCC: 5V or 3V 6 | // GND: GND 7 | // SENSOR 1 is in Digital Data pin: 2 8 | // SENSOR 2 is in Digital Data pin: 4 9 | 10 | int dataPinSensor1 = 2; 11 | int dataPinSensor2 = 4; 12 | SimpleDHT11 dht1(dataPinSensor1); 13 | SimpleDHT11 dht2(dataPinSensor2); 14 | 15 | void setup() { 16 | Serial.begin(115200); 17 | } 18 | 19 | void loop() { 20 | // Reading data from sensor 1... 21 | Serial.println("================================="); 22 | 23 | // Reading data from sensor 1... 24 | Serial.println("Getting data from sensor 1..."); 25 | 26 | // read without samples. 27 | byte temperature = 0; 28 | byte humidity = 0; 29 | int err = SimpleDHTErrSuccess; 30 | if ((err = dht1.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { 31 | Serial.print("Read Sensor 1 failed, err="); Serial.print(SimpleDHTErrCode(err)); 32 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(1000); 33 | return; 34 | } 35 | 36 | // converting Celsius to Fahrenheit 37 | byte f = temperature * 1.8 + 32; 38 | Serial.print("Sample OK: "); 39 | Serial.print((int)temperature); Serial.print(" *C, "); 40 | Serial.print((int)f); Serial.print(" *F, "); 41 | Serial.print((int)humidity); Serial.println(" H humidity"); 42 | 43 | 44 | // Reading data from sensor 2... 45 | // ============================ 46 | Serial.println("Getting data from sensor 2..."); 47 | 48 | byte temperature2 = 0; 49 | byte humidity2 = 0; 50 | if ((err = dht2.read(&temperature2, &humidity2, NULL)) != SimpleDHTErrSuccess) { 51 | Serial.print("Read Sensor 2 failed, err="); Serial.print(SimpleDHTErrCode(err)); 52 | Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(1000); 53 | return; 54 | } 55 | 56 | // converting Celsius to Fahrenheit 57 | byte fb = temperature2 * 1.8 + 32; 58 | 59 | Serial.print("Sample OK: "); 60 | Serial.print((int)temperature2); Serial.print(" *C, "); 61 | Serial.print((int)fb); Serial.print(" *F, "); 62 | Serial.print((int)humidity2); Serial.println(" H humidity"); 63 | 64 | // DHT11 sampling rate is 1HZ. 65 | delay(1500); 66 | } 67 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/keywords.txt: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Syntax Coloring Map For SimpleDHT 3 | ########################################### 4 | 5 | ########################################### 6 | # Datatypes (KEYWORD1) 7 | ########################################### 8 | SimpleDHT11 KEYWORD1 9 | SimpleDHT22 KEYWORD1 10 | 11 | ########################################### 12 | # Methods and Functions (KEYWORD2) 13 | ########################################### 14 | read KEYWORD2 15 | 16 | ########################################### 17 | # Constants (LITERAL1) 18 | ########################################### 19 | -------------------------------------------------------------------------------- /t1-lite/lib/SimpleDHT/library.properties: -------------------------------------------------------------------------------- 1 | name=SimpleDHT 2 | version=1.0.14 3 | author=Winlin 4 | maintainer=Winlin 5 | sentence=Arduino Temp & Humidity Sensors for DHT11 and DHT22. 6 | paragraph=Simple C++ code with lots of comments, strictly follow the standard DHT protocol, supports 0.5HZ(DHT22) or 1HZ(DHT11) sampling rate. 7 | category=Sensors 8 | url=https://github.com/winlinvip/SimpleDHT 9 | architectures=* 10 | -------------------------------------------------------------------------------- /t1-lite/lib/U8g2/README.md: -------------------------------------------------------------------------------- 1 | # U8g2_Arduino: Arduino Monochrome Graphics Library 2 | 3 | ![https://raw.githubusercontent.com/wiki/olikraus/u8g2/img/uc1701_dogs102_uno_board_320.jpg](https://raw.githubusercontent.com/wiki/olikraus/u8g2/img/uc1701_dogs102_uno_board_320.jpg) 4 | 5 | U8glib V2 library for Arduino 6 | 7 | Description: https://github.com/olikraus/u8g2/wiki 8 | 9 | Issue Tracker: https://github.com/olikraus/u8g2/issues 10 | 11 | Download (2.28.10): https://github.com/olikraus/U8g2_Arduino/archive/master.zip 12 | 13 | -------------------------------------------------------------------------------- /t1-lite/lib/U8g2/library.properties: -------------------------------------------------------------------------------- 1 | name=U8g2 2 | version=2.28.10 3 | author=oliver 4 | maintainer=oliver 5 | sentence=Monochrome LCD, OLED and eInk Library. Display controller: SSD1305, SSD1306, SSD1309, SSD1316, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, SH1108, SH1122, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1617, UC1701, ST7511, ST7528, ST7565, ST7567, ST7571, ST7586, ST7588, ST75256, ST75320, NT7534, ST7920, IST3020, IST7920, LD7032, KS0108, KS0713, SED1520, SBN1661, IL3820, MAX7219. Interfaces: I2C, SPI, Parallel. 6 | paragraph=Monochrome LCD, OLED and eInk Library. Successor of U8glib. Supported display controller: SSD1305, SSD1306, SSD1309, SSD1316, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, SH1108, SH1122, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1617, UC1701, ST7511, ST7528, ST7565, ST7567, ST7571, ST7586, ST7588, ST75256, ST75320, NT7534, ST7920, IST3020, IST7920, LD7032, KS0108, KS0713, SED1520, SBN1661, IL3820, MAX7219. Supported interfaces: I2C, SPI, Parallel. Features: UTF8, >700 fonts, U8x8 char output. 7 | category=Display 8 | url=https://github.com/olikraus/u8g2 9 | architectures=* 10 | license=BSD-2-Clause 11 | -------------------------------------------------------------------------------- /t1-lite/lib/U8g2/src/U8g2lib.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | U8g2lib.cpp 4 | 5 | Arduino specific functions 6 | 7 | 8 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 9 | 10 | Copyright (c) 2016, olikraus@gmail.com 11 | All rights reserved. 12 | 13 | Redistribution and use in source and binary forms, with or without modification, 14 | are permitted provided that the following conditions are met: 15 | 16 | * Redistributions of source code must retain the above copyright notice, this list 17 | of conditions and the following disclaimer. 18 | 19 | * Redistributions in binary form must reproduce the above copyright notice, this 20 | list of conditions and the following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 24 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 25 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 26 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 28 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 30 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 31 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 32 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 33 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 35 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | 37 | */ 38 | 39 | 40 | #include "U8g2lib.h" 41 | 42 | static Print *u8g2_print_for_screenshot; 43 | 44 | 45 | void u8g2_print_callback(const char *s) 46 | { 47 | yield(); 48 | u8g2_print_for_screenshot->print(s); 49 | } 50 | 51 | void U8G2::writeBufferPBM(Print &p) 52 | { 53 | u8g2_print_for_screenshot = &p; 54 | u8g2_WriteBufferPBM(getU8g2(), u8g2_print_callback); 55 | } 56 | 57 | void U8G2::writeBufferXBM(Print &p) 58 | { 59 | u8g2_print_for_screenshot = &p; 60 | u8g2_WriteBufferXBM(getU8g2(), u8g2_print_callback); 61 | } 62 | 63 | void U8G2::writeBufferPBM2(Print &p) 64 | { 65 | u8g2_print_for_screenshot = &p; 66 | u8g2_WriteBufferPBM2(getU8g2(), u8g2_print_callback); 67 | } 68 | 69 | void U8G2::writeBufferXBM2(Print &p) 70 | { 71 | u8g2_print_for_screenshot = &p; 72 | u8g2_WriteBufferXBM2(getU8g2(), u8g2_print_callback); 73 | } 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /t1-lite/lib/U8g2/src/clib/u8g2_cleardisplay.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g2_cleardisplay.c 4 | 5 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 6 | 7 | Copyright (c) 2016, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | */ 35 | #include "u8g2.h" 36 | 37 | /* Clear screen buffer & display reliable for all u8g2 displays. */ 38 | /* This is done with u8g2 picture loop, because we can not use the u8x8 function in all cases */ 39 | void u8g2_ClearDisplay(u8g2_t *u8g2) 40 | { 41 | u8g2_FirstPage(u8g2); 42 | do { 43 | } while ( u8g2_NextPage(u8g2) ); 44 | /* 45 | This function is usually called during startup (u8g2.begin()). 46 | However the user might want to use full buffer mode with clear and 47 | send commands. 48 | This will not work because the current tile row is modified by the picture 49 | loop above. To fix this, reset the tile row to 0, issue #370 50 | A workaround would be, that the user sets the current tile row to 0 manually. 51 | */ 52 | u8g2_SetBufferCurrTileRow(u8g2, 0); 53 | } 54 | 55 | -------------------------------------------------------------------------------- /t1-lite/lib/U8g2/src/clib/u8g2_fonts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/U8g2/src/clib/u8g2_fonts.c -------------------------------------------------------------------------------- /t1-lite/lib/U8g2/src/clib/u8log_u8x8.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8log_u8x8.c 4 | 5 | 6 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 7 | 8 | Copyright (c) 2018, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | #include "u8x8.h" 38 | 39 | static void u8x8_DrawLogLine(u8x8_t *u8x8, uint8_t disp_x, uint8_t disp_y, uint8_t buf_y, u8log_t *u8log) U8X8_NOINLINE; 40 | static void u8x8_DrawLogLine(u8x8_t *u8x8, uint8_t disp_x, uint8_t disp_y, uint8_t buf_y, u8log_t *u8log) 41 | { 42 | uint8_t buf_x; 43 | uint8_t c; 44 | for( buf_x = 0; buf_x < u8log->width; buf_x++ ) 45 | { 46 | c = u8log->screen_buffer[buf_y * u8log->width + buf_x]; 47 | u8x8_DrawGlyph(u8x8, disp_x, disp_y, c); 48 | disp_x++; 49 | } 50 | } 51 | 52 | void u8x8_DrawLog(u8x8_t *u8x8, uint8_t x, uint8_t y, u8log_t *u8log) 53 | { 54 | uint8_t buf_y; 55 | for( buf_y = 0; buf_y < u8log->height; buf_y++ ) 56 | { 57 | u8x8_DrawLogLine(u8x8, x, y, buf_y, u8log); 58 | y++; 59 | } 60 | } 61 | 62 | 63 | void u8log_u8x8_cb(u8log_t * u8log) 64 | { 65 | u8x8_t *u8x8 = (u8x8_t *)(u8log->aux_data); 66 | if ( u8log->is_redraw_all ) 67 | { 68 | u8x8_DrawLog(u8x8, 0, 0, u8log); 69 | } 70 | else if ( u8log->is_redraw_line ) 71 | { 72 | u8x8_DrawLogLine(u8x8, 0, u8log->redraw_line, u8log->redraw_line, u8log); 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /t1-lite/lib/U8g2/src/clib/u8x8_fonts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/U8g2/src/clib/u8x8_fonts.c -------------------------------------------------------------------------------- /t1-lite/lib/U8g2/src/clib/u8x8_gpio.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8x8_gpio.c 4 | 5 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 6 | 7 | Copyright (c) 2016, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | */ 35 | 36 | 37 | #include "u8x8.h" 38 | 39 | 40 | void u8x8_gpio_call(u8x8_t *u8x8, uint8_t msg, uint8_t arg) 41 | { 42 | u8x8->gpio_and_delay_cb(u8x8, msg, arg, NULL); 43 | } 44 | 45 | /* 46 | void u8x8_gpio_Delay(u8x8_t *u8x8, uint8_t msg, uint8_t dly) 47 | { 48 | u8x8->gpio_and_delay_cb(u8x8, msg, dly, NULL); 49 | } 50 | */ -------------------------------------------------------------------------------- /t1-lite/lib/U8g2/src/clib/u8x8_u16toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8x8_u16toa.c 4 | 5 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 6 | 7 | Copyright (c) 2016, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | 35 | */ 36 | 37 | 38 | #include "u8x8.h" 39 | 40 | const char *u8x8_u16toap(char * dest, uint16_t v) 41 | { 42 | uint8_t pos; 43 | uint8_t d; 44 | uint16_t c; 45 | c = 10000; 46 | for( pos = 0; pos < 5; pos++ ) 47 | { 48 | d = '0'; 49 | while( v >= c ) 50 | { 51 | v -= c; 52 | d++; 53 | } 54 | dest[pos] = d; 55 | c /= 10; 56 | } 57 | dest[5] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8x8_u16toa(uint16_t v, uint8_t d) 63 | { 64 | static char buf[6]; 65 | d = 5-d; 66 | return u8x8_u16toap(buf, v) + d; 67 | } 68 | 69 | const char *u8x8_utoa(uint16_t v) 70 | { 71 | const char *s = u8x8_u16toa(v, 5); 72 | while( *s == '0' ) 73 | s++; 74 | if ( *s == '\0' ) 75 | s--; 76 | return s; 77 | } -------------------------------------------------------------------------------- /t1-lite/lib/U8g2/src/clib/u8x8_u8toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8x8_u8toa.c 4 | 5 | Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) 6 | 7 | Copyright (c) 2016, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | */ 35 | 36 | 37 | #include "u8x8.h" 38 | 39 | static const unsigned char u8x8_u8toa_tab[3] = { 100, 10, 1 } ; 40 | const char *u8x8_u8toap(char * dest, uint8_t v) 41 | { 42 | uint8_t pos; 43 | uint8_t d; 44 | uint8_t c; 45 | for( pos = 0; pos < 3; pos++ ) 46 | { 47 | d = '0'; 48 | c = *(u8x8_u8toa_tab+pos); 49 | while( v >= c ) 50 | { 51 | v -= c; 52 | d++; 53 | } 54 | dest[pos] = d; 55 | } 56 | dest[3] = '\0'; 57 | return dest; 58 | } 59 | 60 | /* v = value, d = number of digits */ 61 | const char *u8x8_u8toa(uint8_t v, uint8_t d) 62 | { 63 | static char buf[4]; 64 | d = 3-d; 65 | return u8x8_u8toap(buf, v) + d; 66 | } 67 | 68 | -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/README.md: -------------------------------------------------------------------------------- 1 | 2 | # U8glib 3 | 4 | A graphics library with support for many different monochrome displays. 5 | 6 | ![nhd_oled180.jpg](https://github.com/olikraus/u8glib/wiki/otherpic/nhd_oled180.jpg) ![dogs102_180.jpg](https://github.com/olikraus/u8glib/wiki/otherpic/dogs102_180.jpg) 7 | 8 | Left: NHD-2.7-12864 OLED (SSD1325), right: EA DOGS102 LCD (UC1701) 9 | 10 | * [Gallery](https://github.com/olikraus/u8glib/wiki/gallery) 11 | * [Bintray](https://bintray.com/olikraus/u8glib) download links: 12 | * [U8glib for Arduino](https://bintray.com/olikraus/u8glib/Arduino) 13 | * [U8glib for AVR](https://bintray.com/olikraus/u8glib/AVR) 14 | * [U8glib for ARM](https://bintray.com/olikraus/u8glib/ARM) 15 | * Converter for BDF fonts: [bdf2u8g_101.exe on google drive](https://drive.google.com/folderview?id=0B5b6Dv0wCeCRLWJkYTh2TUlYVDg&usp=sharing). 16 | * Supported environments: 17 | * [Arduino (ATMEGA and ARM)](http://www.arduino.cc/) 18 | * [AVR (ATMEGA)](https://github.com/olikraus/u8glib/wiki/avr) 19 | * [ARM (with example for LPC1114)](https://github.com/olikraus/u8glib/wiki/lpc1114) 20 | * Library for graphic LCDs and OLEDs 21 | * [U8glib documentation and tutorials](https://github.com/olikraus/u8glib/wiki) 22 | * Graphical user interface library (GUI) available: [M2tklib](http://code.google.com/p/m2tklib/) 23 | * COM interfaces: Software SPI, Hardware SPI, 8Bit parallel 24 | * Large number of [fonts](https://github.com/olikraus/u8glib/wiki/fontsize) 25 | * Monospaced and proportional fonts 26 | * Mouse-Cursor support 27 | * Landscape and portrait mode 28 | * Many supported [devices](https://github.com/olikraus/u8glib/wiki/device) (SSD1325, ST7565, ST7920, UC1608, UC1610, UC1701, PCD8544, PCF8812, KS0108, LC7981, SBN1661, SSD1306, SH1106, T6963, LD7032) 29 | * Well-defined interface to the device subsystem 30 | 31 | -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/extras/INSTALL.TXT: -------------------------------------------------------------------------------- 1 | 2 | U8GLIB 3 | http://code.google.com/p/u8glib/ 4 | 5 | Install instructions for the Arduino environment. 6 | 7 | 1. Start Arduino IDE 8 | 2. In the Arduino IDE, import the library from the "Add Library" Menu. 9 | 10 | Alternative install instructions for the Arduino environment. 11 | 12 | 1. Unzip u8glib_arduino_vX.XX.zip into the "libraries" folder of the 13 | Arduino install directory 14 | 2. Start Arduino IDE 15 | 16 | Install instructions for the Chipkit (Arduino) environment. 17 | 18 | 1. cd /libraries 19 | 2. unzip u8glib_arduino_vX.XX.zip 20 | 3. cd ///hardware/pic32/libraries 21 | 4. again: u8glib_arduino_vX.XX.zip 22 | 5. Open hardware/pic32/cores/pic32/Print.h 23 | Remove line 24 | #define BYTE 0 25 | from the file, use PRINT_BYTE instead of BYTE. 26 | -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/library.properties: -------------------------------------------------------------------------------- 1 | name=U8glib 2 | version=1.19.1 3 | author=oliver 4 | maintainer=oliver 5 | sentence=A library for monochrome TFTs and OLEDs 6 | paragraph=Supported display controller: SSD1306, SSD1309, SSD1322, SSD1325, SSD1327, SH1106, UC1601, UC1610, UC1611, UC1701, ST7565, ST7920, KS0108, LC7981, PCD8544, PCF8812, SBN1661, TLS8204, T6963. 7 | category=Display 8 | url=https://github.com/olikraus/u8glib 9 | architectures=avr,sam -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/src/clib/chessengine.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/U8glib/src/clib/chessengine.c -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/src/clib/u8g_com_arduino_common.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_com_arduino_common.c 4 | 5 | shared procedures for the arduino communication procedures 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | #if defined(ARDUINO) 42 | 43 | #if ARDUINO < 100 44 | #include 45 | #else 46 | #include 47 | #endif 48 | 49 | void u8g_com_arduino_digital_write(u8g_t *u8g, uint8_t pin_index, uint8_t value) 50 | { 51 | uint8_t pin; 52 | pin = u8g->pin_list[pin_index]; 53 | if ( pin != U8G_PIN_NONE ) 54 | digitalWrite(pin, value); 55 | } 56 | 57 | /* this procedure does not set the RW pin */ 58 | void u8g_com_arduino_assign_pin_output_high(u8g_t *u8g) 59 | { 60 | uint8_t i; 61 | /* skip the RW pin, which is the last pin in the list */ 62 | for( i = 0; i < U8G_PIN_LIST_LEN-1; i++ ) 63 | { 64 | if ( u8g->pin_list[i] != U8G_PIN_NONE ) 65 | { 66 | pinMode(u8g->pin_list[i], OUTPUT); 67 | digitalWrite(u8g->pin_list[i], HIGH); 68 | } 69 | } 70 | } 71 | 72 | 73 | #endif 74 | 75 | 76 | -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/src/clib/u8g_com_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_com_null.c 4 | 5 | communication null device 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | uint8_t u8g_com_null_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) 42 | { 43 | switch(msg) 44 | { 45 | case U8G_COM_MSG_INIT: 46 | break; 47 | case U8G_COM_MSG_STOP: 48 | break; 49 | 50 | 51 | case U8G_COM_MSG_CHIP_SELECT: 52 | /* arg_val contains the chip number, which should be enabled */ 53 | break; 54 | 55 | 56 | case U8G_COM_MSG_WRITE_BYTE: 57 | break; 58 | case U8G_COM_MSG_WRITE_SEQ: 59 | break; 60 | } 61 | return 1; 62 | } 63 | 64 | -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/src/clib/u8g_dev_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_dev_null.c 4 | 5 | Universal 8bit Graphics Library 6 | 7 | Copyright (c) 2011, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | 35 | */ 36 | 37 | #include "u8g.h" 38 | 39 | uint8_t u8g_dev_null(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) 40 | { 41 | switch(msg) 42 | { 43 | case U8G_DEV_MSG_SET_8PIXEL: /* most often used command */ 44 | break; 45 | case U8G_DEV_MSG_SET_PIXEL: 46 | break; 47 | case U8G_DEV_MSG_INIT: 48 | break; 49 | case U8G_DEV_MSG_STOP: 50 | break; 51 | case U8G_DEV_MSG_PAGE_FIRST: 52 | break; 53 | case U8G_DEV_MSG_PAGE_NEXT: 54 | break; 55 | #ifdef U8G_DEV_MSG_IS_BBX_INTERSECTION 56 | case U8G_DEV_MSG_IS_BBX_INTERSECTION: 57 | return 1; 58 | #endif 59 | case U8G_DEV_MSG_GET_PAGE_BOX: 60 | break; 61 | case U8G_DEV_MSG_SET_COLOR_ENTRY: 62 | break; 63 | case U8G_DEV_MSG_SET_XY_CB: 64 | break; 65 | } 66 | return 1; 67 | } 68 | -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/src/clib/u8g_font_data.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nxez/cube-clock-lite/8a141703649efb7c6fde25c9d7067ef42b8d4a7a/t1-lite/lib/U8glib/src/clib/u8g_font_data.c -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/src/clib/u8g_page.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_page.c 4 | 5 | page helper functions, only called by the dev handler. 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | /* 42 | setup page count structure 43 | conditions: page_height <= total_height 44 | */ 45 | void u8g_page_Init(u8g_page_t *p, u8g_uint_t page_height, u8g_uint_t total_height ) 46 | { 47 | p->page_height = page_height; 48 | p->total_height = total_height; 49 | p->page = 0; 50 | u8g_page_First(p); 51 | } 52 | 53 | void u8g_page_First(u8g_page_t *p) 54 | { 55 | p->page_y0 = 0; 56 | p->page_y1 = p->page_height; 57 | p->page_y1--; 58 | p->page = 0; 59 | } 60 | 61 | uint8_t u8g_page_Next(u8g_page_t * p) 62 | { 63 | register u8g_uint_t y1; 64 | p->page_y0 += p->page_height; 65 | if ( p->page_y0 >= p->total_height ) 66 | return 0; 67 | p->page++; 68 | y1 = p->page_y1; 69 | y1 += p->page_height; 70 | if ( y1 >= p->total_height ) 71 | { 72 | y1 = p->total_height; 73 | y1--; 74 | } 75 | p->page_y1 = y1; 76 | 77 | return 1; 78 | } 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/src/clib/u8g_u16toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_u16toa.c 4 | 5 | 6 | Universal 8bit Graphics Library 7 | 8 | Copyright (c) 2012, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | 38 | #include "u8g.h" 39 | 40 | const char *u8g_u16toap(char * dest, uint16_t v) 41 | { 42 | uint8_t pos; 43 | uint8_t d; 44 | uint16_t c; 45 | c = 10000; 46 | for( pos = 0; pos < 5; pos++ ) 47 | { 48 | d = '0'; 49 | while( v >= c ) 50 | { 51 | v -= c; 52 | d++; 53 | } 54 | dest[pos] = d; 55 | c /= 10; 56 | } 57 | dest[5] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8g_u16toa(uint16_t v, uint8_t d) 63 | { 64 | static char buf[6]; 65 | d = 5-d; 66 | return u8g_u16toap(buf, v) + d; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /t1-lite/lib/U8glib/src/clib/u8g_u8toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_u8toa.c 4 | 5 | 6 | Universal 8bit Graphics Library 7 | 8 | Copyright (c) 2011, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | 38 | #include "u8g.h" 39 | 40 | static const unsigned char u8g_u8toa_tab[3] = { 100, 10, 1 } ; 41 | const char *u8g_u8toap(char * dest, uint8_t v) 42 | { 43 | uint8_t pos; 44 | uint8_t d; 45 | uint8_t c; 46 | for( pos = 0; pos < 3; pos++ ) 47 | { 48 | d = '0'; 49 | c = *(u8g_u8toa_tab+pos); 50 | while( v >= c ) 51 | { 52 | v -= c; 53 | d++; 54 | } 55 | dest[pos] = d; 56 | } 57 | dest[3] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8g_u8toa(uint8_t v, uint8_t d) 63 | { 64 | static char buf[4]; 65 | d = 3-d; 66 | return u8g_u8toap(buf, v) + d; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /t1-lite/platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; http://docs.platformio.org/page/projectconf.html 10 | 11 | [env:d1_mini] 12 | platform = espressif8266 13 | board = d1_mini 14 | framework = arduino 15 | upload_speed = 921600 16 | monitor_speed = 115200 17 | board_build.f_cpu = 160000000L -------------------------------------------------------------------------------- /t1-lite/src/settings.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2021 by NXEZ.com 3 | See more at https://www.nxez.com 4 | */ 5 | 6 | //#define spiOLED 7 | #define i2cOLED 8 | 9 | #ifdef spiOLED 10 | #include "SSD1306Spi.h" 11 | #endif 12 | #ifdef i2cOLED 13 | #include "SSD1306Wire.h" 14 | #include "SH1106.h" 15 | #endif 16 | #include "OLEDDisplayUi.h" 17 | 18 | // Setup 19 | const int UPDATE_INTERVAL_SECS = 3 * 60; 20 | const int UPDATE_INTERVAL_SECS_DHT = 10; 21 | int UTC_OFFSET = 8; 22 | 23 | #ifdef spiOLED 24 | // Pin definitions for SPI OLED 25 | #define OLED_CS D8 // Chip select 26 | #define OLED_DC D2 // Data/Command 27 | #define OLED_RESET D0 // RESET - If you get an error on this line, either change Tools->Board to the board you are using or change "D0" to the appropriate pin number for your board. 28 | #endif 29 | 30 | #ifdef i2cOLED 31 | // Pin definitions for I2C OLED 32 | //const int I2C_DISPLAY_ADDRESS = 0x3C; 33 | const int I2C_DISPLAY_ADDRESS = 0x3C; 34 | const int SDA_PIN = D2; 35 | const int SDC_PIN = D1; 36 | #endif 37 | 38 | // ----------------------------------- 39 | // Example Locales (uncomment only 1) 40 | #define HoChiMinh 41 | //------------------------------------ 42 | 43 | #ifdef HoChiMinh 44 | //DST rules for Central European Time Zone 45 | //#define UTC_OFFSET +8 46 | // Uncomment for 24 Hour style clock 47 | #define STYLE_24HR 48 | 49 | #define NTP_SERVERS "ntp.aliyun.com" 50 | 51 | #endif 52 | 53 | #ifdef spiOLED 54 | SSD1306Spi display(OLED_RESET, OLED_DC, OLED_CS); // SPI OLED 55 | #endif 56 | #ifdef i2cOLED 57 | //SSD1306Wire display(I2C_DISPLAY_ADDRESS, SDA_PIN, SDC_PIN); // I2C OLED 58 | SH1106 display(I2C_DISPLAY_ADDRESS, SDA_PIN, SDC_PIN); // I2C OLED 59 | #endif 60 | 61 | OLEDDisplayUi ui(&display); 62 | 63 | 64 | // WIFI 65 | const char* WIFI_SSID = "WIFI_SSID"; 66 | const char* WIFI_PWD = "WIFI_PWD"; 67 | 68 | const boolean IS_METRIC = true; 69 | 70 | //DHT10/DHT22 71 | const String TEMPERATURE_SENSOR_TYPE = "DHT10"; 72 | /*************************** 73 | * End Settings 74 | **************************/ --------------------------------------------------------------------------------