Merge pull request #252 from pimoroni/badger2040-support

Support for Badger 2040
This commit is contained in:
Philip Howard 2022-02-25 16:25:22 +00:00 committed by GitHub
commit 273ca5c56d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
67 changed files with 13382 additions and 0 deletions

View File

@ -0,0 +1,107 @@
name: MicroPython for Badger2040
on:
push:
pull_request:
release:
types: [created]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
MICROPYTHON_VERSION: v1.18
BUILD_TYPE: Release
BOARD_TYPE: PICO
jobs:
build:
name: ${{matrix.name}}
strategy:
matrix:
include:
- os: ubuntu-20.04
name: Linux
cache-key: linux
cmake-args: '-DPICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk'
apt-packages: clang-tidy gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
runs-on: ${{matrix.os}}
steps:
# Check out MicroPython
- name: Checkout MicroPython
uses: actions/checkout@v2
with:
repository: micropython/micropython
ref: ${{env.MICROPYTHON_VERSION}}
submodules: false # MicroPython submodules are hideously broken
path: micropython
- uses: actions/checkout@v2
with:
submodules: true
path: pimoroni-pico-${{ github.sha }}
# Copy Python module files
- name: Copy modules & examples
run: |
cp -r pimoroni-pico-${GITHUB_SHA}/micropython/badger2040_modules_py/* micropython/ports/rp2/modules/
cp pimoroni-pico-${GITHUB_SHA}/micropython/examples/badger2040/launcher.py micropython/ports/rp2/modules/
cp pimoroni-pico-${GITHUB_SHA}/micropython/examples/badger2040/clock.py micropython/ports/rp2/modules/_clock.py
cp pimoroni-pico-${GITHUB_SHA}/micropython/examples/badger2040/fonts.py micropython/ports/rp2/modules/_fonts.py
cp pimoroni-pico-${GITHUB_SHA}/micropython/examples/badger2040/e-reader.py micropython/ports/rp2/modules/_ebook.py
cp pimoroni-pico-${GITHUB_SHA}/micropython/examples/badger2040/image.py micropython/ports/rp2/modules/_image.py
cp pimoroni-pico-${GITHUB_SHA}/micropython/examples/badger2040/checklist.py micropython/ports/rp2/modules/_list.py
cp pimoroni-pico-${GITHUB_SHA}/micropython/examples/badger2040/badge.py micropython/ports/rp2/modules/_badge.py
cp pimoroni-pico-${GITHUB_SHA}/micropython/examples/badger2040/help.py micropython/ports/rp2/modules/_help.py
cp pimoroni-pico-${GITHUB_SHA}/micropython/examples/badger2040/info.py micropython/ports/rp2/modules/_info.py
cp pimoroni-pico-${GITHUB_SHA}/micropython/badger2040-mpconfigboard.h micropython/ports/rp2/boards/PICO/mpconfigboard.h
# Linux deps
- name: Install deps
if: runner.os == 'Linux'
run: |
sudo apt update && sudo apt install ${{matrix.apt-packages}}
- name: Fetch base MicroPython submodules
shell: bash
working-directory: micropython
run: git submodule update --init
- name: Fetch Pico SDK submodules
shell: bash
working-directory: micropython/lib/pico-sdk
run: git submodule update --init
- name: Build mpy-cross
shell: bash
working-directory: micropython/mpy-cross
run: make
- name: Build MicroPython
shell: bash
working-directory: micropython/ports/rp2
run: make USER_C_MODULES=../../../pimoroni-pico-${GITHUB_SHA}/micropython/modules/badger2040-micropython.cmake -j2
- name: Rename .uf2 for artifact
shell: bash
working-directory: micropython/ports/rp2/build-${{env.BOARD_TYPE}}
run: |
cp firmware.uf2 ${{github.event.repository.name}}-${{github.sha}}-badger2040-micropython-${{env.MICROPYTHON_VERSION}}.uf2
cp firmware.uf2 ${{github.event.repository.name}}-${{github.event.release.tag_name}}-badger2040-micropython-${{env.MICROPYTHON_VERSION}}.uf2
- name: Store .uf2 as artifact
uses: actions/upload-artifact@v2
with:
name: ${{github.event.repository.name}}-${{github.sha}}-badger2040-micropython-${{env.MICROPYTHON_VERSION}}.uf2
path: micropython/ports/rp2/build-${{env.BOARD_TYPE}}/${{github.event.repository.name}}-${{github.sha}}-badger2040-micropython-${{env.MICROPYTHON_VERSION}}.uf2
- name: Upload .uf2
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
asset_path: micropython/ports/rp2/build-${{env.BOARD_TYPE}}/firmware.uf2
upload_url: ${{github.event.release.upload_url}}
asset_name: ${{github.event.repository.name}}-${{github.event.release.tag_name}}-badger2040-micropython-${{env.MICROPYTHON_VERSION}}.uf2
asset_content_type: application/octet-stream

View File

@ -25,3 +25,4 @@ add_subdirectory(rgbled)
add_subdirectory(icp10125)
add_subdirectory(scd4x)
add_subdirectory(hub75)
add_subdirectory(uc8151)

View File

@ -0,0 +1 @@
include(uc8151.cmake)

View File

@ -0,0 +1,10 @@
set(DRIVER_NAME uc8151)
add_library(${DRIVER_NAME} INTERFACE)
target_sources(${DRIVER_NAME} INTERFACE
${CMAKE_CURRENT_LIST_DIR}/${DRIVER_NAME}.cpp)
target_include_directories(${DRIVER_NAME} INTERFACE ${CMAKE_CURRENT_LIST_DIR})
# Pull in pico libraries that we need
target_link_libraries(${DRIVER_NAME} INTERFACE pico_stdlib hardware_spi)

543
drivers/uc8151/uc8151.cpp Normal file
View File

@ -0,0 +1,543 @@
#include "uc8151.hpp"
#include <cstdlib>
#include <math.h>
namespace pimoroni {
enum reg {
PSR = 0x00,
PWR = 0x01,
POF = 0x02,
PFS = 0x03,
PON = 0x04,
PMES = 0x05,
BTST = 0x06,
DSLP = 0x07,
DTM1 = 0x10,
DSP = 0x11,
DRF = 0x12,
DTM2 = 0x13,
LUT_VCOM = 0x20,
LUT_WW = 0x21,
LUT_BW = 0x22,
LUT_WB = 0x23,
LUT_BB = 0x24,
PLL = 0x30,
TSC = 0x40,
TSE = 0x41,
TSR = 0x43,
TSW = 0x42,
CDI = 0x50,
LPD = 0x51,
TCON = 0x60,
TRES = 0x61,
REV = 0x70,
FLG = 0x71,
AMV = 0x80,
VV = 0x81,
VDCS = 0x82,
PTL = 0x90,
PTIN = 0x91,
PTOU = 0x92,
PGM = 0xa0,
APG = 0xa1,
ROTP = 0xa2,
CCSET = 0xe0,
PWS = 0xe3,
TSSET = 0xe5
};
bool UC8151::is_busy() {
return !gpio_get(BUSY);
}
void UC8151::busy_wait() {
while(is_busy()) {
tight_loop_contents();
}
}
void UC8151::reset() {
gpio_put(RESET, 0); sleep_ms(10);
gpio_put(RESET, 1); sleep_ms(10);
busy_wait();
}
void UC8151::default_luts() {
command(LUT_VCOM, {
0x00, 0x64, 0x64, 0x37, 0x00, 0x01,
0x00, 0x8c, 0x8c, 0x00, 0x00, 0x04,
0x00, 0x64, 0x64, 0x37, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
command(LUT_WW, {
0x54, 0x64, 0x64, 0x37, 0x00, 0x01,
0x60, 0x8c, 0x8c, 0x00, 0x00, 0x04,
0xa8, 0x64, 0x64, 0x37, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_BW, {
0x54, 0x64, 0x64, 0x37, 0x00, 0x01,
0x60, 0x8c, 0x8c, 0x00, 0x00, 0x04,
0xa8, 0x64, 0x64, 0x37, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_WB, {
0xa8, 0x64, 0x64, 0x37, 0x00, 0x01,
0x60, 0x8c, 0x8c, 0x00, 0x00, 0x04,
0x54, 0x64, 0x64, 0x37, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_BB, {
0xa8, 0x64, 0x64, 0x37, 0x00, 0x01,
0x60, 0x8c, 0x8c, 0x00, 0x00, 0x04,
0x54, 0x64, 0x64, 0x37, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
busy_wait();
}
void UC8151::medium_luts() {
command(LUT_VCOM, {
0x00, 0x16, 0x16, 0x0d, 0x00, 0x01,
0x00, 0x23, 0x23, 0x00, 0x00, 0x02,
0x00, 0x16, 0x16, 0x0d, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
command(LUT_WW, {
0x54, 0x16, 0x16, 0x0d, 0x00, 0x01,
0x60, 0x23, 0x23, 0x00, 0x00, 0x02,
0xa8, 0x16, 0x16, 0x0d, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_BW, {
0x54, 0x16, 0x16, 0x0d, 0x00, 0x01,
0x60, 0x23, 0x23, 0x00, 0x00, 0x02,
0xa8, 0x16, 0x16, 0x0d, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_WB, {
0xa8, 0x16, 0x16, 0x0d, 0x00, 0x01,
0x60, 0x23, 0x23, 0x00, 0x00, 0x02,
0x54, 0x16, 0x16, 0x0d, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_BB, {
0xa8, 0x16, 0x16, 0x0d, 0x00, 0x01,
0x60, 0x23, 0x23, 0x00, 0x00, 0x02,
0x54, 0x16, 0x16, 0x0d, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
busy_wait();
}
void UC8151::fast_luts() {
// 0x3c, 0x00, 0x2b, 0x2b, 0x24, 0x1a, ????
command(LUT_VCOM, {
0x00, 0x04, 0x04, 0x07, 0x00, 0x01,
0x00, 0x0c, 0x0c, 0x00, 0x00, 0x02,
0x00, 0x04, 0x04, 0x07, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
command(LUT_WW, {
0x54, 0x04, 0x04, 0x07, 0x00, 0x01,
0x60, 0x0c, 0x0c, 0x00, 0x00, 0x02,
0xa8, 0x04, 0x04, 0x07, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_BW, {
0x54, 0x04, 0x04, 0x07, 0x00, 0x01,
0x60, 0x0c, 0x0c, 0x00, 0x00, 0x02,
0xa8, 0x04, 0x04, 0x07, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_WB, {
0xa8, 0x04, 0x04, 0x07, 0x00, 0x01,
0x60, 0x0c, 0x0c, 0x00, 0x00, 0x02,
0x54, 0x04, 0x04, 0x07, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_BB, {
0xa8, 0x04, 0x04, 0x07, 0x00, 0x01,
0x60, 0x0c, 0x0c, 0x00, 0x00, 0x02,
0x54, 0x04, 0x04, 0x07, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(PLL, {
HZ_200
});
busy_wait();
}
void UC8151::turbo_luts() {
// 0x3c, 0x00, 0x2b, 0x2b, 0x24, 0x1a, ????
command(LUT_VCOM, {
0x00, 0x01, 0x01, 0x02, 0x00, 0x01,
0x00, 0x02, 0x02, 0x00, 0x00, 0x02,
0x00, 0x02, 0x02, 0x03, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
command(LUT_WW, {
0x54, 0x01, 0x01, 0x02, 0x00, 0x01,
0x60, 0x02, 0x02, 0x00, 0x00, 0x02,
0xa8, 0x02, 0x02, 0x03, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_BW, {
0x54, 0x01, 0x01, 0x02, 0x00, 0x01,
0x60, 0x02, 0x02, 0x00, 0x00, 0x02,
0xa8, 0x02, 0x02, 0x03, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_WB, {
0xa8, 0x01, 0x01, 0x02, 0x00, 0x01,
0x60, 0x02, 0x02, 0x00, 0x00, 0x02,
0x54, 0x02, 0x02, 0x03, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(LUT_BB, {
0xa8, 0x01, 0x01, 0x02, 0x00, 0x01,
0x60, 0x02, 0x02, 0x00, 0x00, 0x02,
0x54, 0x02, 0x02, 0x03, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
command(PLL, {
HZ_200
});
busy_wait();
}
void UC8151::init() {
// configure spi interface and pins
spi_init(spi, 12'000'000);
gpio_set_function(DC, GPIO_FUNC_SIO);
gpio_set_dir(DC, GPIO_OUT);
gpio_set_function(CS, GPIO_FUNC_SIO);
gpio_set_dir(CS, GPIO_OUT);
gpio_put(CS, 1);
gpio_set_function(RESET, GPIO_FUNC_SIO);
gpio_set_dir(RESET, GPIO_OUT);
gpio_put(RESET, 1);
gpio_set_function(BUSY, GPIO_FUNC_SIO);
gpio_set_dir(BUSY, GPIO_IN);
gpio_set_pulls(BUSY, true, false);
gpio_set_function(SCK, GPIO_FUNC_SPI);
gpio_set_function(MOSI, GPIO_FUNC_SPI);
setup();
};
void UC8151::setup(uint8_t speed) {
reset();
if(speed == 0) {
command(PSR, {
RES_128x296 | LUT_OTP | FORMAT_BW | SHIFT_RIGHT | BOOSTER_ON | RESET_NONE
});
} else {
command(PSR, {
RES_128x296 | LUT_REG | FORMAT_BW | SHIFT_RIGHT | BOOSTER_ON | RESET_NONE
});
}
switch(speed) {
case 0:
// Note: the defult luts are built in so we don't really need to flash them here
// they are preserved above for posterity and reference mostly.
break;
case 1:
medium_luts();
break;
case 2:
fast_luts();
break;
case 3:
turbo_luts();
break;
default:
break;
}
command(PWR, {
VDS_INTERNAL | VDG_INTERNAL,
VCOM_VD | VGHL_16V,
0b101011,
0b101011,
0b101011
});
command(PON); // power on
busy_wait();
// booster soft start configuration
command(BTST, {
START_10MS | STRENGTH_3 | OFF_6_58US,
START_10MS | STRENGTH_3 | OFF_6_58US,
START_10MS | STRENGTH_3 | OFF_6_58US
});
command(PFS, {
FRAMES_1
});
command(TSE, {
TEMP_INTERNAL | OFFSET_0
});
command(TCON, {0x22}); // tcon setting
command(CDI, {(uint8_t)(inverted ? 0b01'01'1100 : 0b01'00'1100)}); // vcom and data interval
command(PLL, {
HZ_100
});
command(POF);
busy_wait();
}
void UC8151::power_off() {
command(POF);
}
void UC8151::read(uint8_t reg, size_t len, uint8_t *data) {
gpio_put(CS, 0);
gpio_put(DC, 0); // command mode
spi_write_blocking(spi, &reg, 1);
if(len > 0) {
gpio_put(DC, 1); // data mode
gpio_set_function(SCK, GPIO_FUNC_SIO);
gpio_set_dir(SCK, GPIO_OUT);
gpio_set_function(MOSI, GPIO_FUNC_SIO);
gpio_set_dir(MOSI, GPIO_IN);
for(auto i = 0u; i < len; i++) {
int byte = i / 8;
int bit = i % 8;
gpio_put(SCK, true);
bool value = gpio_get(MOSI);
data[byte] |= value << (7-bit);
gpio_put(SCK, false);
}
gpio_set_function(SCK, GPIO_FUNC_SPI);
gpio_set_function(MOSI, GPIO_FUNC_SPI);
}
gpio_put(CS, 1);
}
void UC8151::command(uint8_t reg, size_t len, const uint8_t *data) {
gpio_put(CS, 0);
gpio_put(DC, 0); // command mode
spi_write_blocking(spi, &reg, 1);
if(len > 0) {
gpio_put(DC, 1); // data mode
spi_write_blocking(spi, (const uint8_t*)data, len);
}
gpio_put(CS, 1);
}
void UC8151::data(size_t len, const uint8_t *data) {
gpio_put(CS, 0);
gpio_put(DC, 1); // data mode
spi_write_blocking(spi, (const uint8_t*)data, len);
gpio_put(CS, 1);
}
void UC8151::command(uint8_t reg, std::initializer_list<uint8_t> values) {
command(reg, values.size(), (uint8_t *)values.begin());
}
void UC8151::pixel(int x, int y, int v) {
// bounds check
if(x < 0 || y < 0 || x >= width || y >= height) return;
// pointer to byte in framebuffer that contains this pixel
uint8_t *p = &frame_buffer[(y / 8) + (x * (height / 8))];
uint8_t o = 7 - (y & 0b111); // bit offset within byte
uint8_t m = ~(1 << o); // bit mask for byte
uint8_t b = (v == 0 ? 0 : 1) << o; // bit value shifted to position
*p &= m; // clear bit
*p |= b; // set bit value
}
void UC8151::invert(bool inv) {
inverted = inv;
command(CDI, {(uint8_t)(inverted ? 0b01'01'1100 : 0b01'00'1100)}); // vcom and data interval
}
void UC8151::update_speed(uint8_t speed) {
setup(speed);
}
void UC8151::partial_update(int x, int y, int w, int h, bool blocking) {
// y is given in columns ("banks"), which are groups of 8 horiontal pixels
// x is given in pixels
if(blocking) {
busy_wait();
}
int cols = h / 8;
int y1 = y / 8;
//int y2 = y1 + cols;
int rows = w;
int x1 = x;
//int x2 = x + rows;
uint8_t partial_window[7] = {
(uint8_t)(y),
(uint8_t)(y + h - 1),
(uint8_t)(x >> 8),
(uint8_t)(x & 0xff),
(uint8_t)((x + w - 1) >> 8),
(uint8_t)((x + w - 1) & 0xff),
0b00000001 // PT_SCAN
};
command(PON); // turn on
command(PTIN); // enable partial mode
command(PTL, sizeof(partial_window), partial_window);
command(DTM2);
for (auto dx = 0; dx < rows; dx++) {
int sx = dx + x1;
int sy = y1;
data(cols, &frame_buffer[sy + (sx * (height / 8))]);
}
command(DSP); // data stop
command(DRF); // start display refresh
if(blocking) {
busy_wait();
command(POF); // turn off
}
}
void UC8151::update(bool blocking) {
if(blocking) {
busy_wait();
}
command(PON); // turn on
command(PTOU); // disable partial mode
command(DTM2, (width * height) / 8, frame_buffer); // transmit framebuffer
command(DSP); // data stop
command(DRF); // start display refresh
if(blocking) {
busy_wait();
command(POF); // turn off
}
}
void UC8151::off() {
busy_wait();
command(POF); // turn off
}
}

209
drivers/uc8151/uc8151.hpp Normal file
View File

@ -0,0 +1,209 @@
#pragma once
#include <initializer_list>
#include "pico/stdlib.h"
#include "hardware/spi.h"
#include "hardware/gpio.h"
#include "../../common/pimoroni_common.hpp"
namespace pimoroni {
class UC8151 {
enum PSR_FLAGS {
RES_96x230 = 0b00000000,
RES_96x252 = 0b01000000,
RES_128x296 = 0b10000000,
RES_160x296 = 0b11000000,
LUT_OTP = 0b00000000,
LUT_REG = 0b00100000,
FORMAT_BWR = 0b00000000,
FORMAT_BW = 0b00010000,
SCAN_DOWN = 0b00000000,
SCAN_UP = 0b00001000,
SHIFT_LEFT = 0b00000000,
SHIFT_RIGHT = 0b00000100,
BOOSTER_OFF = 0b00000000,
BOOSTER_ON = 0b00000010,
RESET_SOFT = 0b00000000,
RESET_NONE = 0b00000001
};
enum PWR_FLAGS_1 {
VDS_EXTERNAL = 0b00000000,
VDS_INTERNAL = 0b00000010,
VDG_EXTERNAL = 0b00000000,
VDG_INTERNAL = 0b00000001
};
enum PWR_FLAGS_2 {
VCOM_VD = 0b00000000,
VCOM_VG = 0b00000100,
VGHL_16V = 0b00000000,
VGHL_15V = 0b00000001,
VGHL_14V = 0b00000010,
VGHL_13V = 0b00000011
};
enum BOOSTER_FLAGS {
START_10MS = 0b00000000,
START_20MS = 0b01000000,
START_30MS = 0b10000000,
START_40MS = 0b11000000,
STRENGTH_1 = 0b00000000,
STRENGTH_2 = 0b00001000,
STRENGTH_3 = 0b00010000,
STRENGTH_4 = 0b00011000,
STRENGTH_5 = 0b00100000,
STRENGTH_6 = 0b00101000,
STRENGTH_7 = 0b00110000,
STRENGTH_8 = 0b00111000,
OFF_0_27US = 0b00000000,
OFF_0_34US = 0b00000001,
OFF_0_40US = 0b00000010,
OFF_0_54US = 0b00000011,
OFF_0_80US = 0b00000100,
OFF_1_54US = 0b00000101,
OFF_3_34US = 0b00000110,
OFF_6_58US = 0b00000111
};
enum PFS_FLAGS {
FRAMES_1 = 0b00000000,
FRAMES_2 = 0b00010000,
FRAMES_3 = 0b00100000,
FRAMES_4 = 0b00110000
};
enum TSE_FLAGS {
TEMP_INTERNAL = 0b00000000,
TEMP_EXTERNAL = 0b10000000,
OFFSET_0 = 0b00000000,
OFFSET_1 = 0b00000001,
OFFSET_2 = 0b00000010,
OFFSET_3 = 0b00000011,
OFFSET_4 = 0b00000100,
OFFSET_5 = 0b00000101,
OFFSET_6 = 0b00000110,
OFFSET_7 = 0b00000111,
OFFSET_MIN_8 = 0b00001000,
OFFSET_MIN_7 = 0b00001001,
OFFSET_MIN_6 = 0b00001010,
OFFSET_MIN_5 = 0b00001011,
OFFSET_MIN_4 = 0b00001100,
OFFSET_MIN_3 = 0b00001101,
OFFSET_MIN_2 = 0b00001110,
OFFSET_MIN_1 = 0b00001111
};
enum PLL_FLAGS {
// other frequency options exist but there doesn't seem to be much
// point in including them - this is a fair range of options...
HZ_29 = 0b00111111,
HZ_33 = 0b00111110,
HZ_40 = 0b00111101,
HZ_50 = 0b00111100,
HZ_67 = 0b00111011,
HZ_100 = 0b00111010,
HZ_200 = 0b00111001
};
//--------------------------------------------------
// Variables
//--------------------------------------------------
private:
// screen properties
uint16_t width;
uint16_t height;
// highest possible resolution is 160x296 which at 1 bit per pixel
// requires 5920 bytes of frame buffer
//uint8_t frame_buffer[5920] = {0};
uint8_t *frame_buffer;
spi_inst_t *spi = PIMORONI_SPI_DEFAULT_INSTANCE;
// interface pins with our standard defaults where appropriate
uint CS = SPI_BG_FRONT_CS;
uint DC = SPI_DEFAULT_MISO;
uint SCK = SPI_DEFAULT_SCK;
uint MOSI = SPI_DEFAULT_MOSI;
uint BUSY = PIN_UNUSED;
uint RESET = PIN_UNUSED;
bool inverted = false;
public:
UC8151(uint16_t width, uint16_t height) :
width(width), height(height), frame_buffer(new uint8_t[width * height / 8]) {
}
UC8151(uint16_t width, uint16_t height, uint8_t *frame_buffer) :
width(width), height(height), frame_buffer(frame_buffer) {
}
UC8151(uint16_t width, uint16_t height,
spi_inst_t *spi,
uint CS, uint DC, uint SCK, uint MOSI,
uint BUSY = PIN_UNUSED, uint RESET = PIN_UNUSED) :
width(width), height(height),
frame_buffer(new uint8_t[width * height / 8]),
spi(spi),
CS(CS), DC(DC), SCK(SCK), MOSI(MOSI), BUSY(BUSY), RESET(RESET) {}
UC8151(uint16_t width, uint16_t height,
uint8_t *frame_buffer,
spi_inst_t *spi,
uint CS, uint DC, uint SCK, uint MOSI,
uint BUSY = PIN_UNUSED, uint RESET = PIN_UNUSED) :
width(width), height(height),
frame_buffer(frame_buffer),
spi(spi),
CS(CS), DC(DC), SCK(SCK), MOSI(MOSI), BUSY(BUSY), RESET(RESET) {}
//--------------------------------------------------
// Methods
//--------------------------------------------------
public:
void init();
void busy_wait();
bool is_busy();
void reset();
void setup(uint8_t speed=0);
void power_off();
void default_luts();
void medium_luts();
void fast_luts();
void turbo_luts();
void read(uint8_t reg, size_t len, uint8_t *data);
void command(uint8_t reg, size_t len, const uint8_t *data);
void command(uint8_t reg, std::initializer_list<uint8_t> values);
void command(uint8_t reg) {command(reg, 0, nullptr);};
void data(size_t len, const uint8_t *data);
void invert(bool invert);
void update_speed(uint8_t speed);
void update(bool blocking = true);
void partial_update(int x, int y, int w, int h, bool blocking = true);
void off();
void pixel(int x, int y, int v);
};
}

View File

@ -38,4 +38,5 @@ add_subdirectory(pico_audio)
add_subdirectory(pico_wireless)
add_subdirectory(plasma2040)
add_subdirectory(badger2040)
add_subdirectory(interstate75)

View File

@ -0,0 +1,4 @@
include(badger2040_drawing.cmake)
include(badger2040_fonts.cmake)
include(badger2040_sleep.cmake)
include(badger2040_image.cmake)

View File

@ -0,0 +1,12 @@
set(OUTPUT_NAME badger2040_drawing)
add_executable(${OUTPUT_NAME} badger2040_drawing.cpp)
target_link_libraries(${OUTPUT_NAME}
badger2040
hardware_spi
)
# enable usb output
pico_enable_stdio_usb(${OUTPUT_NAME} 1)
pico_add_extra_outputs(${OUTPUT_NAME})

View File

@ -0,0 +1,34 @@
#include "pico/stdlib.h"
#include <stdio.h>
#include <cstring>
#include <string>
#include <algorithm>
#include "pico/time.h"
#include "pico/platform.h"
#include "common/pimoroni_common.hpp"
#include "badger2040.hpp"
using namespace pimoroni;
Badger2040 badger;
uint32_t time() {
absolute_time_t t = get_absolute_time();
return to_ms_since_boot(t);
}
int main() {
stdio_init_all();
sleep_ms(500);
printf("\n\n=======\nbadger2040 starting up\n\n");
badger.init();
while(true) {
// TODO: draw something interesting...
}
}

View File

@ -0,0 +1,12 @@
set(OUTPUT_NAME badger2040_fonts)
add_executable(${OUTPUT_NAME} badger2040_fonts.cpp)
target_link_libraries(${OUTPUT_NAME}
badger2040
hardware_spi
)
# enable usb output
pico_enable_stdio_usb(${OUTPUT_NAME} 1)
pico_add_extra_outputs(${OUTPUT_NAME})

View File

@ -0,0 +1,105 @@
#include "pico/stdlib.h"
#include <stdio.h>
#include <cstring>
#include <string>
#include <algorithm>
#include "pico/time.h"
#include "pico/platform.h"
#include "common/pimoroni_common.hpp"
#include "badger2040.hpp"
using namespace pimoroni;
Badger2040 badger;
uint32_t time() {
absolute_time_t t = get_absolute_time();
return to_ms_since_boot(t);
}
std::array<std::string, 8> font_names = {
"sans", "sans_bold", "gothic", "cursive",
"cursive_bold", "serif", "serif_bold", "serif_italic"
};
int8_t selected_font = 0;
void draw() {
badger.pen(15);
badger.clear();
badger.font("sans");
for(int i = 0; i < int(font_names.size()); i++) {
std::string name = font_names[i];
if(selected_font == i) {
badger.pen(0);
badger.rectangle(0, i * 16, 80, 16);
badger.pen(15);
}else{
badger.pen(0);
}
badger.text(name, 2, i * 16 + 7, 0.4f);
}
badger.font(font_names[selected_font]);
badger.thickness(2);
badger.text("The quick", 90, 10, 0.80f);
badger.text("brown fox", 90, 32, 0.80f);
badger.text("jumped over", 90, 54, 0.80f);
badger.text("the lazy dog.", 90, 76, 0.80f);
badger.text("0123456789", 90, 98, 0.80f);
badger.text("!\"£$%^&*()", 90, 120, 0.80f);
badger.thickness(1);
badger.update();
}
int main() {
stdio_init_all();
sleep_ms(500);
printf("\n\n=======\nbadger2040 starting up\n\n");
badger.init();
badger.update_speed(1);
uint32_t i = 0;
while(true) {
printf("> drawing..");
draw();
printf("done!\n");
printf("> waiting for a button press..");
badger.wait_for_press();
printf("done!\n");
if(badger.pressed(badger.DOWN)) {
printf("> down pressed\n");
selected_font++;
}
if(badger.pressed(badger.UP)) {
printf("> up pressed\n");
selected_font--;
}
if(badger.pressed(badger.C)) {
printf("> C pressed\n");
badger.halt();
}
selected_font = selected_font < 0 ? int(font_names.size()) - 1 : selected_font;
selected_font = selected_font >= int(font_names.size()) ? 0 : selected_font;
printf("> newly selected font is %s (%d)\n", font_names[selected_font].c_str(), selected_font);
i++;
}
}

View File

@ -0,0 +1,12 @@
set(OUTPUT_NAME badger2040_image)
add_executable(${OUTPUT_NAME} badger2040_image.cpp)
target_link_libraries(${OUTPUT_NAME}
badger2040
hardware_spi
)
# enable usb output
pico_enable_stdio_usb(${OUTPUT_NAME} 1)
pico_add_extra_outputs(${OUTPUT_NAME})

View File

@ -0,0 +1,61 @@
#include "pico/stdlib.h"
#include <stdio.h>
#include <cstring>
#include <string>
#include <algorithm>
#include "pico/time.h"
#include "pico/platform.h"
#include "common/pimoroni_common.hpp"
#include "badger2040.hpp"
#include "badger2040_image_demo_images.hpp"
using namespace pimoroni;
Badger2040 badger;
// uint32_t time() {
// absolute_time_t t = get_absolute_time();
// return to_ms_since_boot(t);
// }
int main() {
stdio_init_all();
sleep_ms(20);
printf("\n\n=======\nbadger2040 starting up\n\n");
badger.init();
if(badger.pressed_to_wake(badger.A)) {
printf("> A pressed\n");
badger.image(shaun);
}
else if(badger.pressed_to_wake(badger.B)) {
printf("> B pressed\n");
badger.image(paul);
}
else if(badger.pressed_to_wake(badger.C)) {
printf("> C pressed\n");
badger.image(adam);
}
else {
printf("> No A/B/C key pressed\n");
badger.pen(15);
badger.clear();
badger.pen(0);
badger.font("sans");
badger.text("Press A, B, or C", 15, 65, 1.0f);
}
badger.update();
badger.halt();
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,12 @@
set(OUTPUT_NAME badger2040_sleep)
add_executable(${OUTPUT_NAME} badger2040_sleep.cpp)
target_link_libraries(${OUTPUT_NAME}
badger2040
hardware_spi
)
# enable usb output
pico_enable_stdio_usb(${OUTPUT_NAME} 1)
pico_add_extra_outputs(${OUTPUT_NAME})

View File

@ -0,0 +1,61 @@
#include "pico/stdlib.h"
#include <stdio.h>
#include <cstring>
#include <string>
#include <algorithm>
#include "pico/time.h"
#include "pico/platform.h"
#include "common/pimoroni_common.hpp"
#include "badger2040.hpp"
using namespace pimoroni;
// this simple example tells you which button was used to wake up
// Badger2040 and then immediately halts again on another button press
Badger2040 badger;
int main() {
badger.init();
// find which button was used to wake up
std::string button = "";
std::string message = "started up.";
if(badger.pressed_to_wake(badger.A)) { button += "A"; }
if(badger.pressed_to_wake(badger.B)) { button += "B"; }
if(badger.pressed_to_wake(badger.C)) { button += "C"; }
if(badger.pressed_to_wake(badger.D)) { button += "D"; }
if(badger.pressed_to_wake(badger.E)) { button += "E"; }
if(button != "") {
message = "woken up by button " + button + ".";
}
badger.thickness(2);
badger.pen(15);
badger.clear();
badger.pen(0);
badger.text(message, 10, 20, 0.6f);
badger.text("(press any button to go to sleep.)", 10, 70, 0.4f);
badger.update();
badger.wait_for_press();
badger.pen(15);
badger.clear();
badger.pen(0);
badger.text("going back to sleep...", 10, 20, 0.6f);
badger.text("z", 220, 50, 0.6f);
badger.text("z", 230, 40, 0.8f);
badger.text("z", 240, 30, 1.0f);
badger.text("(press any button to wake up.)", 10, 70, 0.4f);
badger.update();
badger.halt();
// proof we halted, the LED will not turn on
badger.led(255);
}

View File

@ -0,0 +1,16 @@
# Hershey font converter
This is the tool that was used to create the fonts.hpp file that is included
in the Badger2040 library. It is included in case you want to convert other
Hershey fonts - we only include a subset to keep the flash image to a
reasonable size.
It takes in `.jhf` files (which can be found in the `fonts` directory) and
converts them into C++ arrays and structures that can be embedded directly
into your code.
Credit to Paul Bourke for another fantastic file format guide which provided a
lot of the necessary detail to make this work - read more about how the
Hershey fonts work at http://paulbourke.net/dataformats/hershey/. While you're
there make sure to check out some of his other file format guides, they are
a wealth of useful information.

View File

@ -0,0 +1,158 @@
#!/usr/bin/env python3
# converts Hershey fonts into a format easier to consume by the Badger2040
# e-ink badge library - the result can be piped directly into a .hpp file.
import argparse, sys, os, glob
from pathlib import Path
parser = argparse.ArgumentParser(
description='Converts Hershey fonts into the format used by Badger2040.')
parser.add_argument('file', nargs="+", help='input files to convert')
options = None
try:
options = parser.parse_args()
except:
parser.print_help()
sys.exit(0)
def convert_font(data):
# parse hershey font data file, the file format contains one record per
# character with the format:
#
# 2761 8MXP[OZPYQZQ[P]N_
#
# first 5 characters: represent the character id (or a dummy value
# of 12345). if it is a character id then a separate file contains the
# mapping information to convert that into an ascii table entry. if all of
# the ids are 12345 then it seems that the files contain 95 entries that
# start from ascii character 32 (space) in order
#
# next 3 characters: number of vertices (including special left/right
# bounds value)
#
# next 2 characters: represent the "left" and "right" offsets for this
# character, to convert you must subtract 'R' from them. this pair counts
# as the first "vertex"
#
# subsequent pairs of characters: represent each vertex, as before converted
# into numbers by subtracting 'R'. there are vertex count (-1) of these
#
# note! within the vertex data can be extra newline characters which must
# be ignored.
vertex_data = []
char_data = {}
auto_char_code = 0
# we'll loop, extracting one character per iteration, until all of the
# data is consumed
while(len(data) > 0):
# extract character id
char_id = int(data[0:5])
char_code = auto_char_code
auto_char_code += 1
# extract vertex count
vertex_count = int(data[5:8])
vertex_count -= 1 # remove one for the bounds data
# extract bounds
left = ord(data[8:9]) - ord("R")
right = ord(data[9:10]) - ord("R")
char_data[char_code] = {
"width": right - left,
"vertex_count": vertex_count,
"first_vertex_offset": len(vertex_data)
}
# work out expected total length of character data
char_data_len = 10 + (vertex_count * 2)
# if there are any newlines within this data then remove them before we
# move on the parse the vertices
while data.find('\n', char_data_len) != -1:
data = data.replace('\n', '', 1)
for i in range(0, vertex_count):
offset = 10 + (i * 2)
if data[offset:offset + 2] == " R":
# pen up for one
x = -128
y = -128
else:
x = ord(data[offset + 0:offset + 1]) - ord("R") - left
y = ord(data[offset + 1:offset + 2]) - ord("R")
vertex_data.append(str(x))
vertex_data.append(str(y))
data = data[char_data_len:]
font_name = Path(input_filename).stem
# create code for all of the vertices
vertex_code = '''\
static const int8_t {font_name}_vertices[{count}] = {{
{vertices}
}};
'''.format(font_name=font_name, count=len(vertex_data), vertices=", ".join(vertex_data))
# create code for chars and font
#
# struct hershey_font_glyph_t {
# uint32_t width; // character width
# uint32_t vertex_count; // number of vertices
# int8_t *vertices; // vertex data (indices: even = x, odd = y)
# };
chars = []
for i in range(0, 95):
if i in char_data:
chars.append(
" {{.width={width}, .vertex_count={vertex_count}, .vertices=&{font_name}_vertices[{offset}]}}".format(
width=char_data[i]["width"],
vertex_count=char_data[i]["vertex_count"],
font_name=font_name,
offset=char_data[i]["first_vertex_offset"]
))
else:
chars.append(" {.width=0, .vertex_count=0, .vertices=nullptr}")
# struct hershey_font_t {
# hershey_font_glyph_t chars[95];
# };
font_code = '''\
static const hershey_font_t {font_name} {{
.chars = {{
{chars}
}}
}};
'''.format(font_name=font_name, chars=",\n".join(chars))
print(vertex_code)
print(font_code)
return """ {{ \"{font_name}\", &{font_name} }}""".format(font_name=font_name)
# create map of font name to font structure
font_list = []
for input_filename in options.file:
input_file = open(input_filename, mode='r')
data = input_file.read()
input_file.close()
font_list.append(convert_font(data))
map_code = '''\
std::map<std::string, const hershey_font_t*> fonts = {{
{font_list}
}};
'''.format(font_list=",\n".join(font_list))
print(map_code)

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,101 @@
12345 1JZ
12345 9MWRFRT RRYQZR[SZRY
12345 6JZNFNM RVFVM
12345 12H]SBLb RYBRb RLOZO RKUYU
12345 27H\PBP_ RTBT_ RYIWGTFPFMGKIKKLMMNOOUQWRXSYUYXWZT[P[MZKX
12345 32F^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWT
12345 35E_\O\N[MZMYNXPVUTXRZP[L[JZIYHWHUISJRQNRMSKSIRGPFNGMIMKNNPQUXWZY[
[[\Z\Y
12345 8MWRHQGRFSGSIRKQL
12345 11KYVBTDRGPKOPOTPYR]T`Vb
12345 11KYNBPDRGTKUPUTTYR]P`Nb
12345 9JZRLRX RMOWU RWOMU
12345 6E_RIR[ RIR[R
12345 8NVSWRXQWRVSWSYQ[
12345 3E_IR[R
12345 6NVRVQWRXSWRV
12345 3G][BIb
12345 18H\QFNGLJKOKRLWNZQ[S[VZXWYRYOXJVGSFQF
12345 5H\NJPISFS[
12345 15H\LKLJMHNGPFTFVGWHXJXLWNUQK[Y[
12345 16H\MFXFRNUNWOXPYSYUXXVZS[P[MZLYKW
12345 7H\UFKTZT RUFU[
12345 18H\WFMFLOMNPMSMVNXPYSYUXXVZS[P[MZLYKW
12345 24H\XIWGTFRFOGMJLOLTMXOZR[S[VZXXYUYTXQVOSNRNOOMQLT
12345 6H\YFO[ RKFYF
12345 30H\PFMGLILKMMONSOVPXRYTYWXYWZT[P[MZLYKWKTLRNPQOUNWMXKXIWGTFPF
12345 24H\XMWPURRSQSNRLPKMKLLINGQFRFUGWIXMXRWWUZR[P[MZLX
12345 12NVROQPRQSPRO RRVQWRXSWRV
12345 14NVROQPRQSPRO RSWRXQWRVSWSYQ[
12345 4F^ZIJRZ[
12345 6E_IO[O RIU[U
12345 4F^JIZRJ[
12345 21I[LKLJMHNGPFTFVGWHXJXLWNVORQRT RRYQZR[SZRY
12345 56E`WNVLTKQKOLNMMPMSNUPVSVUUVS RQKOMNPNSOUPV RWKVSVUXVZV\T]Q]O\L[J
YHWGTFQFNGLHJJILHOHRIUJWLYNZQ[T[WZYYZX RXKWSWUXV
12345 9I[RFJ[ RRFZ[ RMTWT
12345 24G\KFK[ RKFTFWGXHYJYLXNWOTP RKPTPWQXRYTYWXYWZT[K[
12345 19H]ZKYIWGUFQFOGMILKKNKSLVMXOZQ[U[WZYXZV
12345 16G\KFK[ RKFRFUGWIXKYNYSXVWXUZR[K[
12345 12H[LFL[ RLFYF RLPTP RL[Y[
12345 9HZLFL[ RLFYF RLPTP
12345 23H]ZKYIWGUFQFOGMILKKNKSLVMXOZQ[U[WZYXZVZS RUSZS
12345 9G]KFK[ RYFY[ RKPYP
12345 3NVRFR[
12345 11JZVFVVUYTZR[P[NZMYLVLT
12345 9G\KFK[ RYFKT RPOY[
12345 6HYLFL[ RL[X[
12345 12F^JFJ[ RJFR[ RZFR[ RZFZ[
12345 9G]KFK[ RKFY[ RYFY[
12345 22G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF
12345 14G\KFK[ RKFTFWGXHYJYMXOWPTQKQ
12345 25G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RSWY]
12345 17G\KFK[ RKFTFWGXHYJYLXNWOTPKP RRPY[
12345 21H\YIWGTFPFMGKIKKLMMNOOUQWRXSYUYXWZT[P[MZKX
12345 6JZRFR[ RKFYF
12345 11G]KFKULXNZQ[S[VZXXYUYF
12345 6I[JFR[ RZFR[
12345 12F^HFM[ RRFM[ RRFW[ R\FW[
12345 6H\KFY[ RYFK[
12345 7I[JFRPR[ RZFRP
12345 9H\YFK[ RKFYF RK[Y[
12345 12KYOBOb RPBPb ROBVB RObVb
12345 3KYKFY^
12345 12KYTBTb RUBUb RNBUB RNbUb
12345 6JZRDJR RRDZR
12345 3I[Ib[b
12345 8NVSKQMQORPSORNQO
12345 18I\XMX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX
12345 18H[LFL[ RLPNNPMSMUNWPXSXUWXUZS[P[NZLX
12345 15I[XPVNTMQMONMPLSLUMXOZQ[T[VZXX
12345 18I\XFX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX
12345 18I[LSXSXQWOVNTMQMONMPLSLUMXOZQ[T[VZXX
12345 9MYWFUFSGRJR[ ROMVM
12345 23I\XMX]W`VaTbQbOa RXPVNTMQMONMPLSLUMXOZQ[T[VZXX
12345 11I\MFM[ RMQPNRMUMWNXQX[
12345 9NVQFRGSFREQF RRMR[
12345 12MWRFSGTFSERF RSMS^RaPbNb
12345 9IZMFM[ RWMMW RQSX[
12345 3NVRFR[
12345 19CaGMG[ RGQJNLMOMQNRQR[ RRQUNWMZM\N]Q][
12345 11I\MMM[ RMQPNRMUMWNXQX[
12345 18I\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM
12345 18H[LMLb RLPNNPMSMUNWPXSXUWXUZS[P[NZLX
12345 18I\XMXb RXPVNTMQMONMPLSLUMXOZQ[T[VZXX
12345 9KXOMO[ ROSPPRNTMWM
12345 18J[XPWNTMQMNNMPNRPSUTWUXWXXWZT[Q[NZMX
12345 9MYRFRWSZU[W[ ROMVM
12345 11I\MMMWNZP[S[UZXW RXMX[
12345 6JZLMR[ RXMR[
12345 12G]JMN[ RRMN[ RRMV[ RZMV[
12345 6J[MMX[ RXMM[
12345 10JZLMR[ RXMR[P_NaLbKb
12345 9J[XMM[ RMMXM RM[X[
12345 40KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSU
SWRYQZP\P^Q`RaTb
12345 3NVRBRb
12345 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQU
QWRYSZT\T^S`RaPb
12345 24F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O
12345 35JZJFJ[K[KFLFL[M[MFNFN[O[OFPFP[Q[QFRFR[S[SFTFT[U[UFVFV[W[WFXFX[Y[
YFZFZ[

View File

@ -0,0 +1,127 @@
12345 1JZ
12345 24MXRFRTST RRFSFST RRXQYQZR[S[TZTYSXRX RRYRZSZSYRY
12345 22I[NFMGMM RNGMM RNFOGMM RWFVGVM RWGVM RWFXGVM
12345 12H]SBLb RYBRb RLOZO RKUYU
12345 51I\RBR_S_ RRBSBS_ RWIYIWGTFQFNGLILKMMNNVRWSXUXWWYTZQZOYNX RWIVHTG
QGNHMIMKNMVQXSYUYWXYWZT[Q[NZLXNX RXXUZ
12345 32F^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWT
12345 49F_[NZO[P\O\N[MZMYNXPVUTXRZP[M[JZIXIUJSPORMSKSIRGPFNGMIMKNNPQUXWZ
Z[[[\Z\Y RM[KZJXJUKSMQ RMKNMVXXZZ[
12345 11NWSFRGRM RSGRM RSFTGRM
12345 20KYVBTDRGPKOPOTPYR]T`Vb RTDRHQKPPPTQYR\T`
12345 20KYNBPDRGTKUPUTTYR]P`Nb RPDRHSKTPTTSYR\P`
12345 39JZRFQGSQRR RRFRR RRFSGQQRR RMINIVOWO RMIWO RMIMJWNWO RWIVINOMO R
WIMO RWIWJMNMO
12345 16F_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R
12345 24MXTZS[R[QZQYRXSXTYT\S^Q_ RRYRZSZSYRY RS[T\ RTZS^
12345 3E_IR[R
12345 16MXRXQYQZR[S[TZTYSXRX RRYRZSZSYRY
12345 8G^[BIbJb R[B\BJb
12345 42H\QFNGLJKOKRLWNZQ[S[VZXWYRYOXJVGSFQF ROGMJLOLRMWOZ RNYQZSZVY RUZ
WWXRXOWJUG RVHSGQGNH
12345 12H\NJPISFS[ RNJNKPJRHR[S[
12345 34H\LKLJMHNGPFTFVGWHXJXLW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YJYMXOWPUQMQ RMGUGWHXJXMWOUPMP
12345 48G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RQGNHLKKNKSLVNYQZSZ
VYXVYSYNXKVHSGQG RSXX]Y] RSXTXY]
12345 34H\LFL[ RMGM[L[ RLFTFWGXHYJYMXOWPTQMQ RMGTGWHXJXMWOTPMP RRQX[Y[ R
SQY[
12345 43H\YIWGTFPFMGKIKKLMMNOOTQVRWSXUXXWYTZPZNYMXKX RYIWIVHTGPGMHLILKMM
ONTPVQXSYUYXWZT[P[MZKX
12345 15J[RGR[ RSGS[R[ RLFYFYG RLFLGYG
12345 24G]KFKULXNZQ[S[VZXXYUYF RKFLFLUMXNYQZSZVYWXXUXFYF
12345 14H\JFR[ RJFKFRX RZFYFRX RZFR[
12345 26E_GFM[ RGFHFMX RRFMX RRIM[ RRIW[ RRFWX R]F\FWX R]FW[
12345 16H\KFX[Y[ RKFLFY[ RYFXFK[ RYFL[K[
12345 17I\KFRPR[S[ RKFLFSP RZFYFRP RZFSPS[
12345 20H\XFK[ RYFL[ RKFYF RKFKGXG RLZYZY[ RK[Y[
12345 12KYOBOb RPBPb ROBVB RObVb
12345 3KYKFY^
12345 12KYTBTb RUBUb RNBUB RNbUb
12345 8G]JTROZT RJTRPZT
12345 3H\Hb\b
12345 7LXPFUL RPFOGUL
12345 36H\WMW[X[ RWMXMX[ RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMX
NYPZSZWX
12345 36H\LFL[M[ RLFMFM[ RMPONQMTMVNXPYSYUXXVZT[Q[OZMX RMPQNTNVOWPXSXUWX
VYTZQZMX
12345 32I[XPVNTMQMONMPLSLUMXOZQ[T[VZXX RXPWQVOTNQNOONPMSMUNXOYQZTZVYWWXX
12345 36H\WFW[X[ RWFXFX[ RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMX
NYPZSZWX
12345 36I[MTXTXQWOVNTMQMONMPLSLUMXOZQ[T[VZXX RMSWSWQVOTNQNOONPMSMUNXOYQZ
TZVYWWXX
12345 24LZWFUFSGRJR[S[ RWFWGUGSH RTGSJS[ ROMVMVN ROMONVN
12345 48H\XMWMW\V_U`SaQaO`N_L_ RXMX\W_UaSbPbNaL_ RWPUNSMPMNNLPKSKULXNZP[
S[UZWX RWPSNPNNOMPLSLUMXNYPZSZWX
12345 25H\LFL[M[ RLFMFM[ RMQPNRMUMWNXQX[ RMQPORNTNVOWQW[X[
12345 24NWRFQGQHRISITHTGSFRF RRGRHSHSGRG RRMR[S[ RRMSMS[
12345 24NWRFQGQHRISITHTGSFRF RRGRHSHSGRG RRMRbSb RRMSMSb
12345 22H[LFL[M[ RLFMFM[ RXMWMMW RXMMX RPTV[X[ RQSX[
12345 8NWRFR[S[ RRFSFS[
12345 42CbGMG[H[ RGMHMH[ RHQKNMMPMRNSQS[ RHQKOMNONQORQR[S[ RSQVNXM[M]N^Q
^[ RSQVOXNZN\O]Q][^[
12345 25H\LML[M[ RLMMMM[ RMQPNRMUMWNXQX[ RMQPORNTNVOWQW[X[
12345 36I\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM RQNOONPMSMUNXOYQZTZVYWXXUXS
WPVOTNQN
12345 36H\LMLbMb RLMMMMb RMPONQMTMVNXPYSYUXXVZT[Q[OZMX RMPQNTNVOWPXSXUWX
VYTZQZMX
12345 36H\WMWbXb RWMXMXb RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMX
NYPZSZWX
12345 21KYOMO[P[ ROMPMP[ RPSQPSNUMXM RPSQQSOUNXNXM
12345 50J[XPWNTMQMNNMPNRPSUUWV RVUWWWXVZ RWYTZQZNY ROZNXMX RXPWPVN RWOTN
QNNO RONNPOR RNQPRUTWUXWXXWZT[Q[NZMX
12345 16MXRFR[S[ RRFSFS[ ROMVMVN ROMONVN
12345 25H\LMLWMZO[R[TZWW RLMMMMWNYPZRZTYWW RWMW[X[ RWMXMX[
12345 14JZLMR[ RLMMMRY RXMWMRY RXMR[
12345 26F^IMN[ RIMJMNX RRMNX RRPN[ RRPV[ RRMVX R[MZMVX R[MV[
12345 16I[LMW[X[ RLMMMX[ RXMWML[ RXMM[L[
12345 17JZLMR[ RLMMMRY RXMWMRYNb RXMR[ObNb
12345 20I[VNL[ RXMNZ RLMXM RLMLNVN RNZXZX[ RL[X[
12345 4KYUBNRUb
12345 3NVRBRb
12345 4KYOBVROb
12345 24F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O
12345 35JZJFJ[K[KFLFL[M[MFNFN[O[OFPFP[Q[QFRFR[S[SFTFT[U[UFVFV[W[WFXFX[Y[
YFZFZ[

View File

@ -0,0 +1,96 @@
3699 1JZ
3714 30LXRFQGOHQIRT RRISHRGQHRIRT RRFSGUHSIRT RRXPZR[TZRX RRYQZSZRY
3728 22I[NFMGMM RNGMM RNFOGMM RWFVGVM RWGVM RWFXGVM
2275 12H]SFLb RYFRb RLQZQ RKWYW
3719 60H\PBP_ RTBT_ RTFVGWIWKYJXHWGTFPFMGKIKLLNOPURWSXUXXWZ RXJWH RLLMNOOUQWRXT RMYLW RMGLILKMMONUPXRYTYWXYWZT[P[MZLYKWMVMXNZP[
2271 32F^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWT
3718 62E_YNZO[O\N RXOYP[P RXPYQZQ[P\N RYNST RRUL[HVNP ROOSKOFJLPRTXVZX[Z[[Z\X RLZIV RRKOG RKLPQTWVYXZ[Z RMZIU RRLNG RKKQQUWVXXY[Y\X
3717 14LXRLRJPHRFSHSJRLPM RRGQHRIRG
3721 27KYUBSDQGOKNPNTOYQ]S`Ub RQHPKOOOUPYQ\ RSDRFQIPOPUQ[R^S`
3722 27KYOBQDSGUKVPVTUYS]Q`Ob RSHTKUOUUTYS\ RQDRFSITOTUS[R^Q`
3723 39JZRFQGSQRR RRFRR RRFSGQQRR RMINIVOWO RMIWO RMIMJWNWO RWIVINOMO RWIMO RWIWJMNMO
3725 16F_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R
3711 14LXR^R\PZRXSZS\R^P_ RRYQZR[RY
3724 8F_JQ[Q[R RJQJR[R
3710 11LXRXPZR[TZRX RRYQZSZRY
3720 8G^[BIbJb R[B\BJb
3700 42H\LHLXJY RMIMXPZ RNHNXPYQZ RLHNHSGUF RSGTHVIVY RTGWIWX RUFVGXHZHXIXY RJYLYNZO[QZVYXY
3701 27H\OHPIQKQXOY RQIPHQGRIRYTZ ROHRFSHSXUYVY ROYPYRZS[TZVY
3702 48H\LHNHPGQFSGVHXH RPHRG RLHNIPIRHSG RVHVP RWIWO RXHXPQPNQLSKVK[ RK[OYSXVXZY RNZQYVYYZ RK[PZUZX[ZY
3703 57H\LHMHOGPFRGVHXH ROHQG RLHNIPIRG RVHVO RWIWN RXHXOVOSPQQ RQPSQVRXRXY RWSWX RVRVY RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY
3704 41H\UFKPKUTU RVUZU[V[TZU RLPLT RMNMU RTGTXRY RUJVHUGUYWZ RUFWHVJVXXYYY RRYSYUZV[WZYY
3705 53H\LFLO RLFXF RMGVG RLHUHWGXF RVLUMSNOOLO RSNTNVOVY RUMWNWX RVLWMYNZNXOXY RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY
3706 59H\LHLXJY RMIMXPZ RNHNXPYQZ RLHNHRGTFUGWHXH RSGUH RRGTIVIXH RNPOPSOUNVM RSOTOVPVY RUNWPWX RVMWNYOZOXPXY RJYLYNZO[QZVYXY
3707 38H\KHMFPGUGZF RLGOHTHWG RKHOIRIVHZF RZFYHWKSOQRPUPXQ[ RRQQTQWRZ RUMSPRSRVSYQ[
3708 71H\LILO RMJMN RNINO RLINISHUGVF RSHTHVIVO RUGWHWN RVFWGYHZHXIXO RLONOVRXR RXOVONRLR RLRLXJY RMSMXPZ RNRNXPYQZ RVRVY RWSWX RXRXY RJYLYNZO[QZVYXY
3709 60H\LHLQJR RMIMROS RNHNQPRQR RLHNHSGUF RSGTHVIVY RTGWIWX RUFVGXHZHXIXY RJRKRMSNTOSQRUQVQ RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY
3712 22LXRMPORPTORM RRNQOSORN RRXPZR[TZRX RRYQZSZRY
3713 25LXRMPORPTORM RRNQOSORN RR^R\PZRXSZS\R^P_ RRYQZR[RY
2241 4F^ZIJRZ[
3726 16F_JM[M[N RJMJN[N RJU[U[V RJUJV[V
2242 4F^JIZRJ[
3715 51I[LJMHNGQFSFVGWHXJXLWNUPSQ RMJNH RVHWIWMVN RLJNKNIOGQF RSFUGVIVMUOSQ RRQRTSQQQRT RRXPZR[TZRX RRYQZSZRY
2273 56E`WNVLTKQKOLNMMPMSNUPVSVUUVS RQKOMNPNSOUPV RWKVSVUXVZV\T]Q]O\L[JYHWGTFQFNGLHJJILHOHRIUJWLYNZQ[T[WZYYZX RXKWSWUXV
3501 60G]LINGPFRFSGZW[X]X RQGRHYXZZ[YYX RNGPGQHXXYZZ[[[]X RLMMLOKPKQL RPLPM RMLOLPN RG[IYKXNXPY RJYNYOZ RG[JZMZN[PY RRJLX RNSVS
3502110F^HHJFMFOGQF RKGNG RHHJGLHOHQF RMKLLKNKOIOHPHRIQKQKW RLMLU RIPLP RMKMTLVKW RRIQJPLPU RQKQS RRIRRQTPU RRIXFZG[I[KYMUO RXGZIZK RVGXHYIYLWN RWNZP[R[X RYPZRZW RWNXOYQYX RJ[MYPXTXWY RLZOYTYVZ RJ[NZSZU[WYYX[X RUOUX RURYR RUUYU
3503 69E]NGLHJJILHOHSIVJXMZP[S[VZXYZW[U RJKINISKWNYQZTZWY RNGLIKKJNJRKUNXQYTYWXYW[U RPJPV RQJQT RRIRSQUPV RPJRIUFWGYGZF RTGVHXH RSHUIWIYHZF RWIWX
3504 72G^IFWFYGZIZX RKGWGYIYW RIFJGLHWHXIXX ROKNLMNMOKOJPJRKQMQMV RNMNT RKPNP ROKOSNUMV RI[LY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IYW RWHXIXX RRJRX RRMTNVNXM RRSTRVRXS
3523 95E`HFIGJIJOHOGPGRHQJQJXHY RJHKJKX RHPKP RLYNYPZ RHFJGKHLJLXOXQY RHYKYNZO[QYTXVYW[YY\X ROHRFTHTXWXYY RRGSHSX ROHQHRIRXQY RWYXZ RWHZF\H\X RZG[H[X RWHYHZIZXYY ROHOX RWHWX RONRN RORRR RWNZN RWRZR
3524 65G]HIJGLFNFOGWYXZZZ RMGNHVYWZ RJGLGMHUZV[X[ZZ\X RWFYG[G\F RWGXHZH RVHWIYI[H\F RH[IYKXMXNY RJYLYMZ RH[IZKZM[ RWFSO RQRM[ RLPPP RSPXP
3525 86G^JFKGLILOJOIPIRJQLQLXJY RLHMJMX RJPMP RNYQYSZ RJFLGMHNJNXRXUY RJYMYPZR[UYXX RRJUIWHYFZG\HZIZ^Y`WbUaQ`L` RYIZHYGXHYIYY RWHXIXXZ[ RXaV`S` RY`V_P_L` RRJRX RRMTNVNXM RRSTRVRXS
3526 57H\XGWIROOSMWJ[ RVKNV RZFWJUNRRMXLZ RJHLFOGUGZF RKGOHSHWG RJHNIRIVHXG RLZNYRXVXZY RMZQYUYYZ RJ[OZUZX[ZY RMPQP RTPXP
2223 12KYOBOb RPBPb ROBVB RObVb
804 3KYKFY^
2224 12KYTBTb RUBUb RNBUB RNbUb
2262 11JZPLRITL RMORJWO RRJR[
999 3JZJ]Z]
3716 14LXTFRGQIQKRMTKRIRG RRJRLSKRJ
3601 53J[PRNTMVMXNZP[RYUX RMVNXOYQZ RNTNVOXQYRY RNPPPSOUNVMXOWPWXXYYY RONNOQO RTOWOVNVYWZ RMOOMPNROUPUYW[YY RMORT
3602 44I[LHMJMXKY RNJMHNGNXQZ RLHOFOXQYRZ RKYMYOZP[RZUYWY ROPROTNUMVNXOYOWPWY RTNVOVX RROSOUPUY
3603 35JXNONXLYMYOZP[ ROOOYQZ RPOPXRYSYQZP[ RNORNTMUNWOXO RSNTOVO RPORNTPVPXO
3604 41IZRMPNM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OQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSU
SWRYQZP\P^Q`RaTb
723 3NVRBRb
2226 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQU
QWRYSZT\T^S`RaPb
2246 24F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O
718 14KYQFOGNINKOMQNSNUMVKVIUGSFQF

View File

@ -0,0 +1,131 @@
12345 1JZ
12345 17MXUFTGRS RUGRS RUFVGRS RPYOZP[QZPY
12345 12I[PFNM RQFNM RYFWM RZFWM
12345 12H]SBLb RYBRb RLOZO RKUYU
12345 41H]TBL_ RYBQ_ RZJYKZL[K[JZHYGVFRFOGMIMKNMONVRXT RMKOMVQWRXTXWWYVZ
S[O[LZKYJWJVKULVKW
12345 32F^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWT
12345 49F_[NZO[P\O\N[MZMYNXPVUTXRZP[M[JZIXIUJSPORMSKSIRGPFNGMIMKNNPQUXWZ
Z[[[\Z\Y RM[KZJXJUKSMQ RMKNMVXXZZ[
12345 6NWUFSM RVFSM
12345 20KZZBVESHQKOONTNXO]P`Qb RVESIQMPPOUOZP_Qb
12345 20JYSBTDUGVLVPUUSYQ\N_Jb RSBTEUJUOTTSWQ[N_
12345 9JZRLRX RMOWU RWOMU
12345 6E_RIR[ RIR[R
12345 8MXP[OZPYQZQ[P]N_
12345 3E_IR[R
12345 6MXPYOZP[QZPY
12345 3G][BIb
12345 42H]TFQGOIMLLOKSKVLYMZO[Q[TZVXXUYRZNZKYHXGVFTF RTFRGPINLMOLSLVMYO[
RQ[SZUXWUXRYNYKXHVF
12345 15H]TJO[ RVFP[ RVFSIPKNL RUIQKNL
12345 42H]OJPKOLNKNJOHPGSFVFYGZIZKYMWOTQPSMUKWI[ RVFXGYIYKXMVOPS RJYKXMX
RZUZWYXW RMX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RFOGMIMKNMONVRXT RMKOMVQWRXTXWWYVZS[O[LZKYJWJU
I[JYKY
12345 16H]UFO[ RVFP[ ROFLLNF]F\L\F RL[S[
12345 25F_NFKQJUJXKZN[R[UZWXXU\F ROFLQKUKXLZN[ RKFRF RYF_F
12345 15H\NFO[ ROFPY R\FO[ RLFRF RXF^F
12345 24E_MFK[ RNFLY RUFK[ RUFS[ RVFTY R]FS[ RJFQF RZF`F
12345 21G]NFU[ ROFV[ R\FH[ RLFRF RXF^F RF[L[ RR[X[
12345 20H]NFRPO[ ROFSPP[ R]FSP RLFRF RYF_F RL[S[
12345 16G][FH[ R\FI[ ROFLLNF\F RH[V[XUU[
12345 12KYOBOb RPBPb ROBVB RObVb
12345 3KYKFY^
12345 12KYTBTb RUBUb RNBUB RNbUb
12345 8G]JTROZT RJTRPZT
12345 3H\Hb\b
12345 7LXPFUL RPFOGUL
12345 39H]XMVTUXUZV[Y[[Y\W RYMWTVXVZW[ RVTVQUNSMQMNNLQKTKWLYMZO[Q[SZUWVT
RQMONMQLTLXMZ
12345 36H[PFLSLVMYNZ RQFMS RMSNPPNRMTMVNWOXQXTWWUZR[P[NZMWMS RVNWPWTVWTZ
R[ RMFQF
12345 25I[WPWQXQXPWNUMRMONMQLTLWMYNZP[R[UZWW RRMPNNQMTMXNZ
12345 42H]ZFVTUXUZV[Y[[Y\W R[FWTVXVZW[ RVTVQUNSMQMNNLQKTKWLYMZO[Q[SZUWVT
RQMONMQLTLXMZ RWF[F
12345 26I[MVQUTTWRXPWNUMRMONMQLTLWMYNZP[R[UZWX RRMPNNQMTMXNZ
12345 35KZZGYHZI[H[GZFXFVGUHTJSMP[O_Na RXFVHUJTNRWQ[P^O`NaLbJbIaI`J_K`Ja
ROMYM
12345 43H\YMU[T^RaObLbJaI`I_J^K_J` RXMT[S^QaOb RVTVQUNSMQMNNLQKTKWLYMZO[
Q[SZUWVT RQMONMQLTLXMZ
12345 31H]PFJ[ RQFK[ RMTOPQNSMUMWNXOXQVWVZ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NNMOMQNRPSUUWVXW RMPNQPRUTWUXVXYWZU[Q[OZNYMWM[NY
12345 16KZPFPWQZS[U[WZXX RQFQWRZS[ RMMUM
12345 28G]LMLXMZP[R[UZWX RMMMXNZP[ RWMW[ RXMX[ RIMMM RTMXM RW[[[
12345 15I[LMR[ RMMRY RXMR[ RJMPM RTMZM
12345 24F^JMN[ RKMNX RRMN[ RRMV[ RSMVX RZMV[ RGMNM RWM]M
12345 21H\LMW[ RMMX[ RXML[ RJMPM RTMZM RJ[P[ RT[Z[
12345 22H[LMR[ RMMRY RXMR[P_NaLbKbJaK`La RJMPM RTMZM
12345 16I[WML[ RXMM[ RMMLQLMXM RL[X[XWW[
12345 40KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSU
SWRYQZP\P^Q`RaTb
12345 3NVRBRb
12345 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQU
QWRYSZT\T^S`RaPb
12345 24F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O
12345 35JZJFJ[K[KFLFL[M[MFNFN[O[OFPFP[Q[QFRFR[S[SFTFT[U[UFVFV[W[WFXFX[Y[
YFZFZ[

View File

@ -0,0 +1,177 @@
12345 1JZ
12345 34MXRFQGQIRQ RRFRTST RRFSFST RSFTGTISQ RRXQYQZR[S[TZTYSXRX RRYRZSZ
SYRY
12345 22I[NFMGMM RNGMM RNFOGMM RWFVGVM RWGVM RWFXGVM
12345 12H]SBLb RYBRb RLOZO RKUYU
12345 56H\PBP_ RTBT_ RXKXJWJWLYLYJXHWGTFPFMGKIKLLNOPURWSXUXXWZ RLLMNOOUQ
WRXT RMGLILKMMONUPXRYTYWXYWZT[P[MZLYKWKUMUMWLWLV
12345 32F^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWT
12345 74E_[O[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z^Z\ RV\
W^X_Y_ RUXW]X^Y^Z]
12345 80G]LFL[ RMGMZ RNFN[ RIFUFXGYHZJZLYNXOUPNP RXHYJYLXN RUFWGXIXMWOUP
RRPTQUSWYX[Z[[Y[W RWWXYYZZZ RTQURXXYYZY[X RI[Q[ RJFLG RKFLH ROFNH RPFNG
RLZJ[ RLYK[ RNYO[ RNZP[
12345 44H\XIYFYLXIVGSFPFMGKIKLLNOPURWSXUXXWZ RLLMNOOUQWRXT RMGLILKMMONUP
XRYTYWXYWZT[Q[NZLXKUK[LX
12345 57H\JFJL RQFQ[ RRGRZ RSFS[ RZFZL RJFZF RN[V[ RKFJL RLFJI RMFJH ROF
JG RUFZG RWFZH RXFZI RYFZL RQZO[ RQYP[ RSYT[ RSZU[
12345 45F^KFKULXNZQ[S[VZXXYUYG RLGLVMX RMFMVNYOZQ[ RHFPF RVF\F RIFKG RJF
KH RNFMH ROFMG RWFYG R[FYG
12345 34H\KFR[ RLFRXR[ RMFSX RYGR[ RIFPF RUF[F RJFLH RNFMH ROFMG RWFYG R
ZFYG
12345 55F^JFN[ RKFNVN[ RLFOV RRFOVN[ RRFV[ RSFVVV[ RTFWV RZGWVV[ RGFOF R
RFTF RWF]F RHFKG RIFKH RMFLH RNFLG RXFZG R\FZG
12345 54H\KFW[ RLFX[ RMFY[ RXGLZ RIFPF RUF[F RI[O[ RT[[[ RJFMH RNFMH ROF
MG RVFXG RZFXG RLZJ[ RLZN[ RWZU[ RWYV[ RWYZ[
12345 48G]JFQQQ[ RKFRQRZ RLFSQS[ RYGSQ RHFOF RVF\F RN[V[ RIFKG RNFLG RWF
YG R[FYG RQZO[ RQYP[ RSYT[ RSZU[
12345 41H\YFKFKL RWFK[ RXFL[ RYFM[ RK[Y[YU RLFKL RMFKI RNFKH RPFKG RT[YZ
RV[YY RW[YX RX[YU
12345 12KYOBOb RPBPb ROBVB RObVb
12345 3KYKFY^
12345 12KYTBTb RUBUb RNBUB RNbUb
12345 8G]JTROZT RJTRPZT
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UWVXY RNNMQ RNRPSUTWU RXVWZ RMONQPRUS
WTXVXYWZU[Q[OZNYMWM[NY
12345 22KZPHPVQYRZT[V[XZYX RQHQWRY RPHRFRWSZT[ RMMVM
12345 43G^LMLVMYNZP[S[UZVYWW RMNMWNY RIMNMNWOZP[ RWMW[\[ RXNXZ RTMYMY[ R
JMLN RKMLO RYYZ[ RYZ[[
12345 31I[LMR[ RMMRY RNMSY RXNSYR[ RJMQM RTMZM RKMNO RPMNN RVMXN RYMXN
12345 45F^JMN[ RKMNX RLMOX RRMOXN[ RRMV[ RSMVX RRMTMWX RZNWXV[ RGMOM RWM
]M RHMKN RNMLN RXMZN R\MZN
12345 48H\LMV[ RMMW[ RNMX[ RWNMZ RJMQM RTMZM RJ[P[ RS[Z[ RKMMN RPMNN RUM
WN RYMWN RMZK[ RMZO[ RVZT[ RWZY[
12345 40H[LMR[ RMMRY RNMSY RXNSYP_NaLbJbIaI_K_KaJaJ` RJMQM RTMZM RKMNO R
PMNN RVMXN RYMXN
12345 41I[VML[ RWMM[ RXMN[ RXMLMLQ RL[X[XW RMMLQ RNMLP ROMLO RQMLN RS[XZ
RU[XY RV[XX RW[XW
12345 40KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSU
SWRYQZP\P^Q`RaTb
12345 3NVRBRb
12345 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQU
QWRYSZT\T^S`RaPb
12345 24F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O
12345 35JZJFJ[K[KFLFL[M[MFNFN[O[OFPFP[Q[QFRFR[S[SFTFT[U[UFVFV[W[WFXFX[Y[
YFZFZ[

View File

@ -0,0 +1,55 @@
#!/usr/bin/env python3
# converts images into a format suitable for display on badger2040. this
# includes scaling the image fit the longest edge, cropping down to 296x128
# and reducing to black and white with dither. the data is then output as an
# array that can be embedded directly into your c++ code
import argparse
import sys
from PIL import Image, ImageEnhance
from pathlib import Path
parser = argparse.ArgumentParser(description='Converts images into the format used by Badger2040.')
parser.add_argument('file', nargs="+", help='input files to convert')
parser.add_argument('--binary', action="store_true", help='output binary file for MicroPython')
parser.add_argument('--resize', action="store_true", help='force images to 296x128 pixels')
options = parser.parse_args()
def convert_image(img):
if options.resize:
img = img.resize((296, 128)) # resize
enhancer = ImageEnhance.Contrast(img)
img = enhancer.enhance(2.0)
img = img.convert("1") # convert to black and white
return img
# create map of images based on input filenames
for input_filename in options.file:
with Image.open(input_filename) as img:
img = convert_image(img)
image_name = Path(input_filename).stem
w, h = img.size
output_data = [~b & 0xff for b in list(img.tobytes())]
if options.binary:
output_filename = Path(input_filename).with_suffix(".bin")
print(f"Saving to {output_filename}, {w}x{h}")
with open(output_filename, "wb") as out:
out.write(bytearray(output_data))
else:
image_code = '''\
static const uint8_t {image_name}[{count}] = {{
{byte_data}
}};
'''.format(image_name=image_name, count=len(output_data), byte_data=", ".join(str(b) for b in output_data))
print(image_code)

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -26,3 +26,4 @@ add_subdirectory(pico_explorer)
add_subdirectory(pico_rgb_keypad)
add_subdirectory(pico_wireless)
add_subdirectory(plasma2040)
add_subdirectory(badger2040)

View File

@ -0,0 +1 @@
include(badger2040.cmake)

View File

@ -0,0 +1,12 @@
set(LIB_NAME badger2040)
add_library(${LIB_NAME} INTERFACE)
target_sources(${LIB_NAME} INTERFACE
${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}.cpp
)
target_include_directories(${LIB_NAME} INTERFACE ${CMAKE_CURRENT_LIST_DIR})
# Pull in pico libraries that we need
target_link_libraries(${LIB_NAME} INTERFACE pico_stdlib hardware_pwm uc8151)

View File

@ -0,0 +1,350 @@
#include <string.h>
#include <math.h>
#include "hardware/pwm.h"
#include "badger2040.hpp"
namespace pimoroni {
void Badger2040::init() {
// set clock speed to 12MHz to reduce the maximum current draw on the
// battery. when updating a small, monochrome, display only every few
// seconds or so then you don't need much processing power anyway...
//set_sys_clock_khz(48000, true);
gpio_set_function(ENABLE_3V3, GPIO_FUNC_SIO);
gpio_set_dir(ENABLE_3V3, GPIO_OUT);
gpio_put(ENABLE_3V3, 1);
gpio_set_function(A, GPIO_FUNC_SIO);
gpio_set_dir(A, GPIO_IN);
gpio_set_pulls(A, false, true);
gpio_set_function(B, GPIO_FUNC_SIO);
gpio_set_dir(B, GPIO_IN);
gpio_set_pulls(B, false, true);
gpio_set_function(C, GPIO_FUNC_SIO);
gpio_set_dir(C, GPIO_IN);
gpio_set_pulls(C, false, true);
gpio_set_function(D, GPIO_FUNC_SIO);
gpio_set_dir(D, GPIO_IN);
gpio_set_pulls(D, false, true);
gpio_set_function(USER, GPIO_FUNC_SIO);
gpio_set_dir(USER, GPIO_IN);
gpio_set_pulls(USER, false, true);
gpio_set_function(VBUS_DETECT, GPIO_FUNC_SIO);
gpio_set_dir(VBUS_DETECT, GPIO_IN);
gpio_put(VBUS_DETECT, 1);
/*
// read initial button states
uint32_t mask = (1UL << A) | (1UL << B) | (1UL << C) | (1UL << D) | (1UL << E);
_wake_button_states |= gpio_get_all() & mask;
// wait for button to be released before continuing
while(gpio_get_all() & mask) {
tight_loop_contents();
}
*/
// led control pin
pwm_config cfg = pwm_get_default_config();
pwm_set_wrap(pwm_gpio_to_slice_num(LED), 65535);
pwm_init(pwm_gpio_to_slice_num(LED), &cfg, true);
gpio_set_function(LED, GPIO_FUNC_PWM);
led(0);
uc8151.init();
// TODO: set default image?
}
void Badger2040::clear() {
for(uint32_t y = 0; y < 128; y++) {
for(uint32_t x = 0; x < 296; x++) {
pixel(x, y);
}
}
}
void Badger2040::halt() {
gpio_put(ENABLE_3V3, 0);
// don't allow any more code to execute while power rail drops
while(true) {}
}
uint8_t _dither_value(int32_t x, int32_t y, uint8_t p) {
// ordered dither matrix used in 4-bit mode
static uint8_t _odm[16] = {
0, 8, 2, 10,
12, 4, 14, 6,
3, 11, 1, 9,
15, 7, 13, 5
};
// calculate dither matrix offset
uint32_t dmo = (x & 0b11) | ((y & 0b11) << 2);
if(p == 0) {
return 1;
}else if(p == 15) {
return 0;
}else{
return p <= _odm[dmo] ? 1 : 0;
}
}
void Badger2040::pixel(int32_t x, int32_t y) {
if(_thickness == 1) {
uc8151.pixel(x, y, _dither_value(x, y, _pen));
}else{
uint8_t ht = _thickness / 2;
for(int sy = 0; sy < _thickness; sy++) {
for(int sx = 0; sx < _thickness; sx++) {
uc8151.pixel(x + sx - ht, y + sy - ht, _dither_value(x + sx - ht, y + sy - ht, _pen));
}
}
}
}
// Display a portion of an image (icon sheet) at dx, dy
void Badger2040::icon(const uint8_t *data, int sheet_width, int icon_size, int index, int dx, int dy) {
image(data, sheet_width, icon_size * index, 0, icon_size, icon_size, dx, dy);
}
// Display an image that fills the screen (286*128)
void Badger2040::image(const uint8_t* data) {
image(data, 296, 0, 0, 296, 128, 0, 0);
}
// Display an image smaller than the screen (sw*sh) at dx, dy
void Badger2040::image(const uint8_t *data, int w, int h, int x, int y) {
image(data, w, 0, 0, w, h, x, y);
}
void Badger2040::image(const uint8_t *data, int stride, int sx, int sy, int dw, int dh, int dx, int dy) {
for(auto y = 0; y < dh; y++) {
for(auto x = 0; x < dw; x++) {
// work out byte offset in source data
uint32_t o = ((y + sy) * (stride >> 3)) + ((x + sx) >> 3);
// extract bitmask for this pixel
uint32_t bm = 0b10000000 >> ((x + sx) & 0b111);
// draw the pixel
uc8151.pixel(dx + x, dy + y, data[o] & bm);
}
}
}
void Badger2040::rectangle(int32_t x, int32_t y, int32_t w, int32_t h) {
for(int cy = y; cy < y + h; cy++) {
for(int cx = x; cx < x + w; cx++) {
pixel(cx, cy);
}
}
}
void Badger2040::line(int32_t x1, int32_t y1, int32_t x2, int32_t y2) {
int32_t x = x1, y = y1, dx, dy, incx, incy, balance;
if(x2 >= x1) {dx = x2 - x1; incx = 1;} else {dx = x1 - x2; incx = -1;}
if(y2 >= y1) {dy = y2 - y1; incy = 1;} else {dy = y1 - y2; incy = -1;}
if(dx >= dy) {
dy <<= 1; balance = dy - dx; dx <<= 1;
while(x != x2) {
pixel(x, y);
if (balance >= 0) {y += incy; balance -= dx;}
balance += dy; x += incx;
}
} else {
dx <<= 1; balance = dx - dy; dy <<= 1;
while(y != y2) {
pixel(x, y);
if(balance >= 0) {x += incx; balance -= dy;}
balance += dx; y += incy;
}
}
}
void Badger2040::debug_command(uint8_t reg, size_t len, const uint8_t *data) {
uc8151.command(reg, len, data);
}
void Badger2040::dump_otp(uint8_t *data) {
uc8151.read(0xa2, 0xFFF, data);
}
void Badger2040::update_button_states() {
uint32_t mask = (1UL << A) | (1UL << B) | (1UL << C) | (1UL << D) | (1UL << E);
_button_states |= gpio_get_all() & mask;
}
bool Badger2040::is_busy() {
return uc8151.is_busy();
}
void Badger2040::power_off() {
uc8151.power_off();
}
void Badger2040::invert(bool invert) {
uc8151.invert(invert);
}
void Badger2040::update_speed(uint8_t speed) {
uc8151.update_speed(speed);
}
void Badger2040::partial_update(int x, int y, int w, int h, bool blocking) {
uc8151.partial_update(x, y, w, h, blocking);
}
void Badger2040::update(bool blocking) {
uc8151.update(blocking);
}
const hershey_font_glyph_t* Badger2040::glyph_data(unsigned char c) {
if(c < 32 || c > 127) {
return nullptr;
}
return &_font->chars[c - 32];
}
inline float deg2rad(float degrees) {
return (degrees * M_PI) / 180.0f;
}
int32_t Badger2040::glyph(unsigned char c, int32_t x, int32_t y, float s, float a) {
const hershey_font_glyph_t *gd = glyph_data(c);
// if glyph data not found (id too great) then skip
if(!gd) {
return 0;
}
a = deg2rad(a);
float as = sin(a);
float ac = cos(a);
const int8_t *pv = gd->vertices;
int8_t cx = (*pv++) * s;
int8_t cy = (*pv++) * s;
bool pen_down = true;
for(uint32_t i = 1; i < gd->vertex_count; i++) {
if(pv[0] == -128 && pv[1] == -128) {
pen_down = false;
pv += 2;
}else{
int8_t nx = (*pv++) * s;
int8_t ny = (*pv++) * s;
int rcx = cx * ac - cy * as;
int rcy = cx * as + cy * ac;
int rnx = nx * ac - ny * as;
int rny = nx * as + ny * ac;
if(pen_down) {
line(rcx + x, rcy + y, rnx + x, rny + y);
}
cx = nx;
cy = ny;
pen_down = true;
}
}
return gd->width * s;
}
void Badger2040::text(std::string message, int32_t x, int32_t y, float s, float a) {
int32_t cx = x;
int32_t cy = y;
int32_t ox = 0;
float as = sin(deg2rad(a));
float ac = cos(deg2rad(a));
for(auto &c : message) {
int rcx = ox * ac;
int rcy = ox * as;
ox += glyph(c, cx + rcx, cy + rcy, s, a);
}
}
int32_t Badger2040::measure_text(std::string message, float s) {
int32_t width = 0;
for(auto &c : message) {
width += measure_glyph(c, s);
}
return width;
}
int32_t Badger2040::measure_glyph(unsigned char c, float s) {
const hershey_font_glyph_t *gd = glyph_data(c);
// if glyph data not found (id too great) then skip
if(!gd) {
return 0;
}
return gd->width * s;
}
void Badger2040::font(std::string name) {
// check that font exists and assign it
if(fonts.find(name) != fonts.end()) {
_font = fonts[name];
}
}
void Badger2040::pen(uint8_t pen) {
_pen = pen;
}
void Badger2040::thickness(uint8_t thickness) {
_thickness = thickness;
}
void Badger2040::led(uint8_t brightness) {
// set the led brightness from 1 to 256 with gamma correction
float gamma = 2.8;
uint16_t v = (uint16_t)(pow((float)(brightness) / 256.0f, gamma) * 65535.0f + 0.5f);
pwm_set_gpio_level(LED, v);
}
bool Badger2040::pressed(uint8_t button) {
return (_button_states & (1UL << button)) != 0;
}
bool Badger2040::pressed_to_wake(uint8_t button) {
return (_wake_button_states & (1UL << button)) != 0;
}
void Badger2040::wait_for_press() {
_button_states = 0;
update_button_states();
while(_button_states == 0) {
update_button_states();
tight_loop_contents();
}
uint32_t mask = (1UL << A) | (1UL << B) | (1UL << C) | (1UL << D) | (1UL << E);
while(gpio_get_all() & mask) {
tight_loop_contents();
}
}
}

View File

@ -0,0 +1,99 @@
#pragma once
#include <string>
#include "drivers/uc8151/uc8151.hpp"
#include "fonts.hpp"
namespace pimoroni {
class Badger2040 {
private:
UC8151 uc8151;
const hershey_font_t *_font = &futural;
uint8_t _pen = 0;
uint8_t _thickness = 1;
uint32_t _button_states = 0;
uint32_t _wake_button_states = 0;
private:
public:
Badger2040()
: uc8151(296, 128, spi0, CS, DC, CLK, MOSI, BUSY, RESET) {
};
// Constructor for Python-managed buffer
Badger2040(uint8_t *framebuffer)
: uc8151(296, 128, framebuffer, spi0, CS, DC, CLK, MOSI, BUSY, RESET) {
};
void init();
void update(bool blocking=false);
void partial_update(int x, int y, int w, int h, bool blocking=false);
void update_speed(uint8_t speed);
void halt();
void sleep();
bool is_busy();
void power_off();
void invert(bool invert);
// state
void led(uint8_t brightness);
void font(std::string name);
void pen(uint8_t pen);
void thickness(uint8_t thickness);
// inputs (buttons: A, B, C, D, E, USER)
bool pressed(uint8_t button);
bool pressed_to_wake(uint8_t button);
void wait_for_press();
void update_button_states();
uint32_t button_states();
// drawing primitives
void clear();
void pixel(int32_t x, int32_t y);
void line(int32_t x1, int32_t y1, int32_t x2, int32_t y2);
void rectangle(int32_t x, int32_t y, int32_t w, int32_t h);
void icon(const uint8_t *data, int sheet_width, int icon_size, int index, int dx, int dy);
void image(const uint8_t* data);
void image(const uint8_t *data, int w, int h, int x, int y);
void image(const uint8_t *data, int stride, int sx, int sy, int dw, int dh, int dx, int dy);
// text (fonts: sans, sans_bold, gothic, cursive_bold, cursive, serif_italic, serif, serif_bold)
const hershey_font_glyph_t* glyph_data(unsigned char c);
void text(std::string message, int32_t x, int32_t y, float s = 1.0f, float a = 0.0f);
int32_t glyph(unsigned char c, int32_t x, int32_t y, float s = 1.0f, float a = 0.0f);
int32_t measure_text(std::string message, float s = 1.0f);
int32_t measure_glyph(unsigned char c, float s = 1.0f);
void debug_command(uint8_t command, size_t len, const uint8_t *data);
void dump_otp(uint8_t *otp_data);
public:
enum pin {
A = 12,
B = 13,
C = 14,
D = 15,
E = 11,
UP = 15, // alias for D
DOWN = 11, // alias for E
USER = 23,
CS = 17,
CLK = 18,
MOSI = 19,
DC = 20,
RESET = 21,
BUSY = 26,
VBUS_DETECT = 24,
LED = 25,
BATTERY = 29,
ENABLE_3V3 = 10
};
};
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
// This is a hack! Need to replace with upstream board definition.
#define MICROPY_HW_BOARD_NAME "Pimoroni Badger2040 2MB"
#define MICROPY_HW_FLASH_STORAGE_BYTES (1024 * 1024)

View File

@ -0,0 +1,114 @@
# Code generated by data_to_py.py.
version = '0.1'
_data =\
b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x71\x0b\x40\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\xfc\x8b\xa8\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x04\xbf\x42\xee\x88\x00\x00\x00\x00\x80\x00'\
b'\x00\x18\x43\xd5\x6f\xb7\xf0\x00\x00\x04\x5b\x1a\x00\x00\x04\x0f'\
b'\x6f\xe3\x6d\x4d\x00\x00\x2b\xcd\xbc\x90\x00\x0e\xb5\xfa\xb7\xb7'\
b'\xec\x00\x00\x07\xfe\xee\x31\xa4\x27\x76\xaf\xf5\xf5\xbc\x00\x00'\
b'\x1a\xd7\x6b\x39\xe4\x05\xdd\xfa\xbe\xbe\xf2\x00\x00\x0f\x7a\xbe'\
b'\xb7\xdc\x27\x47\x5f\x6f\xe7\xa8\x00\x00\x2b\xaf\xd5\x1f\xee\x13'\
b'\x63\x7f\xfd\x7d\xf8\x00\x00\x0d\xf5\xff\xdf\xfd\x53\xb1\xde\xef'\
b'\xad\x44\x00\x00\x2e\xde\xae\xef\xf1\x0d\xf3\xef\xff\xf7\x98\x00'\
b'\x00\x0b\xfb\xfb\xfe\xfd\x0f\xad\xfe\xfd\x5e\xf0\x00\x00\x1d\x2d'\
b'\xaf\xb7\xee\x06\xbe\xff\x5f\xeb\xa0\x00\x00\x0d\xfe\xf5\xbf\xf7'\
b'\x0b\xd7\xff\xff\xfe\xe0\x00\x00\x73\x6b\x5f\xd7\xdb\x1e\xfa\xff'\
b'\xff\xdd\xa0\x00\x00\x07\xbf\xfd\xbf\xba\x03\xcd\xff\x6f\xf7\xe8'\
b'\x00\x00\x2e\xda\xd6\xff\xf4\x1f\xff\xff\xff\xfb\x20\x00\x00\x13'\
b'\xff\xff\x7b\xd6\x1d\xff\xfb\xad\xfb\xc0\x00\x00\x0b\x5e\xaf\xbf'\
b'\xf9\x05\xff\xbe\xdf\xfe\xd0\x00\x00\x57\xfb\xf6\xfd\xbb\x07\x5f'\
b'\xe7\x7b\xfa\x00\x00\x00\x45\x6d\x5f\x77\xee\x07\xdf\xf7\xbf\xff'\
b'\x20\x04\x00\x27\xbd\xfb\xbf\x7b\x0b\xff\xfb\xfd\xfb\x88\x00\x00'\
b'\x05\xdf\x3d\xff\xaf\x0a\xff\xf6\xff\xfe\x80\x00\x00\x15\x6d\xef'\
b'\xff\x7f\x01\xdf\xff\xbf\x7f\x00\x00\x00\x03\xff\xf6\xff\xff\x05'\
b'\x6f\xf6\xff\xef\x80\x00\x00\x4d\x5a\xff\xfd\xff\x02\xbb\xff\xff'\
b'\xf9\x80\x00\x00\x0f\x6f\x5d\xff\x7f\x07\x6f\x9b\xff\xfc\xa0\x00'\
b'\x00\x5d\xff\xff\xff\xf7\x00\xee\xee\xff\xee\x00\x00\x00\x17\x95'\
b'\x57\xfb\xff\x00\x37\xff\x7f\xff\xa0\x00\x00\x95\xff\xfd\xff\xff'\
b'\x22\x9d\xff\xff\xee\x80\x00\x00\x7e\xaa\xdf\xff\xff\x17\x97\x5f'\
b'\xff\xff\xc0\x40\x20\x2b\xff\xe7\xff\xff\x0f\x72\xef\xef\xfb\x60'\
b'\x00\x00\x1f\xf5\x3f\x7f\xff\x09\x3b\x7f\xff\xfd\x90\x20\x00\x4b'\
b'\x3f\xff\xff\xff\x00\x0d\xd7\xff\xef\x40\x00\x00\x5b\xad\xb7\xff'\
b'\xff\x04\x0f\x7f\xfd\xdb\x00\x00\x00\x1e\xf7\x7f\xff\xfe\x0a\x01'\
b'\xf7\xff\xfd\x90\x00\x00\x2f\xad\xff\xff\xfb\x18\x05\xbd\xff\xed'\
b'\xc0\x00\x04\x2b\xf6\xff\xff\xfb\x08\x10\xef\xff\xfe\x20\x04\x00'\
b'\xae\xbb\x7f\xff\xfc\x01\x02\xb5\xff\xf7\x00\x00\x00\x1b\xdf\xdf'\
b'\xff\xfe\x08\x00\xff\xff\xfd\x80\x00\x00\x1d\xf5\x7f\xfe\xee\x00'\
b'\x00\x16\xff\xef\x00\x00\x00\x16\xfd\xbf\xff\x65\x00\x02\xf7\xbf'\
b'\xf6\x80\x00\x00\x3b\x56\xff\xfe\x30\x10\x01\x3b\xe7\xda\x10\x00'\
b'\x00\x3f\xff\x7f\xe8\x80\x18\x00\x0f\x5f\xee\x00\x08\x00\x0d\xab'\
b'\xff\xf2\x04\x02\x00\x55\xf5\xf6\x02\x00\x00\x57\xee\xff\xc9\x80'\
b'\x10\x00\x0e\xbf\x77\x00\x00\x00\x1f\xb7\x7f\xc4\x00\x38\x00\x17'\
b'\xf7\x7c\x00\x00\x00\x0b\xff\xff\x50\x00\x11\x80\x0c\xe7\x7e\x00'\
b'\x00\x00\x0d\xd7\xff\xe0\x00\x01\x00\x05\xf0\x58\x00\x00\x00\x1e'\
b'\xfb\xbf\xc0\x01\x01\x00\x1f\xcd\xec\x00\x00\x00\x0f\xcf\xfe\x00'\
b'\x01\x03\x00\x07\xf7\x7c\x00\x00\x00\x0e\x8a\xdf\x00\x01\x0a\x00'\
b'\x05\xf8\x0c\x00\x00\x00\x0f\xcd\xfe\x80\x00\x0a\x00\x05\xd1\xc6'\
b'\x00\x00\x00\x08\x24\xfe\x80\x00\x20\x00\x05\x22\x76\x00\x00\x00'\
b'\x0c\x01\x7a\x00\x00\x00\x00\x03\x5f\xd6\x00\x00\x00\x3f\x70\xfc'\
b'\x00\x00\x07\x40\x01\x3f\xf3\x00\x00\x00\x1b\xf8\xfe\x00\x00\x09'\
b'\xe0\x00\x3f\xf3\x00\x00\x00\x1b\xfa\xfa\x00\x00\x09\x20\x03\x8f'\
b'\xf3\x00\x00\x00\x1d\xf9\xfc\x00\x00\x04\x20\x01\xcf\xfc\x80\x00'\
b'\x00\x3b\xf8\xf8\x00\x00\x62\x00\x00\xcf\xe3\x00\x00\x00\x32\xe1'\
b'\xf0\x00\x01\x72\x80\x01\xe0\x03\x00\x00\x00\x36\x71\xf0\x00\x00'\
b'\x17\x00\x01\xd9\x4b\x00\x00\x00\x39\x83\xf0\x00\x00\x0e\x82\x05'\
b'\xc9\x83\x80\x08\x00\x28\x83\xf0\x00\x07\x01\x81\x00\xfa\x8b\x00'\
b'\x00\x00\x3c\x07\xf8\x00\x23\x55\x80\x00\xff\xbf\x00\x40\x00\x17'\
b'\x2f\xfc\x00\x07\x00\xc1\x00\x7e\xd5\x85\x00\x00\x12\x3f\xc0\x00'\
b'\x0b\x15\x20\x11\x7e\x3f\x00\x04\x00\x3f\x7f\xf0\x08\x25\x82\xc4'\
b'\x00\x7d\xeb\x00\x00\x00\x2c\xdf\xe8\x01\x17\x51\xe0\x00\x3f\xff'\
b'\x00\x00\x00\x2f\xff\xc0\x00\x4b\x15\x61\x00\x1f\xd7\x00\x00\x00'\
b'\x3f\xff\xc0\x05\x0e\x09\xd4\x00\x57\xfe\x00\x00\x0a\x27\xff\xa0'\
b'\x00\x3f\x6b\x70\xa0\x0f\xea\x00\x00\x00\x1d\xff\x00\x00\x8d\x01'\
b'\xf8\x00\x07\xfe\x00\x00\x00\x17\xf8\x80\x4a\x76\x56\xbc\x00\x1f'\
b'\xfa\x00\x00\x00\x3f\xfd\x40\x08\x3f\x0b\x75\x50\x03\xfe\x00\x08'\
b'\x00\x17\xec\x00\x01\x7b\x25\xae\x00\x0d\xfb\x00\x00\x00\x1b\xfc'\
b'\x00\x15\xdd\x10\xfb\x48\x05\xfe\x00\x00\x00\x0f\xfc\x01\x41\xef'\
b'\x0f\x7d\x44\x07\xfe\x00\x00\x00\x17\xfc\x00\x36\xfb\x05\xaf\x90'\
b'\x0a\xf2\x00\x00\x00\x1f\xd8\x00\x8b\x77\x01\xfa\xa8\x03\x7c\x80'\
b'\x04\x00\x1b\xf4\x02\x3d\xfe\x00\x5f\xa4\x01\xfc\x00\x02\x00\x4d'\
b'\xf0\x08\x9f\xbf\x05\xaa\xfe\x01\x74\x80\x00\x20\x2f\xe0\x06\xed'\
b'\xd7\x12\x2f\xb5\x01\xdd\x00\x00\x10\x05\xe0\x11\x77\xff\x08\x5a'\
b'\xdf\x81\xf0\x00\x00\x00\x01\xb0\x0b\xbd\xdf\x05\x0f\x6b\xc0\xca'\
b'\x00\x94\x8a\x00\xe0\x2d\xee\xfb\x00\x97\xbd\xe3\x00\x02\x42\x41'\
b'\x00\xe0\xad\x7f\xff\x00\x7f\xff\x71\xa0\x08\x34\xf8\x00\x00\xff'\
b'\xae\xef\x05\xe9\xfb\xa9\x80\x03\xd7\xbe\x80\x61\xfe\xdb\xbf\x00'\
b'\x17\xfd\xe1\x00\x3f\x7a\xd6\x00\x60\xbb\xee\xff\x00\x5b\xfe\xf1'\
b'\x00\x2b\xdf\x7b\xc0\x03\xfd\x7f\xff\x05\xbd\xfb\xd8\x00\xfe\xeb'\
b'\xd7\x60\x23\xaf\xf7\x7f\x00\x56\xdf\xf9\x03\xeb\x5c\x5d\xf0\x03'\
b'\xde\xff\xff\x0a\x1f\x7f\xf8\x01\x3d\xec\x4d\xb0\x27\xef\x7f\xff'\
b'\x01\x27\xff\xfd\x03\xdd\x65\x26\xd0\x06\xb7\xd7\xff\x09\xe8\xbf'\
b'\xec\x02\xef\xb3\x2b\xf0\x2f\xff\xff\xff\x00\x01\xff\xfc\x13\x58'\
b'\xb5\x57\x50\x0d\xff\xff\xff\x00\x2e\xff\x6e\x0b\xeb\xa2\x65\xf8'\
b'\x2f\xff\xff\xff\x02\x7e\xef\xee\x05\xba\xf5\x76\xba\x3f\xdf\xff'\
b'\xff\x01\xab\xba\xfe\x13\x5b\xb1\xbb\xd8\x2f\x7f\xff\xff\x00\x36'\
b'\xff\x9b\x05\xef\xde\xdf\x78\x3f\xff\xff\xff\x05\x68\x5d\xef\x07'\
b'\x7f\xef\xff\xf8\xab\xff\xff\xff\x04\x4b\xef\xf7\x83\xbf\xf4\xff'\
b'\x78\x7a\xff\xff\xff\x02\x20\xb6\xff\x42\xff\xc3\xff\xf8\xff\x7f'\
b'\xff\xff\x00\x84\xdf\xbd\xc1\xd7\xf4\xea\xf0\xff\xff\xfe\xff\x00'\
b'\x23\x6d\xfe\xc0\xfb\x77\x7f\xc1\x3f\xff\xff\xff\x00\x15\xf7\xff'\
b'\xf0\x5b\x76\xd7\xc3\x4f\xff\xff\xff\x00\x09\x5f\xff\xd0\x3d\xbb'\
b'\x7f\x07\x75\xff\xff\xff\x00\x45\xff\xff\x78\x17\xef\xfc\x1b\x2f'\
b'\xff\xff\xff\x01\x04\xaf\xff\x57\x01\x77\xf0\x5f\xad\xff\xff\xff'\
b'\x00\x06\x3f\xff\xe5\x81\x3f\x02\xf6\xe7\xff\xff\xff\x01\x22\x1b'\
b'\xfd\xad\xa8\x00\x59\x9f\xff\xff\xff\xff\x04\x90\x6f\xff\xeb\xcf'\
b'\xdb\xed\x55\xea\xff\xff\xff\x04\x00\x37\xbf\x6e\xf5\xfe\xfe\xff'\
b'\xfe\xff\xff\xff\x00\x00\xff\xff\xf7\x5e\xb7\x6f\x7f\xeb\x7f\xff'\
b'\xff\x00\x01\xed\xfd\xfa\xf5\xfd\xf5\xff\xff\xbf\xff\xff\x00\x07'\
b'\x97\x7f\xbf\xbf\xff\xfe\xfb\xfa\xff\xff\xff\x00\x4c\x4f\xff\xef'\
b'\xf5\xff\x7f\xff\xff\x7f\xff\xff\x00\x00\x2f\xff\xff\x7f\xff\xff'\
b'\xff\xfb\x97\xff\xff\x00\x16\xdd\xff\xef\xff\xff\xff\xff\xfd\x4d'\
b'\xff\xff\x00\x71\x97\xff\xff\xff\xff\xff\xfa\xfe\x2f\x7f\xff\x00'\
b'\x12\x7d\xff\xef\xff\xff\xff\xff\xff\xa1\xff\xff\x01\x09\x57\xfd'\
b'\xff\xff\xff\xff\xff\x7e\x36\xbf\xff\x00\x85\xff\xff\xff\xff\xff'\
b'\xff\xff\xab\x5b\xeb\xff\x00\x18\x54\xff\xfb\xff\xff\xff\xff\xff'\
b'\x80\xbf\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'\
_mvdata = memoryview(_data)
def data():
return _mvdata

View File

@ -0,0 +1,306 @@
# Code generated by data_to_py.py.
version = '0.1'
_data =\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x1f\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xf0\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xfc\x00\x00\x00\x7d'\
b'\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f'\
b'\xff\x80\x00\x01\xf0\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\xff\xff\xf8\x0f\xff\xf0\x7c\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x03\xfd\x5f\xff\xff\xff\xf5\x3e'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xe0\x01'\
b'\xff\xff\xff\xeb\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x3f\x80\x00\x7f\xfc\x00\x01\xff\xc0\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xff\x00\x01\x3f\xe0\x00\x00\x1f\xf0'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x17\x6d\x5f'\
b'\xff\xa0\x00\x07\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x01\xf8\x2b\xf6\xf7\xef\xfe\x00\x01\xfe\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x01\xe0\x2f\xdf\xfe\xfe\xff\x80\x00\x7f\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xf1\x5f\xff\xfb\xf7'\
b'\xfb\xf0\x00\x1f\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'\
b'\xfe\xef\xff\xff\xff\x6f\xf4\x00\x0f\xc0\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x01\xff\xbf\xff\xbf\xff\xff\xf8\x00\x03\xe0\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xff\xff\xff\xbd\xfd'\
b'\xae\x00\x01\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff'\
b'\xdf\xff\xff\xff\xb7\xff\x00\x01\xf8\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\xff\xff\xff\xfe\xf7\xfe\xff\xc0\x00\x78\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xdf\xdf\xff'\
b'\xc0\x00\x7c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff'\
b'\xff\xff\xff\x7f\x7f\xd0\x00\x3f\xfe\x80\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x01\xf7\xff\xff\xf7\xfd\xff\xff\xf0\x00\x3f\xff\xfe\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x7f\xff\xff\xfc'\
b'\x00\x1f\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff'\
b'\x7f\xff\xfb\xff\xfa\x00\x2a\xb7\xff\xe0\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x01\xf7\xff\xff\xff\xff\xff\xf5\x56\xff\xdd\x54\x0b\xf0\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x01\xfb\xff\xdd\xff\xfd\x7f\xff\xff\xff'\
b'\xff\xff\xe5\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xeb\xfe\xff\xfd'\
b'\xf7\xff\x7f\xff\xff\xf6\xb4\x08\x78\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x01\xf5\xf7\xfb\xf7\xff\xfe\xe7\xfe\x80\x00\x00\x01\x3c\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x01\xed\x4b\xee\x5f\xde\xf7\xcf\xa0\x00\xab'\
b'\x52\x00\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xf5\x64\x55\x57\x7f'\
b'\xff\x90\x02\xff\xff\xfe\xa8\x1e\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03'\
b'\xea\x11\x01\x49\xe2\xfe\x00\xbf\xff\xeb\xf0\x14\x0f\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x03\xf0\x80\x54\x10\x14\xdc\x2f\xff\x40\x01\xe0'\
b'\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xda\x42\x00\x00\x00\x7c'\
b'\xff\x60\x02\xb8\x47\x50\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xa0'\
b'\x00\x00\x00\x00\xfc\xf8\x02\xff\xfc\x23\xaf\x07\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x07\x80\x00\x00\x00\x01\xfc\x00\xff\xff\xa0\x08\x01'\
b'\x6f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x07\x80\x00\x00\x00\x03\xfe\x0f'\
b'\xff\x80\x02\x04\x00\x1f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00'\
b'\x00\x00\x01\xff\xff\xc0\x01\x7e\x07\xdc\x03\xc0\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x0f\x00\x00\x00\x00\x03\xff\xf8\x01\x7f\xfc\x03\xaf\x83'\
b'\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x01\xff\xc0\x7f'\
b'\xfe\x8e\x03\x80\x13\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00'\
b'\x00\x00\xff\x87\xff\xa0\x04\x01\x08\x01\xc0\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x7f\xff\xff\xe8\x00'\
b'\x00\x1e\x00\x00\x00\x00\x00\xff\x3f\xe8\x05\xf4\x00\x97\xa1\xc0'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f'\
b'\xff\xff\xff\xff\xfe\x80\x7e\x00\x00\x00\x00\x00\x7f\x8a\x01\x7f'\
b'\xf2\x00\x04\x43\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x7f\xff\xff\xff\xff\xff\xf5\xfe\x00\x00\x00\x00'\
b'\x00\x01\x80\x17\xfe\x80\x00\x60\x03\xc0\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\xd0\x00\x00\xff\xff\xff'\
b'\xff\x80\x00\x00\x00\x00\x00\x42\xff\x40\x08\x00\x3f\x43\xc0\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xf8\x00'\
b'\x00\x00\x00\x0f\xff\xf7\xf0\x00\x04\x00\x08\x00\x3d\x80\x02\xf8'\
b'\x00\x17\xf9\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x0f\xc0\x00\x00\x00\x00\x00\x1f\xc0\xfe\x00\x00\x84\x52'\
b'\x81\x0f\x01\x7f\xf4\x00\x00\x23\xc0\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x40'\
b'\x57\x00\x12\x11\x04\x00\x47\xbf\xff\xc8\x00\x07\xdf\x80\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x01\xe8\x48\x82\x52\x04\x23\xff\x6a\x7a\x00'\
b'\x03\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x01\xf8\x20\x00\x49\x10\x00\x00\x00\x00\x00\x6f\x53\x68\x48\x90'\
b'\xa8\xb4\xaf\xfa\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x03\xe0\x82\x83\xff\xff\xe9\x00\x00\x00\x80'\
b'\x95\xee\xbb\x0a\x45\x2a\xc5\xff\xec\x00\x00\x7e\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xc0\x0f\x83\x7f\xff'\
b'\xff\xc0\x00\x00\x00\x6a\xbf\xed\x69\x15\x55\x2a\xff\xfa\x80\x00'\
b'\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03'\
b'\x80\x70\x00\x00\x00\xaf\x83\xf4\x00\x00\x94\x5e\xff\xca\xaa\xd4'\
b'\xa9\x7f\xdd\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x03\x80\x80\x00\x00\x00\x00\x03\xff\x80\x00\x2a'\
b'\x9b\xfb\x74\xd6\xb5\x4a\xff\xf4\x00\x10\x4f\x80\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xc1\xc0\x00\x00\x00\x00'\
b'\x00\x5f\xc0\x81\x5d\x0f\xff\xee\x52\xfa\x37\x7f\xf5\x01\x45\x17'\
b'\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xc7'\
b'\xfa\xff\xff\xb4\x00\x00\x01\x80\x00\xb5\x56\xff\x7f\x5b\x5a\x94'\
b'\xff\xec\x04\x08\x4f\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x01\xff\xff\xff\xff\xff\xff\x00\x00\x00\x02\x54\xdb'\
b'\xff\xfb\xed\x6b\x6b\x57\xb0\x01\x41\x27\xc0\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xf0'\
b'\x08\x00\x00\xba\x4e\xff\xdf\x75\xad\xa9\x2e\xca\x02\x94\xb7\xc0'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xbf'\
b'\x68\x94\xff\xff\xae\x05\x05\x05\x6d\x1b\xdf\xff\xff\xf5\x6d\x6f'\
b'\xd0\x13\xd7\xdf\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x08\x00\x00\x00\x0f\xfc\x24\x08\xb7\xf5\xfd\x5a\xff'\
b'\xff\xdd\xd5\x75\x2f\x49\x09\xdb\xff\xc0\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xe8\x09\x02'\
b'\xdf\xba\xb5\x6e\x7f\xff\xff\xdd\xfd\x5d\xd4\x07\xbf\xff\xc0\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x7f\x62\x28\x03\xeb\xef\xdb\xbd\xff\xff\xff\x77\xad\xef\xa4'\
b'\x55\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\xfc\x94\x02\x09\xff\x7f\xfa\x4b\xff\xff'\
b'\xff\xff\x7a\x2f\x4a\x2b\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xf2\xa0\x14\x83\xd5'\
b'\xd5\xbd\xaf\xff\xff\xff\xff\xef\x7f\xea\x8f\xff\xff\x80\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07'\
b'\xca\xd0\x20\x01\xff\xbe\x6f\xef\xff\xff\xff\xff\xf5\xdf\xb1\x2b'\
b'\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x0f\xc9\x08\x47\x07\xe5\xf5\x96\xff\xff\xff\xff'\
b'\xff\xff\xfb\xfc\x37\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x14\xa8\x29\x83\x7a\xdf'\
b'\x51\xff\xff\xff\xff\xff\xff\xff\xfa\xc7\xff\xff\x80\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00'\
b'\x00\x75\x89\xef\x7f\xef\x7f\xff\xff\xff\xff\xff\xff\xef\x5b\xff'\
b'\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x7c\x44\x50\xbf\xd7\xb5\xfd\x7b\xff\xff\xff\xff\xfd'\
b'\xff\xff\xff\x6f\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x13\xfc\x75\xa6\xfa\xdf\xff'\
b'\xff\xff\xff\xfb\xff\xff\xff\xff\xbf\xff\xff\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x01\xd0'\
b'\x41\xd3\xf6\xf8\xff\xff\xff\xff\xff\xfb\xff\xff\xff\xf5\xdf\xfe'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x01\xe0\x20\x5c\x20\x52\xbf\x76\xff\xff\xff\xff\xff\x73\xff'\
b'\xff\xff\xfe\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x03\xc0\x0c\x20\x01\x45\xeb\xdd\xff\xff'\
b'\xff\xff\xff\xff\xff\x00\x40\xbb\xff\xf8\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x80\x0f\x38\x00'\
b'\x83\xed\xf5\xff\xff\xff\xff\xff\xd1\xff\xe0\x00\x1f\xff\xe0\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x07\x80\x05\x01\x12\x40\xb7\xbf\xff\xff\xff\xff\xfd\xf5\x3f\xfa'\
b'\x00\x07\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x0f\x00\x4b\xc8\x00\x01\xfa\xf6\xff\xff\xff'\
b'\xff\xff\xde\x4f\xfe\x00\x01\xff\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x5f\xc0\x45\x41'\
b'\xd9\xdb\xff\xff\xff\xff\xff\x7f\xa1\xff\xc0\x00\x3f\xc0\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e'\
b'\x00\xfb\xe0\x80\x02\xb7\x6f\xff\xff\xff\xff\xff\xff\xf8\x3f\xf8'\
b'\x00\x0f\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x3c\x00\xff\xf0\x0a\x80\xf9\xff\xff\xff\xff\xff'\
b'\xfb\xff\xf7\x0f\xfe\x00\x03\xfe\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x03\xff\xf0\xaf\x40\x3c'\
b'\xaf\xff\xff\xff\xff\xff\xbf\xff\xc3\xff\xc0\x00\x7f\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x03'\
b'\xfd\xf0\x4e\xe0\xfd\x77\xff\xff\xff\xff\xff\xff\xff\xf8\x7f\xf0'\
b'\x00\x0f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x78\x07\x81\xf9\x1f\x40\x5a\x97\xff\xff\xff\xff\xfb'\
b'\xcf\xff\xf4\x0f\xfe\x00\x07\xc0\x00\x00\x03\x40\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x70\x06\x00\x34\x19\xe0\x7d\x5f'\
b'\xff\xff\xff\xff\xff\xff\xff\xff\x03\xff\x80\x03\xe0\x00\x00\x1f'\
b'\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x00\x00'\
b'\x08\x9c\x60\xf6\x6f\xff\xff\xff\xff\xff\xef\xff\xff\xe0\x7f\xc0'\
b'\x03\xf8\x00\x00\x7f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x70\x00\x04\x04\x18\x41\xfe\xbd\xff\xff\xff\xff\xfe\xbb'\
b'\xff\xff\xf0\x1f\xa8\x00\xfc\x00\x00\xff\xff\xc0\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x70\x00\xbf\x00\x38\x60\xfb\x3f\xff'\
b'\xff\xff\xff\xff\x6e\xbf\xff\xfe\x07\x07\x00\xff\x00\x03\xff\xff'\
b'\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x07\xf5\x80'\
b'\x3a\xe1\x7e\xdf\xff\xff\xff\xff\xff\xbf\xff\xff\xff\x40\x07\xc4'\
b'\x1f\xc0\x07\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x7a\x47\xf1\x80\x78\xb1\xef\x6f\xff\xff\xff\xff\xff\xef\xbf'\
b'\xff\x7f\xd0\x07\xf8\x07\xf0\x0f\xff\xff\xfe\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x79\x0f\xf3\xc0\x70\xfd\xff\x7d\xff\xff'\
b'\xff\xff\xff\xdd\xff\xff\x8f\xfa\x0f\xff\x03\xf8\x1f\xff\xff\xff'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x4f\xfb\xf8\x38'\
b'\xb7\xbf\xbf\xff\xff\xff\xff\xff\xf7\xff\xff\x83\xfd\x53\x1f\xc0'\
b'\xfe\x3f\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x7a\x8f\xff\xf8\x72\xfd\xf6\xf7\xff\xff\xff\xff\xff\xf7\xbf\xff'\
b'\xc0\x7f\x80\xe7\xf0\x3f\xff\xff\xbf\xff\xe0\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x7f\x0f\x1f\xfc\x7b\x7b\xff\xbf\xff\xff\xff'\
b'\xff\xff\xef\xff\xff\xc0\x3f\xe0\x11\xe8\x0f\xff\xfe\xff\xff\xf0'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x87\x00\xfc\x3e\xff'\
b'\x7f\xdf\xff\xff\xff\xff\xff\xf5\xdf\xff\xc0\x07\xf8\x15\x6c\x03'\
b'\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e'\
b'\x02\x20\x7c\x7b\xfd\xfd\xbb\xff\xff\xff\xff\xff\xfb\xff\xbf\xe0'\
b'\x01\xfe\x03\x1e\x80\xcf\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x3f\x46\x00\x7c\x3f\x7d\xf7\xf7\xff\xff\xff\xff'\
b'\xff\xfb\xff\xef\xf0\x00\x7f\xc2\x1f\xd0\x0f\xff\xff\xfb\xfe\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x87\x80\x78\x3f\xdf\xff'\
b'\xbf\xff\xff\xff\xff\xff\xfb\x7f\xdf\xf0\x00\x1f\xf5\x3f\xf4\x0f'\
b'\xff\xff\xde\xbe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x07'\
b'\xf8\xf0\x7f\xed\xdf\xff\xff\xff\xff\xff\xff\xfd\xef\xff\xf8\x00'\
b'\x03\xfe\xff\xf8\x7f\xff\xff\x7f\xff\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x0f\x4f\x54\xe0\x3d\xdf\xbf\x6f\xff\xff\xff\xff\xff'\
b'\xfd\xff\xd7\xf8\x00\x01\xff\xff\xfd\xbf\xff\xfd\xff\xdf\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x2f\x89\xc0\x7f\xfc\xfd\xfd'\
b'\xff\xff\xff\xff\xff\xfe\xff\xbf\xfc\x00\x00\x3f\xff\xfc\xf7\xff'\
b'\xff\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x97\xff'\
b'\xc0\x7f\xd7\xf7\xf7\xff\xff\xff\xff\xff\xfe\xf7\xbf\xfc\x00\x00'\
b'\x0f\xff\xf9\xef\xff\xef\xfd\xef\x80\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x1e\x27\xff\x80\x7f\xfe\xdf\xdf\xff\xff\xff\xff\xff\xff'\
b'\xff\xff\xfc\x00\x00\x01\xff\xd3\xd7\xff\xff\xff\xff\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x1e\x11\xfe\x02\x7f\xef\xff\xff\xff'\
b'\xff\xff\xff\xff\xfe\xff\xff\xfe\x00\x00\x00\xff\xc0\xc7\xff\xff'\
b'\xff\xdf\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x0a\x18\x06'\
b'\x7f\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x7f\xef\xff\x00\x00\x00'\
b'\x3f\xc0\x47\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x7c\x05\x20\x0e\xff\xff\xff\xef\xff\xff\xff\xff\xff\xff\x7f'\
b'\xff\xff\x00\x00\x00\x0f\xf0\x01\xff\xff\xff\x6f\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x78\x08\x8a\x5e\x7f\xfe\xff\xff\xff\xff'\
b'\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x0f\xf8\x01\xff\xff\xff'\
b'\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x16\xa9\xfc\xff'\
b'\xff\xff\x77\xff\xff\xff\xff\xff\xfb\xbf\xf7\xff\x80\x00\x00\x1f'\
b'\xff\x00\xdf\xff\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\xe2\x0a\x92\xfd\xff\xfd\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'\
b'\xff\x80\x00\x00\x3f\xff\x82\x0f\xff\xfb\xdf\x80\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x01\xe0\x2a\xd5\xfc\xff\xff\xfd\xff\xff\xff\xff'\
b'\xff\xff\xff\xff\xef\xff\xc0\x00\x00\x7f\xff\xe2\x47\xfd\xff\xff'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xc2\x0f\x5b\xfb\xff\xff'\
b'\xf7\xbf\xff\xff\xff\xff\xff\xfb\xfd\xad\xff\xc0\x00\x01\xff\xff'\
b'\xe4\x85\xff\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x80'\
b'\x6c\xff\xfb\xff\xff\xff\xf7\xff\xff\xff\xff\xff\xff\xdf\xe7\xff'\
b'\xe0\x00\x07\xff\xff\xe2\x01\xbf\xfd\xff\x80\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x07\x84\xbb\x6f\xe3\xff\xff\xf7\xff\xff\xff\xff\xff'\
b'\xff\xfb\xff\xff\xff\xe0\x00\x3f\xff\xff\xca\x02\x3f\xff\x8f\xef'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x02\x5e\xbf\xe7\xff\xff\xf6'\
b'\xff\xff\xff\xff\xff\xff\xfd\xff\xdf\xff\xf0\x00\xff\xff\xff\xc6'\
b'\x20\x3f\xfe\xc3\xff\x80\x00\x00\x00\x00\x00\x00\x00\x0f\x0a\xbe'\
b'\xff\x9f\xff\xff\xeb\xdf\xff\xff\xff\xff\xff\xff\xdf\xeb\xff\xf0'\
b'\x03\xff\xff\xff\x4c\x72\x3f\xfb\x80\xff\x80\x00\x00\x00\x00\x00'\
b'\x00\x00\x1e\x0c\xff\xfa\x1f\xff\xff\xff\xfd\xff\xff\xff\xff\xff'\
b'\xfd\x7f\xbf\xef\xf8\x0f\xff\xff\xfd\x04\x78\x0f\xfb\x60\x7f\xc0'\
b'\x00\x00\x00\x00\x00\x00\x00\x1e\x19\xbf\x7c\x7f\xff\xff\xff\xbb'\
b'\xff\xff\xff\xff\xff\xfe\xef\xff\xff\xfc\x3f\xff\xff\xfe\x88\xf0'\
b'\x03\x7b\x70\x03\xc0\x00\x00\x00\x00\x00\x00\x00\x1c\x15\x7b\xf9'\
b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\xff\xd7\xff\xff'\
b'\xff\xff\xfd\x25\x61\x88\x66\xfe\x01\xf0\x00\x00\x00\x00\x00\x00'\
b'\x38\x3c\x3d\xff\xf7\xff\xff\xff\xef\xff\xff\xff\xff\xff\xff\xfe'\
b'\xff\xff\xff\xff\xff\xff\xff\xfe\x51\xe3\xc0\x1f\xff\x01\xf8\x00'\
b'\x00\x00\x00\x00\x00\xff\xf8\x77\xff\xff\xff\xff\xff\xff\xdd\xff'\
b'\xff\xff\xff\xff\xff\xaf\xff\xef\xff\xff\xff\xff\xfe\xa1\x43\x88'\
b'\x0d\xff\xc0\x7e\x00\x00\x00\x00\x00\x03\xff\xf8\x2d\xff\xff\xff'\
b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xfd\xff\xff\xff\xff'\
b'\xff\xff\x82\x8d\x8a\x0b\xff\xf0\x3f\x80\x00\x00\x00\x00\x07\xff'\
b'\xf0\xff\xfe\xff\xff\xff\xff\xff\xf7\xff\xff\xff\xff\xff\xff\xff'\
b'\xff\xff\xff\xff\xff\xff\xff\x51\x87\xd5\xb0\xff\xe0\x0f\xe0\x00'\
b'\x00\x00\x00\x0f\xc7\xf0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'\
b'\xff\xff\xff\xff\xef\xff\xff\xff\xff\xff\xff\xff\xd6\x8a\xfb\xf0'\
b'\x3f\xc0\x03\xf8\x00\x00\x00\x00\x0f\x3c\xf0\xff\xff\xff\xff\xff'\
b'\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xfe\xff\xff\xff\xff\xff'\
b'\xff\xe9\x57\xdf\xf8\x0f\x03\xc0\xff\x00\x00\x00\x00\x1f\x7f\xe1'\
b'\xff\xff\xff\xff\xff\xff\xfb\xef\xff\xff\xff\xff\xff\xff\xef\xff'\
b'\xff\xff\xff\xff\xff\xff\xf4\xaa\xff\xfe\x04\x0f\xf0\x7f\xc0\x00'\
b'\x00\x00\x1c\xff\xe3\x9f\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'\
b'\xff\xff\xfd\xff\xff\xff\x7f\xff\xff\xff\xff\xfd\x47\xff\xff\x80'\
b'\x3f\xfc\x0f\xf0\x00\x00\x00\x1d\xff\xe3\xef\xff\xff\xff\xff\xff'\
b'\xf7\xf7\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xff\xff\xff\xff'\
b'\xff\xaf\xff\xff\xe0\x3f\xfe\x03\xf8\x00\x00\x00\x3d\xff\xc6\xaf'\
b'\xff\xff\xff\xff\xff\xdf\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff'\
b'\xff\xff\xff\xff\xff\xff\xf7\xff\xc7\xf0\x1f\xff\x80\xff\x00\x00'\
b'\x00\x3d\xff\xcb\x3f\xff\xff\xff\xff\xff\xf7\xff\xff\xff\xff\xff'\
b'\xff\xfe\xfb\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\xfe\x07'\
b'\xff\xe0\x1f\x80\x00\x00\x3d\xff\xfd\x4b\xff\xff\xff\xff\xff\xfd'\
b'\xf7\xff\xff\xff\xff\xff\xfd\xff\xff\xff\xff\xff\xff\xff\xff\xff'\
b'\xff\xfc\x00\x7f\x01\xff\xf0\x0f\xe0\x00\x00\x7b\xff\xd5\x3f\xff'\
b'\xff\xff\xff\xff\xbf\xff\xff\xff\xff\xff\xff\xff\x7f\xff\xef\xff'\
b'\xff\xff\xff\xff\xff\xff\xf8\x00\x1f\xc0\xff\xfe\x07\xf0\x00\x00'\
_mvdata = memoryview(_data)
def data():
return _mvdata

View File

@ -0,0 +1,19 @@
#import gc
#import machine
#
#a = machine.Pin(12, machine.Pin.IN, machine.Pin.PULL_DOWN)
#b = machine.Pin(13, machine.Pin.IN, machine.Pin.PULL_DOWN)
#c = machine.Pin(14, machine.Pin.IN, machine.Pin.PULL_DOWN)
#
#if a.value() or b.value() or c.value():
# for k in locals().keys():
# if k not in ("gc"):
# del locals()[k]
# gc.collect()
# __import__("launcher.py")
try:
open("main.py", "r")
except OSError:
with open("main.py", "w") as f:
f.write("import launcher")
f.flush()

View File

@ -0,0 +1,266 @@
# Code generated by data_to_py.py.
version = '0.1'
_data =\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x3f\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xf0\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x01\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xfc\x00\x00\x00'\
b'\x00\x00\x00\x0f\xfc\x00\x00\x00\x00\x00\x00\x1f\xf8\x00\x00\x00'\
b'\x00\x00\x0f\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xfe\x00\x00\x00'\
b'\x00\x00\x00\x7f\xff\x80\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00'\
b'\x00\x00\x3f\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xff\xff\xff\xff\x80\x00'\
b'\x00\x1f\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x7f\xfe\x00\x00\x00'\
b'\x00\x00\x03\xff\xff\xf0\x00\x00\x00\x00\x07\xff\xff\xe0\x00\x00'\
b'\x00\x00\x7f\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xff\xff\xff\xff\xf0\x00'\
b'\x00\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\xff\xff\x00\x00\x00'\
b'\x00\x00\x0f\xff\xff\xfc\x00\x00\x00\x00\x1f\xff\xff\xf8\x00\x00'\
b'\x00\x01\xff\xc0\x0f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xff\xff\xff\xff\xf8\x00'\
b'\x01\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\xfc\x3f\x00\x00\x00'\
b'\x00\x00\x1f\xff\xff\xfe\x00\x00\x00\x00\x3f\xff\xff\xfc\x00\x00'\
b'\x00\x03\xfe\x00\x01\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xff\xff\xff\xff\xf8\x00'\
b'\x03\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xfc\x3f\x00\x00\x00'\
b'\x00\x00\x7f\xf0\x03\xff\x80\x00\x00\x00\xff\xe0\x07\xff\x00\x00'\
b'\x00\x07\xf8\x00\x00\x7f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xff\xff\xff\xff\xf8\x00'\
b'\x03\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xfc\x3f\x00\x00\x00'\
b'\x00\x00\xff\x80\x00\x7f\xc0\x00\x00\x01\xff\x00\x00\xff\x80\x00'\
b'\x00\x0f\xf0\x00\x00\x3f\xc0\x00\x00\x00\x03\xff\xff\xff\xfe\x00'\
b'\x00\x03\xff\x80\x03\xfe\x00\x00\x00\xff\xff\xff\xff\xff\xfc\x00'\
b'\x03\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xfc\x3f\x00\x00\x00'\
b'\x00\x01\xfe\x00\x00\x1f\xe0\x00\x00\x03\xfc\x00\x00\x3f\xc0\x00'\
b'\x00\x0f\xc0\x00\x00\x0f\xc0\x00\x00\x00\x03\xff\xff\xff\xfe\x00'\
b'\x00\x3f\xff\xf0\x1f\xff\xf0\x00\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x00\x1f\x00\x00\x00\x00\xfc\x3f\x00\x00\x00'\
b'\x00\x03\xfc\x00\x00\x0f\xf0\x00\x00\x07\xf8\x00\x00\x1f\xe0\x00'\
b'\x00\x1f\x80\x00\x00\x07\xe0\x00\x00\x00\x03\xff\xff\xff\xfe\x00'\
b'\x00\xff\xff\xfe\x3f\xff\xfc\x00\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x00\x1f\x00\x00\x00\x00\xfc\x3f\x00\x00\x00'\
b'\x00\x03\xf0\x00\x60\x03\xf0\x00\x00\x07\xe0\x00\x00\x07\xe0\x00'\
b'\x00\x3f\x00\x00\x00\x03\xf0\x00\x00\x00\x03\xff\xff\xff\xfe\x00'\
b'\x03\xff\xff\xff\xff\xff\xff\x00\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x00\x1f\x00\x00\x00\x00\xfc\x3f\x00\x00\x00'\
b'\x00\x07\xe0\x01\xf8\x01\xf8\x00\x00\x0f\xc0\x00\x00\x03\xf0\x00'\
b'\x00\x7e\x00\x07\x00\x01\xf8\x00\x00\x00\x03\xff\xff\xff\xfe\x00'\
b'\x03\xff\xff\xff\xff\xff\xff\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x00\x1f\x00\x00\x0f\xff\xfc\x3f\xff\xf0\x00'\
b'\x00\x0f\xc0\x01\xf8\x00\xfc\x00\x00\x1f\x80\x0f\xe0\x01\xf8\x00'\
b'\x00\x7e\x00\x07\x00\x01\xf8\x00\x00\x00\x03\xff\xff\xff\xfe\x00'\
b'\x07\xfe\x00\xff\xff\x03\xff\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe3\xff\xc0\x00\x00\x1f\x00\x00\x7f\xff\xfc\x3f\xff\xfe\x00'\
b'\x00\x1f\x80\x01\xfc\x00\x7e\x00\x00\x3f\x00\x3f\xf0\x00\xfc\x00'\
b'\x00\xfc\x00\x07\x00\x00\xfc\x00\x00\x00\x03\xff\xff\xff\xfe\x00'\
b'\x07\xe0\x00\x1f\xf0\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe7\xff\xc0\x00\x00\x1f\x00\x00\xff\xff\xfc\x3f\xff\xff\x00'\
b'\x00\x1f\x80\x01\xf8\x00\x7e\x00\x00\x3f\x00\x7f\xf8\x00\xfc\x00'\
b'\x00\xf8\x00\x07\x00\x00\x7c\x00\x00\x00\x00\x00\x3f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\xc0\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe7\xff\xc0\x00\x00\x1f\x00\x01\xff\xff\xfc\x3f\xff\xff\x80'\
b'\x00\x3f\x00\x01\xf8\x00\x3f\x00\x00\x7e\x00\xff\xfc\x00\x7e\x00'\
b'\x00\xf8\x00\x07\x00\x00\x7c\x00\x00\x00\x00\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe7\xff\xc0\x00\x00\x1f\x00\x01\xff\xff\xfc\x3f\xff\xff\x80'\
b'\x00\x3e\x00\x00\xf0\x00\x1f\x00\x00\x7c\x01\xfc\xfe\x00\x3e\x00'\
b'\x01\xf0\x00\x07\x00\x00\x3e\x00\x00\x00\x00\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe7\xff\xc0\x00\x00\x1f\x00\x01\xf0\x00\xff\xff\x00\x0f\x80'\
b'\x00\x3e\x00\x00\x00\x00\x1f\x00\x00\x7c\x03\xf0\x3f\x00\x3e\x00'\
b'\x01\xf0\x00\x07\x00\x00\x3e\x00\x00\x00\x00\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x00\x1f\x00\x01\xf0\x00\x7f\xfe\x00\x0f\x80'\
b'\x00\x7c\x00\x00\x00\x00\x0f\x80\x00\xf8\x03\xe0\x1f\x00\x1f\x00'\
b'\x01\xf0\x00\x07\x00\x00\x3e\x00\x00\x00\x00\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x06\x1f\x00\x01\xf0\x00\x7f\xfe\x00\x0f\x80'\
b'\x00\x7c\x00\x3f\x80\x00\x0f\x80\x00\xf8\x03\xc0\x0f\x00\x1f\x00'\
b'\x01\xe0\x00\x07\x00\x00\x1e\x00\x00\xff\xff\xfc\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x0f\x1f\x00\x01\xf0\x00\x3f\xfc\x00\x0f\x80'\
b'\x00\x7c\x00\x7f\xe0\x00\x0f\x80\x00\xf8\x03\xc0\x0f\x80\x1f\x00'\
b'\x03\xe0\x00\x07\x00\x00\x1f\x00\x01\xff\xff\xfc\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x1f\x9f\x00\x01\xf0\x00\x1f\xf8\x00\x0f\x80'\
b'\x00\x78\x00\xff\xf0\x00\x07\x80\x00\xf0\x03\xc0\x0f\x80\x0f\x00'\
b'\x03\xe0\x00\x07\x00\x00\x1f\x00\x01\xff\xff\xfc\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x3f\x9f\x00\x01\xf0\x00\x07\xe0\x00\x0f\x80'\
b'\x00\xf8\x00\x7f\xf0\x00\x07\xc0\x01\xf0\x03\xc0\x0f\x80\x0f\x80'\
b'\x03\xe0\x00\x07\x00\x00\x1f\x00\x01\xff\xff\xfc\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x20\x7f\x1f\x00\x01\xf0\x00\x00\x00\x00\x0f\x80'\
b'\x00\xf8\x00\x7f\xf0\x00\x07\xc0\x01\xf0\x00\x00\x1f\x00\x0f\x80'\
b'\x03\xe0\x00\x07\x00\x00\x1f\x00\x01\xff\xff\xfc\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe7\xff\xc0\x70\xfe\x1f\x00\x01\xf0\x00\x00\x00\x00\x0f\x80'\
b'\x00\xf8\x00\x07\xf0\x00\x07\xc0\x01\xf0\x00\x00\x7f\x00\x0f\x80'\
b'\x03\xe0\x00\x07\x00\x00\x1f\x00\x01\xff\xff\xfc\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe7\xff\xc0\xf9\xfc\x1f\x00\x01\xf0\x01\xc0\x07\xfe\x0f\x80'\
b'\x00\xf8\x00\x07\xf0\x00\x07\xc0\x01\xf0\x00\x00\xfe\x00\x0f\x80'\
b'\x03\xe0\x00\x07\xc0\x00\x1f\x00\x01\xff\xff\xfc\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x08\x00\xfc\x00'\
b'\x03\xe7\xff\xc1\xff\xf8\x1f\x00\x01\xf0\x03\xe0\x07\xfe\x0f\x80'\
b'\x00\xf8\x00\x07\xf0\x00\x07\xc0\x01\xf0\x00\x03\xfe\x00\x0f\x80'\
b'\x03\xe0\x00\x07\xe0\x00\x1f\x00\x01\xff\xff\xfc\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x1c\x00\xfc\x00'\
b'\x03\xe7\xff\xc0\xff\xf0\x1f\x00\x01\xf0\x07\xf0\x07\xfe\x0f\x80'\
b'\x00\xf8\x00\x0f\xe0\x00\x07\xc0\x01\xf0\x00\x03\xf8\x00\x0f\x80'\
b'\x03\xe0\x00\x03\xf8\x00\x1f\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x00\x00\x3e\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x7f\xe0\x1f\x00\x01\xf0\x07\xf0\x07\xfe\x0f\x80'\
b'\x00\xf8\x00\x0f\xe0\x00\x07\xc0\x01\xf0\x00\x07\xf0\x00\x0f\x80'\
b'\x01\xe0\x00\x00\xfe\x00\x1e\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x01\x00\x7e\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x3f\xc0\x1f\x00\x01\xf0\x07\xf0\x00\x00\x0f\x80'\
b'\x00\xf8\x00\x0f\xe0\x00\x07\xc0\x01\xf0\x00\x07\xc0\x00\x0f\x80'\
b'\x01\xf0\x00\x00\x3f\x00\x3e\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x03\x80\x7f\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x1f\x80\x1f\x00\x01\xf0\x07\xf0\x00\x00\x0f\x80'\
b'\x00\x78\x00\x0f\xe0\x00\x07\x80\x00\xf0\x00\x0f\x80\x00\x0f\x00'\
b'\x01\xf0\x00\x00\x1f\xc0\x3e\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x07\xc0\xff\x80\xfc\x00'\
b'\x03\xe0\x00\x00\x0f\x00\x1f\x00\x01\xf0\x03\xe0\x00\x00\x0f\x80'\
b'\x00\x7c\x00\x0f\xe0\x00\x0f\x80\x00\xf8\x00\x0f\x80\x00\x1f\x00'\
b'\x01\xf0\x00\x00\x07\xe0\x3e\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x07\xe1\xff\xc0\xfc\x00'\
b'\x03\xe0\x00\x00\x06\x00\x1f\x00\x01\xf0\x00\x00\x07\xfe\x0f\x80'\
b'\x00\x7c\x00\x1f\xe0\x00\x0f\x80\x00\xf8\x00\x0f\x80\x00\x1f\x00'\
b'\x00\xf8\x00\x00\x01\xe0\x7c\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x0f\xe3\xff\xc0\xfc\x00'\
b'\x03\xe3\xff\xc0\x00\x00\x1f\x00\x01\xf0\x00\x00\x07\xfe\x0f\x80'\
b'\x00\x7c\x00\x1f\xc0\x00\x0f\x80\x00\xf8\x00\x07\x00\x00\x1f\x00'\
b'\x00\xf8\x00\x00\x00\xc0\x7c\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x1f\xf7\xff\xe0\xfc\x00'\
b'\x03\xe7\xff\xc0\x00\x00\x1f\x00\x01\xf0\x01\xc0\x07\xfe\x0f\x80'\
b'\x00\x3e\x00\x1f\xc0\x00\x1f\x00\x00\x7c\x00\x00\x00\x00\x3e\x00'\
b'\x00\xfc\x00\x00\x00\x00\xfc\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x3f\xff\xff\xf0\xfc\x00'\
b'\x03\xe7\xff\xc0\x00\x00\x1f\x00\x01\xf0\x1f\xfc\x07\xfe\x0f\x80'\
b'\x00\x3e\x00\x1f\xc0\x00\x1f\x00\x00\x7c\x00\x00\x00\x00\x3e\x00'\
b'\x00\x7e\x00\x00\x00\x01\xf8\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x7f\xff\xff\xf8\xfc\x00'\
b'\x03\xe7\xff\xc0\x00\x00\x1f\x00\x01\xf0\x3f\xfe\x00\x00\x0f\x80'\
b'\x00\x3f\x00\x1f\xc0\x00\x3f\x00\x00\x7e\x00\x02\x00\x00\x7e\x00'\
b'\x00\x7e\x00\x00\x00\x01\xf8\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe0\x00\x0f\x80\x00\x1f\x80\x00\xfc\x7f\xff\xff\xf8\xfc\x00'\
b'\x03\xe7\xff\xc0\x00\x00\x1f\x00\x01\xf0\x7f\xff\x00\x00\x0f\x80'\
b'\x00\x1f\x80\x1f\xc7\x00\x7e\x00\x00\x3f\x00\x0f\x80\x00\xfc\x00'\
b'\x00\x3f\x00\x00\x00\x03\xf0\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xe3\xff\x0f\x80\x00\x1f\x80\x00\xfc\xff\xff\xff\xfc\xfc\x00'\
b'\x03\xe3\xff\xc0\x00\x00\x1f\x00\x01\xf0\x7f\xff\x00\x00\x0f\x80'\
b'\x00\x1f\x80\x1f\xcf\x00\x7e\x00\x00\x3f\x00\x0f\x80\x00\xfc\x00'\
b'\x00\x1f\x80\x00\x00\x07\xe0\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xff\xff\xff\x83\xff\x1f\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x00\x1f\x00\x01\xf0\x7f\xff\x00\x00\x0f\x80'\
b'\x00\x0f\xc0\x0f\xff\x00\xfc\x00\x00\x1f\x80\x0f\x80\x01\xf8\x00'\
b'\x00\x0f\xc0\x00\x00\x0f\xc0\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xff\xff\xff\x8f\xff\xff\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x00\x1f\x00\x01\xf0\x00\x00\x00\x00\x0f\x80'\
b'\x00\x07\xe0\x07\xff\x01\xf8\x00\x00\x0f\xc0\x0f\x80\x03\xf0\x00'\
b'\x00\x0f\xf0\x00\x00\x3f\xc0\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xff\xff\xff\xbf\xff\xff\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x00\x1f\x00\x01\xf0\x00\x00\x00\x00\x0f\x80'\
b'\x00\x03\xf0\x03\xfc\x03\xf0\x00\x00\x07\xe0\x07\x00\x07\xe0\x00'\
b'\x00\x07\xf8\x00\x00\x7f\x80\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xff\xff\xff\xff\xff\xff\x80\x00\xfc\x00\x00\x00\x00\xfc\x00'\
b'\x03\xe0\x00\x00\x00\x00\x1f\x00\x01\xf0\x00\x00\x00\x00\x0f\x80'\
b'\x00\x03\xfc\x00\x70\x0f\xf0\x00\x00\x07\xf8\x00\x00\x1f\xe0\x00'\
b'\x00\x03\xfe\x00\x01\xff\x00\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x07\xfe\x01\xff\xff\xff\xff\x80\x00\xff\xff\xff\xff\xff\xfc\x00'\
b'\x03\xff\xff\xff\xff\xff\xff\x00\x01\xf0\x00\x00\x00\x00\x0f\x80'\
b'\x00\x01\xfe\x00\x00\x1f\xe0\x00\x00\x03\xfc\x00\x00\x3f\xc0\x00'\
b'\x00\x01\xff\xc0\x0f\xfe\x00\x00\x00\x01\xfe\x00\x1f\xe0\x00\x00'\
b'\x03\xf0\x00\x1f\xfe\x01\xff\x80\x00\x7f\xff\xff\xff\xff\xf8\x00'\
b'\x03\xff\xff\xff\xff\xff\xff\x00\x01\xf0\x00\x00\x00\x00\x0f\x80'\
b'\x00\x00\xff\x80\x00\x7f\xc0\x00\x00\x01\xff\x00\x00\xff\x80\x00'\
b'\x00\x00\x7f\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x01\x80\x00\x07\xf8\x00\x3f\x00\x00\x7f\xff\xff\xff\xff\xf8\x00'\
b'\x03\xff\xff\xff\xff\xff\xff\x00\x01\xff\xff\xff\xff\xff\xff\x80'\
b'\x00\x00\x7f\xf0\x03\xff\x80\x00\x00\x00\xff\xe0\x07\xff\x00\x00'\
b'\x00\x00\x3f\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x01\xe0\x00\x06\x00\x00\x7f\xff\xff\xff\xff\xf8\x00'\
b'\x01\xff\xff\xff\xff\xff\xfe\x00\x01\xff\xff\xff\xff\xff\xff\x80'\
b'\x00\x00\x1f\xff\xff\xfe\x00\x00\x00\x00\x3f\xff\xff\xfc\x00\x00'\
b'\x00\x00\x0f\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\xc0\x00\x00\x00\x00\x3f\xff\xff\xff\xff\xf0\x00'\
b'\x00\xff\xff\xff\xff\xff\xfc\x00\x00\xff\xff\xff\xff\xff\xff\x00'\
b'\x00\x00\x0f\xff\xff\xfc\x00\x00\x00\x00\x1f\xff\xff\xf8\x00\x00'\
b'\x00\x00\x01\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xff\xff\xff\xff\xfe\x00'\
b'\x00\x00\x03\xff\xff\xf0\x00\x00\x00\x00\x07\xff\xff\xe0\x00\x00'\
b'\x00\x00\x00\x3f\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xff\xff\xff\xff\xfc\x00'\
b'\x00\x00\x00\x7f\xff\x80\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x0f\xfc\x00\x00\x00\x00\x00\x00\x1f\xf8\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
_mvdata = memoryview(_data)
def data():
return _mvdata

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,70 @@
# Badger 2040 Examples <!-- omit in toc -->
- [Function Examples](#function-examples)
- [Battery](#battery)
- [Button Test](#button-test)
- [Application Examples](#application-examples)
- [Badge](#badge)
- [Checklist](#checklist)
- [Clock](#clock)
- [E-Reader](#e-reader)
- [Fonts](#fonts)
- [Image](#image)
- [Launcher](#launcher)
## Function Examples
### Battery
[battery.py](battery.py)
An example of how to read the battery voltage and display a battery level indicator.
### Button Test
[button_test.py](button_test.py)
An example of how to read Badger2040's buttons and display a unique message for each.
## Application Examples
### Badge
[badge.py](badge.py)
Create your own name badge! This application looks for two files on your MicroPython drive:
* "badge.txt" - A text file containing 6 lines, corresponding to the 6 different piece of text on the badge
* "badge-image.bin" - A 108x128px 1bit colour depth image to display alongside the text. You can use examples/badger2040/image_converter/convert.py to convert them:
python3 convert.py --binary --resize image_file_1.png image_file_2.png image_file_3.png
### Checklist
[checklist.py](checklist.py)
A checklist application, letting you navigate through items and tick each of them off.
### Clock
[clock.py](clock.py)
A simple clock showing the time and date, that uses the EInk's fast speed to update every second
### E-Reader
[e-reader.py](e-reader.py)
A mini text file e-reader. Comes pre-loaded with an excerpt of The Wind In the Willows.
### Fonts
[Fonts.py](checklist.py)
A demonstration of the various fonts that can be used in your programs.
### Image
[image.py](image.py)
An image gallery. Displays and lets you cycle through any images stored within the MicroPython device's `/images` directory. Images must be 296x128 pixels with 1bit colour depth. You can use examples/badger2040/image_converter/convert.py to convert them:
python3 convert.py --binary --resize image_file_1.png image_file_2.png image_file_3.png
### Launcher
[Launcher.py](launcher.py)
A launcher style application, that gives a menu of other applications that can be loaded, as well as information such as battery level.

View File

@ -0,0 +1,267 @@
import badger2040
import machine
import time
# Global Constants
WIDTH = badger2040.WIDTH
HEIGHT = badger2040.HEIGHT
IMAGE_WIDTH = 104
COMPANY_HEIGHT = 30
DETAILS_HEIGHT = 20
NAME_HEIGHT = HEIGHT - COMPANY_HEIGHT - (DETAILS_HEIGHT * 2) - 2
TEXT_WIDTH = WIDTH - IMAGE_WIDTH - 1
COMPANY_TEXT_SIZE = 0.6
DETAILS_TEXT_SIZE = 0.5
LEFT_PADDING = 5
NAME_PADDING = 20
DETAIL_SPACING = 10
OVERLAY_BORDER = 40
OVERLAY_SPACING = 20
OVERLAY_TEXT_SIZE = 0.6
DEFAULT_TEXT = """mustelid inc
H. Badger
RP2040
2MB Flash
E ink
296x128px"""
BADGE_IMAGE = bytearray(int(IMAGE_WIDTH * HEIGHT / 8))
try:
open("badge-image.bin", "rb").read_into(BADGE_IMAGE)
except OSError:
try:
import badge_image
BADGE_IMAGE = bytearray(badge_image.data())
del badge_image
except ImportError:
pass
# ------------------------------
# Utility functions
# ------------------------------
# Reduce the size of a string until it fits within a given width
def truncatestring(text, text_size, width):
while True:
length = display.measure_text(text, text_size)
if length > 0 and length > width:
text = text[:-1]
else:
text += ""
return text
# ------------------------------
# Drawing functions
# ------------------------------
# Draw an overlay box with a given message within it
def draw_overlay(message, width, height, line_spacing, text_size):
# Draw a light grey background
display.pen(12)
display.rectangle((WIDTH - width) // 2, (HEIGHT - height) // 2, width, height)
# Take the provided message and split it up into
# lines that fit within the specified width
words = message.split(" ")
lines = []
line = ""
appended_line = ""
for word in words:
if len(word) > 0:
appended_line += " "
appended_line += word
if display.measure_text(appended_line, text_size) >= width:
lines.append(line)
appended_line = word
else:
line = appended_line
if len(line) != 0:
lines.append(line)
display.pen(0)
display.thickness(2)
# Display each line of text from the message, centre-aligned
num_lines = len(lines)
for i in range(num_lines):
length = display.measure_text(lines[i], text_size)
current_line = (i * line_spacing) - ((num_lines - 1) * line_spacing) // 2
display.text(lines[i], (WIDTH - length) // 2, (HEIGHT // 2) + current_line, text_size)
# Draw the badge, including user text
def draw_badge():
display.pen(0)
display.clear()
# Draw badge image
display.image(BADGE_IMAGE, IMAGE_WIDTH, HEIGHT, WIDTH - IMAGE_WIDTH, 0)
# Draw a border around the image
display.pen(0)
display.thickness(1)
display.line(WIDTH - IMAGE_WIDTH, 0, WIDTH - 1, 0)
display.line(WIDTH - IMAGE_WIDTH, 0, WIDTH - IMAGE_WIDTH, HEIGHT - 1)
display.line(WIDTH - IMAGE_WIDTH, HEIGHT - 1, WIDTH - 1, HEIGHT - 1)
display.line(WIDTH - 1, 0, WIDTH - 1, HEIGHT - 1)
# Uncomment this if a white background is wanted behind the company
# display.pen(15)
# display.rectangle(1, 1, TEXT_WIDTH, COMPANY_HEIGHT - 1)
# Draw the company
display.pen(15) # Change this to 0 if a white background is used
display.font("serif")
display.thickness(3)
display.text(company, LEFT_PADDING, (COMPANY_HEIGHT // 2) + 1, COMPANY_TEXT_SIZE)
# Draw a white background behind the name
display.pen(15)
display.thickness(1)
display.rectangle(1, COMPANY_HEIGHT + 1, TEXT_WIDTH, NAME_HEIGHT)
# Draw the name, scaling it based on the available width
display.pen(0)
display.font("sans")
display.thickness(4)
name_size = 2.0 # A sensible starting scale
while True:
name_length = display.measure_text(name, name_size)
if name_length >= (TEXT_WIDTH - NAME_PADDING) and name_size >= 0.1:
name_size -= 0.01
else:
display.text(name, (TEXT_WIDTH - name_length) // 2, (NAME_HEIGHT // 2) + COMPANY_HEIGHT + 1, name_size)
break
# Draw a white backgrounds behind the details
display.pen(15)
display.thickness(1)
display.rectangle(1, HEIGHT - DETAILS_HEIGHT * 2, TEXT_WIDTH, DETAILS_HEIGHT - 1)
display.rectangle(1, HEIGHT - DETAILS_HEIGHT, TEXT_WIDTH, DETAILS_HEIGHT - 1)
# Draw the first detail's title and text
display.pen(0)
display.font("sans")
display.thickness(3)
name_length = display.measure_text(detail1_title, DETAILS_TEXT_SIZE)
display.text(detail1_title, LEFT_PADDING, HEIGHT - ((DETAILS_HEIGHT * 3) // 2), DETAILS_TEXT_SIZE)
display.thickness(2)
display.text(detail1_text, 5 + name_length + DETAIL_SPACING, HEIGHT - ((DETAILS_HEIGHT * 3) // 2), DETAILS_TEXT_SIZE)
# Draw the second detail's title and text
display.thickness(3)
name_length = display.measure_text(detail2_title, DETAILS_TEXT_SIZE)
display.text(detail2_title, LEFT_PADDING, HEIGHT - (DETAILS_HEIGHT // 2), DETAILS_TEXT_SIZE)
display.thickness(2)
display.text(detail2_text, LEFT_PADDING + name_length + DETAIL_SPACING, HEIGHT - (DETAILS_HEIGHT // 2), DETAILS_TEXT_SIZE)
# ------------------------------
# Program setup
# ------------------------------
# Global variables
show_overlay = False
# Create a new Badger and set it to update NORMAL
display = badger2040.Badger2040()
display.update_speed(badger2040.UPDATE_NORMAL)
# Open the badge file
try:
badge = open("badge.txt", "r")
except OSError:
badge = open("badge.txt", "w")
badge.write(DEFAULT_TEXT)
badge.flush()
badge.seek(0)
# Read in the next 6 lines
company = badge.readline() # "mustelid inc"
name = badge.readline() # "H. Badger"
detail1_title = badge.readline() # "RP2040"
detail1_text = badge.readline() # "2MB Flash"
detail2_title = badge.readline() # "E ink"
detail2_text = badge.readline() # "296x128px"
# Truncate all of the text (except for the name as that is scaled)
company = truncatestring(company, COMPANY_TEXT_SIZE, TEXT_WIDTH)
detail1_title = truncatestring(detail1_title, DETAILS_TEXT_SIZE, TEXT_WIDTH)
detail1_text = truncatestring(detail1_text, DETAILS_TEXT_SIZE,
TEXT_WIDTH - DETAIL_SPACING - display.measure_text(detail1_title, DETAILS_TEXT_SIZE))
detail2_title = truncatestring(detail2_title, DETAILS_TEXT_SIZE, TEXT_WIDTH)
detail2_text = truncatestring(detail2_text, DETAILS_TEXT_SIZE,
TEXT_WIDTH - DETAIL_SPACING - display.measure_text(detail2_title, DETAILS_TEXT_SIZE))
# Set up the buttons
button_a = machine.Pin(badger2040.BUTTON_A, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_b = machine.Pin(badger2040.BUTTON_B, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_c = machine.Pin(badger2040.BUTTON_C, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_up = machine.Pin(badger2040.BUTTON_UP, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_down = machine.Pin(badger2040.BUTTON_DOWN, machine.Pin.IN, machine.Pin.PULL_DOWN)
# Button handling function
def button(pin):
global show_overlay
if pin == button_a:
show_overlay = True
return
if pin == button_b:
show_overlay = True
return
if pin == button_c:
show_overlay = True
return
if pin == button_up:
show_overlay = True
return
if pin == button_down:
show_overlay = True
return
# Register the button handling function with the buttons
button_a.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_b.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_c.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_up.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_down.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
# ------------------------------
# Main program loop
# ------------------------------
draw_badge()
display.update()
while True:
if show_overlay:
draw_overlay("To change the text, connect Badger2040 to a PC, load up Thonny, and modify badge.txt",
WIDTH - OVERLAY_BORDER, HEIGHT - OVERLAY_BORDER, OVERLAY_SPACING, OVERLAY_TEXT_SIZE)
display.update()
time.sleep(4)
draw_badge()
display.update()
show_overlay = False
time.sleep(0.1)

View File

@ -0,0 +1,134 @@
import badger2040
from machine import Pin, ADC
import time
# Global Constants
MAX_BATTERY_VOLTAGE = 4.0
MIN_BATTERY_VOLTAGE = 3.2
WIDTH = badger2040.WIDTH
HEIGHT = badger2040.HEIGHT
BATT_WIDTH = 200
BATT_HEIGHT = 100
BATT_BORDER = 10
BATT_TERM_WIDTH = 20
BATT_TERM_HEIGHT = 50
BATT_BAR_PADDING = 10
BATT_BAR_HEIGHT = BATT_HEIGHT - (BATT_BORDER * 2) - (BATT_BAR_PADDING * 2)
BATT_BAR_START = ((WIDTH - BATT_WIDTH) // 2) + BATT_BORDER + BATT_BAR_PADDING
BATT_BAR_END = ((WIDTH + BATT_WIDTH) // 2) - BATT_BORDER - BATT_BAR_PADDING
NUM_BATT_BARS = 4
# ------------------------------
# Utility functions
# ------------------------------
def map_value(input, in_min, in_max, out_min, out_max):
return (((input - in_min) * (out_max - out_min)) / (in_max - in_min)) + out_min
# ------------------------------
# Drawing functions
# ------------------------------
# Draw the frame of the reader
def draw_battery(level, resolution):
display.pen(15)
display.clear()
display.thickness(1)
# Draw the battery outline
display.pen(0)
display.rectangle((WIDTH - BATT_WIDTH) // 2, (HEIGHT - BATT_HEIGHT) // 2,
BATT_WIDTH, BATT_HEIGHT)
display.rectangle((WIDTH + BATT_WIDTH) // 2, (HEIGHT - BATT_TERM_HEIGHT) // 2,
BATT_TERM_WIDTH, BATT_TERM_HEIGHT)
display.pen(15)
display.rectangle((WIDTH - BATT_WIDTH) // 2 + BATT_BORDER, (HEIGHT - BATT_HEIGHT) // 2 + BATT_BORDER,
BATT_WIDTH - BATT_BORDER * 2, BATT_HEIGHT - BATT_BORDER * 2)
# Add a special check for no battery
if level < 1:
X = WIDTH // 2
Y = HEIGHT // 2
display.pen(0)
display.thickness(1)
thickness = (BATT_BORDER * 3) // 2
start_extra = thickness // 3
end_extra = (thickness * 2) // 3
for i in range(0, thickness):
excess = (i // 2)
display.line(X - (BATT_HEIGHT // 2) + i - excess - start_extra, Y - (BATT_HEIGHT // 2) - excess - start_extra,
X + (BATT_HEIGHT // 2) + i - excess + end_extra, Y + (BATT_HEIGHT // 2) - excess + end_extra)
display.pen(15)
for i in range(0 - thickness, 0):
display.line(X - (BATT_HEIGHT // 2) + i, Y - (BATT_HEIGHT // 2),
X + (BATT_HEIGHT // 2) + i, Y + (BATT_HEIGHT // 2))
else:
# Draw the battery bars
display.pen(0)
length = (BATT_BAR_END - BATT_BAR_START - ((NUM_BATT_BARS - 1) * BATT_BAR_PADDING)) // NUM_BATT_BARS
current_level = 0.0
normalised_level = level / resolution
for i in range(NUM_BATT_BARS):
current_level = (1.0 * i) / NUM_BATT_BARS
if normalised_level > current_level:
pos = i * (length + BATT_BAR_PADDING)
display.rectangle(BATT_BAR_START + pos, (HEIGHT - BATT_BAR_HEIGHT) // 2,
length, BATT_BAR_HEIGHT)
display.update()
# ------------------------------
# Program setup
# ------------------------------
# Create a new Badger and set it to update FAST
display = badger2040.Badger2040()
display.update_speed(badger2040.UPDATE_FAST)
# Set up the ADCs for measuring battery voltage
vbat_adc = ADC(badger2040.PIN_BATTERY)
vref_adc = ADC(badger2040.PIN_1V2_REF)
vref_en = Pin(badger2040.PIN_VREF_POWER)
vref_en.init(Pin.OUT)
vref_en.value(0)
# ------------------------------
# Main program loop
# ------------------------------
last_level = -1
while True:
# Enable the onboard voltage reference
vref_en.value(1)
# Calculate the logic supply voltage, as will be lower that the usual 3.3V when running off low batteries
vdd = 1.24 * (65535 / vref_adc.read_u16())
vbat = (vbat_adc.read_u16() / 65535) * 3 * vdd # 3 in this is a gain, not rounding of 3.3V
# Disable the onboard voltage reference
vref_en.value(0)
# Print out the voltage
print("Battery Voltage = ", vbat, "V", sep="")
# Convert the voltage to a level to display onscreen
level = int(map_value(vbat, MIN_BATTERY_VOLTAGE, MAX_BATTERY_VOLTAGE, 0, NUM_BATT_BARS))
# Only draw if the battery level has changed significantly
if level != last_level:
draw_battery(level, NUM_BATT_BARS)
last_level = level
time.sleep(1)

View File

@ -0,0 +1,60 @@
import badger2040
import machine
import time
display = badger2040.Badger2040()
display.update_speed(badger2040.UPDATE_TURBO)
display.pen(15)
display.clear()
display.update()
button_a = machine.Pin(badger2040.BUTTON_A, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_b = machine.Pin(badger2040.BUTTON_B, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_c = machine.Pin(badger2040.BUTTON_C, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_up = machine.Pin(badger2040.BUTTON_UP, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_down = machine.Pin(badger2040.BUTTON_DOWN, machine.Pin.IN, machine.Pin.PULL_DOWN)
message = None
message_y = 60
def button(pin):
global message
if message is not None:
return
if pin == button_a:
message = "Button A"
return
if pin == button_b:
message = "Button B"
return
if pin == button_c:
message = "Button C"
return
if pin == button_up:
message = "Button U"
return
if pin == button_down:
message = "Button D"
return
button_a.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_b.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_c.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_up.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_down.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
while True:
if message is not None:
display.pen(15)
display.clear()
display.pen(0)
display.thickness(4)
display.text(message, 10, message_y, 2.0)
for _ in range(2):
display.update()
message = None
time.sleep(0.1)

View File

@ -0,0 +1,291 @@
import badger2040
import machine
import time
# **** Put your list title and contents here *****
list_title = "Checklist"
list_content = ["Badger", "Badger", "Badger", "Badger", "Badger", "Mushroom", "Mushroom", "Snake"]
list_states = [False] * len(list_content)
try:
with open("checklist.txt", "r") as f:
list_content = f.read().split("\n")
list_title = list_content.pop(0)
for i in range(len(list_content)):
if list_content[i].endswith(" X"):
list_states[i] = True
list_content[i] = list_content[i][:-2]
except OSError:
pass
# Global Constants
WIDTH = badger2040.WIDTH
HEIGHT = badger2040.HEIGHT
ARROW_THICKNESS = 3
ARROW_WIDTH = 18
ARROW_HEIGHT = 14
ARROW_PADDING = 2
MAX_ITEM_CHARS = 26
TITLE_TEXT_SIZE = 0.7
ITEM_TEXT_SIZE = 0.6
ITEM_SPACING = 20
LIST_START = 40
LIST_PADDING = 2
LIST_WIDTH = WIDTH - LIST_PADDING - LIST_PADDING - ARROW_WIDTH
LIST_HEIGHT = HEIGHT - LIST_START - LIST_PADDING - ARROW_HEIGHT
# ------------------------------
# Drawing functions
# ------------------------------
# Draw the list of items
def draw_list(items, item_states, start_item, highlighted_item, x, y, width, height, item_height, columns):
item_x = 0
item_y = 0
current_col = 0
for i in range(start_item, len(items)):
if i == highlighted_item:
display.pen(12)
display.rectangle(item_x, item_y + y - (item_height // 2), width // columns, item_height)
display.pen(0)
display.text(items[i], item_x + x + item_height, item_y + y, ITEM_TEXT_SIZE)
draw_checkbox(item_x, item_y + y - (item_height // 2), item_height, 15, 0, 2, item_states[i], 2)
item_y += item_height
if item_y >= height - (item_height // 2):
item_x += width // columns
item_y = 0
current_col += 1
if current_col >= columns:
return
# Draw a upward arrow
def draw_up(x, y, width, height, thickness, padding):
border = (thickness // 4) + padding
display.line(x + border, y + height - border,
x + (width // 2), y + border)
display.line(x + (width // 2), y + border,
x + width - border, y + height - border)
# Draw a downward arrow
def draw_down(x, y, width, height, thickness, padding):
border = (thickness // 2) + padding
display.line(x + border, y + border,
x + (width // 2), y + height - border)
display.line(x + (width // 2), y + height - border,
x + width - border, y + border)
# Draw a left arrow
def draw_left(x, y, width, height, thickness, padding):
border = (thickness // 2) + padding
display.line(x + width - border, y + border,
x + border, y + (height // 2))
display.line(x + border, y + (height // 2),
x + width - border, y + height - border)
# Draw a right arrow
def draw_right(x, y, width, height, thickness, padding):
border = (thickness // 2) + padding
display.line(x + border, y + border,
x + width - border, y + (height // 2))
display.line(x + width - border, y + (height // 2),
x + border, y + height - border)
# Draw a tick
def draw_tick(x, y, width, height, thickness, padding):
border = (thickness // 2) + padding
display.line(x + border, y + ((height * 2) // 3),
x + (width // 2), y + height - border)
display.line(x + (width // 2), y + height - border,
x + width - border, y + border)
# Draw a cross
def draw_cross(x, y, width, height, thickness, padding):
border = (thickness // 2) + padding
display.line(x + border, y + border, x + width - border, y + height - border)
display.line(x + width - border, y + border, x + border, y + height - border)
# Draw a checkbox with or without a tick
def draw_checkbox(x, y, size, background, foreground, thickness, tick, padding):
border = (thickness // 2) + padding
display.pen(background)
display.rectangle(x + border, y + border, size - (border * 2), size - (border * 2))
display.pen(foreground)
display.thickness(thickness)
display.line(x + border, y + border, x + size - border, y + border)
display.line(x + border, y + border, x + border, y + size - border)
display.line(x + size - border, y + border, x + size - border, y + size - border)
display.line(x + border, y + size - border, x + size - border, y + size - border)
if tick:
draw_tick(x, y, size, size, thickness, 2 + border)
# ------------------------------
# Program setup
# ------------------------------
# Global variables
update = True
current_item = 0
items_per_page = 0
# Create a new Badger and set it to update FAST
display = badger2040.Badger2040()
display.update_speed(badger2040.UPDATE_FAST)
# Set up the buttons
button_a = machine.Pin(badger2040.BUTTON_A, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_b = machine.Pin(badger2040.BUTTON_B, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_c = machine.Pin(badger2040.BUTTON_C, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_up = machine.Pin(badger2040.BUTTON_UP, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_down = machine.Pin(badger2040.BUTTON_DOWN, machine.Pin.IN, machine.Pin.PULL_DOWN)
# Find out what the longest item is
longest_item = 0
for i in range(len(list_content)):
while True:
item = list_content[i]
item_length = display.measure_text(item, ITEM_TEXT_SIZE)
if item_length > 0 and item_length > LIST_WIDTH - ITEM_SPACING:
list_content[i] = item[:-1]
else:
break
longest_item = max(longest_item, display.measure_text(list_content[i], ITEM_TEXT_SIZE))
# And use that to calculate the number of columns we can fit onscreen and how many items that would give
list_columns = 1
while longest_item + ITEM_SPACING < (LIST_WIDTH // (list_columns + 1)):
list_columns += 1
items_per_page = ((LIST_HEIGHT // ITEM_SPACING) + 1) * list_columns
# Button handling function
def button(pin):
global update
global current_item
if len(list_content) > 0 and not update:
if pin == button_a:
if current_item > 0:
current_item = max(current_item - (items_per_page) // list_columns, 0)
update = True
return
if pin == button_b:
list_states[current_item] = not list_states[current_item]
update = True
return
if pin == button_c:
if current_item < len(list_content) - 1:
current_item = min(current_item + (items_per_page) // list_columns, len(list_content) - 1)
update = True
return
if pin == button_up:
if current_item > 0:
current_item -= 1
update = True
return
if pin == button_down:
if current_item < len(list_content) - 1:
current_item += 1
update = True
return
# Register the button handling function with the buttons
button_a.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_b.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_c.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_up.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_down.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
# ------------------------------
# Main program loop
# ------------------------------
while True:
if update:
display.pen(15)
display.clear()
display.pen(12)
display.rectangle(WIDTH - ARROW_WIDTH, 0, ARROW_WIDTH, HEIGHT)
display.rectangle(0, HEIGHT - ARROW_HEIGHT, WIDTH, ARROW_HEIGHT)
y = LIST_PADDING + 12
display.pen(0)
display.thickness(3)
display.text(list_title, LIST_PADDING, y, TITLE_TEXT_SIZE)
y += 12
display.pen(0)
display.thickness(2)
display.line(LIST_PADDING, y, WIDTH - LIST_PADDING - ARROW_WIDTH, y)
if len(list_content) > 0:
page_item = 0
if items_per_page > 0:
page_item = (current_item // items_per_page) * items_per_page
# Draw the list
display.pen(0)
display.thickness(2)
draw_list(list_content, list_states, page_item, current_item, LIST_PADDING, LIST_START,
LIST_WIDTH, LIST_HEIGHT, ITEM_SPACING, list_columns)
# Draw the interaction button icons
display.pen(0)
display.thickness(ARROW_THICKNESS)
# Previous item
if current_item > 0:
draw_up(WIDTH - ARROW_WIDTH, (HEIGHT // 4) - (ARROW_HEIGHT // 2),
ARROW_WIDTH, ARROW_HEIGHT, ARROW_THICKNESS, ARROW_PADDING)
# Next item
if current_item < (len(list_content) - 1):
draw_down(WIDTH - ARROW_WIDTH, ((HEIGHT * 3) // 4) - (ARROW_HEIGHT // 2),
ARROW_WIDTH, ARROW_HEIGHT, ARROW_THICKNESS, ARROW_PADDING)
# Previous column
if current_item > 0:
draw_left((WIDTH // 7) - (ARROW_WIDTH // 2), HEIGHT - ARROW_HEIGHT,
ARROW_WIDTH, ARROW_HEIGHT, ARROW_THICKNESS, ARROW_PADDING)
# Next column
if current_item < (len(list_content) - 1):
draw_right(((WIDTH * 6) // 7) - (ARROW_WIDTH // 2), HEIGHT - ARROW_HEIGHT,
ARROW_WIDTH, ARROW_HEIGHT, ARROW_THICKNESS, ARROW_PADDING)
if list_states[current_item]:
# Tick off item
draw_cross((WIDTH // 2) - (ARROW_WIDTH // 2), HEIGHT - ARROW_HEIGHT,
ARROW_HEIGHT, ARROW_HEIGHT, ARROW_THICKNESS, ARROW_PADDING)
else:
# Untick item
draw_tick((WIDTH // 2) - (ARROW_WIDTH // 2), HEIGHT - ARROW_HEIGHT,
ARROW_HEIGHT, ARROW_HEIGHT, ARROW_THICKNESS, ARROW_PADDING)
else:
# Say that the list is empty
empty_text = "Nothing Here"
text_length = display.measure_text(empty_text, ITEM_TEXT_SIZE)
display.text(empty_text, ((LIST_PADDING + LIST_WIDTH) - text_length) // 2, (LIST_HEIGHT // 2) + LIST_START - (ITEM_SPACING // 4), ITEM_TEXT_SIZE)
display.update()
display.update_speed(badger2040.UPDATE_TURBO)
update = False
time.sleep(0.1)

View File

@ -0,0 +1,30 @@
import time
import badger2040
from machine import RTC
rtc = RTC()
screen = badger2040.Badger2040()
screen.update_speed(badger2040.UPDATE_TURBO)
screen.font("gothic")
year, month, day, wd, hour, minute, second, _ = rtc.datetime()
if (year, month, day) == (2021, 1, 1):
rtc.datetime((2022, 2, 25, 3, 12, 0, 0, 0))
while True:
year, month, day, wd, hour, minute, second, _ = rtc.datetime()
hms = "{:02}:{:02}:{:02}".format(hour, minute, second)
ymd = "{:04}/{:02}/{:02}".format(year, month, day)
screen.pen(15)
screen.clear()
screen.pen(0)
screen.thickness(5)
screen.text(hms, 0, 40, 1.8)
screen.thickness(3)
screen.text(ymd, 0, 100, 1.0)
screen.update()
time.sleep(0.5)

View File

@ -0,0 +1,234 @@
import badger2040
import machine
import time
import gc
try:
open("witw.txt", "r")
except OSError:
try:
import witw
open("witw.txt", "wb").write(witw.data())
del witw
except ImportError:
pass
gc.collect()
# **** Put the name of your text file here *****
text_file = "witw.txt" # File must be on the MicroPython device
# Global Constants
WIDTH = badger2040.WIDTH
HEIGHT = badger2040.HEIGHT
ARROW_THICKNESS = 3
ARROW_WIDTH = 18
ARROW_HEIGHT = 14
ARROW_PADDING = 2
TEXT_PADDING = 4
TEXT_SPACING = 20
TEXT_SIZE = 0.5
TEXT_WIDTH = WIDTH - TEXT_PADDING - TEXT_PADDING - ARROW_WIDTH
# ------------------------------
# Drawing functions
# ------------------------------
# Draw a upward arrow
def draw_up(x, y, width, height, thickness, padding):
border = (thickness // 4) + padding
display.line(x + border, y + height - border,
x + (width // 2), y + border)
display.line(x + (width // 2), y + border,
x + width - border, y + height - border)
# Draw a downward arrow
def draw_down(x, y, width, height, thickness, padding):
border = (thickness // 2) + padding
display.line(x + border, y + border,
x + (width // 2), y + height - border)
display.line(x + (width // 2), y + height - border,
x + width - border, y + border)
# Draw the frame of the reader
def draw_frame():
display.pen(15)
display.clear()
display.pen(12)
display.rectangle(WIDTH - ARROW_WIDTH, 0, ARROW_WIDTH, HEIGHT)
display.pen(0)
display.thickness(ARROW_THICKNESS)
if current_page > 1:
draw_up(WIDTH - ARROW_WIDTH, (HEIGHT // 4) - (ARROW_HEIGHT // 2),
ARROW_WIDTH, ARROW_HEIGHT, ARROW_THICKNESS, ARROW_PADDING)
draw_down(WIDTH - ARROW_WIDTH, ((HEIGHT * 3) // 4) - (ARROW_HEIGHT // 2),
ARROW_WIDTH, ARROW_HEIGHT, ARROW_THICKNESS, ARROW_PADDING)
# ------------------------------
# Program setup
# ------------------------------
# Global variables
next_page = True
prev_page = False
last_offset = 0
current_page = 0
# Create a new Badger and set it to update FAST
display = badger2040.Badger2040()
display.update_speed(badger2040.UPDATE_FAST)
# Set up the buttons
button_down = machine.Pin(badger2040.BUTTON_DOWN, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_up = machine.Pin(badger2040.BUTTON_UP, machine.Pin.IN, machine.Pin.PULL_DOWN)
# Set up the activity LED
led = machine.Pin(badger2040.PIN_LED, machine.Pin.OUT)
offsets = []
# Button handling function
def button(pin):
global next_page, prev_page
if pin == button_down:
next_page = True
if pin == button_up:
prev_page = True
# Register the button handling function with the buttons
button_down.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_up.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
# ------------------------------
# Render page
# ------------------------------
def render_page():
row = 0
line = ""
pos = ebook.tell()
next_pos = pos
add_newline = False
while True:
# Read a full line and split it into words
words = ebook.readline().split(" ")
# Take the length of the first word and advance our position
next_word = words[0]
if len(words) > 1:
next_pos += len(next_word) + 1
else:
next_pos += len(next_word) # This is the last word on the line
# Advance our position further if the word contains special characters
if '\u201c' in next_word:
next_word = next_word.replace('\u201c', '\"')
next_pos += 2
if '\u201d' in next_word:
next_word = next_word.replace('\u201d', '\"')
next_pos += 2
if '\u2019' in next_word:
next_word = next_word.replace('\u2019', '\'')
next_pos += 2
# Rewind the file back from the line end to the start of the next word
ebook.seek(next_pos)
# Strip out any new line characters from the word
next_word = next_word.strip()
# If an empty word is encountered assume that means there was a blank line
if len(next_word) == 0:
add_newline = True
# Append the word to the current line and measure its length
appended_line = line
if len(line) > 0 and len(next_word) > 0:
appended_line += " "
appended_line += next_word
appended_length = display.measure_text(appended_line, TEXT_SIZE)
# Would this appended line be longer than the text display area, or was a blank line spotted?
if appended_length >= TEXT_WIDTH or add_newline:
# Yes, so write out the line prior to the append
print(line)
display.pen(0)
display.thickness(2)
display.text(line, TEXT_PADDING, (row * TEXT_SPACING) + (TEXT_SPACING // 2) + TEXT_PADDING, TEXT_SIZE)
# Clear the line and move on to the next row
line = ""
row += 1
# Have we reached the end of the page?
if (row * TEXT_SPACING) + (TEXT_SPACING // 2) > HEIGHT:
print("+++++")
display.update()
# Reset the position to the start of the word that made this line too long
ebook.seek(pos)
return
else:
# Set the line to the word and advance the current position
line = next_word
pos = next_pos
# A new line was spotted, so advance a row
if add_newline:
print("")
row += 1
if (row * TEXT_SPACING) + (TEXT_SPACING // 2) > HEIGHT:
print("+++++")
display.update()
return
add_newline = False
else:
# The appended line was not too long, so set it as the line and advance the current position
line = appended_line
pos = next_pos
# ------------------------------
# Main program loop
# ------------------------------
# Open the book file
ebook = open(text_file, "r")
while True:
# Was the next page button pressed?
if next_page:
current_page += 1
# Is the next page one we've not displayed before?
if current_page > len(offsets):
offsets.append(ebook.tell()) # Add its start position to the offsets list
draw_frame()
render_page()
next_page = False # Clear the next page button flag
# Was the previous page button pressed?
if prev_page:
if current_page > 1:
current_page -= 1
ebook.seek(offsets[current_page - 1]) # Retrieve the start position of the last page
draw_frame()
render_page()
prev_page = False # Clear the prev page button flag
time.sleep(0.1)

View File

@ -0,0 +1,141 @@
import badger2040
import machine
import time
# Global Constants
FONT_NAMES = ("sans", "gothic", "cursive", "serif", "serif_italic")
WIDTH = badger2040.WIDTH
HEIGHT = badger2040.HEIGHT
MENU_TEXT_SIZE = 0.5
MENU_SPACING = 20
MENU_WIDTH = 84
MENU_PADDING = 2
TEXT_SIZE = 0.8
TEXT_INDENT = MENU_WIDTH + 10
ARROW_THICKNESS = 3
ARROW_WIDTH = 18
ARROW_HEIGHT = 14
ARROW_PADDING = 2
# ------------------------------
# Drawing functions
# ------------------------------
# Draw a upward arrow
def draw_up(x, y, width, height, thickness, padding):
border = (thickness // 4) + padding
display.line(x + border, y + height - border,
x + (width // 2), y + border)
display.line(x + (width // 2), y + border,
x + width - border, y + height - border)
# Draw a downward arrow
def draw_down(x, y, width, height, thickness, padding):
border = (thickness // 2) + padding
display.line(x + border, y + border,
x + (width // 2), y + height - border)
display.line(x + (width // 2), y + height - border,
x + width - border, y + border)
# Draw the frame of the reader
def draw_frame():
display.pen(15)
display.clear()
display.pen(12)
display.rectangle(WIDTH - ARROW_WIDTH, 0, ARROW_WIDTH, HEIGHT)
display.pen(0)
display.thickness(ARROW_THICKNESS)
draw_up(WIDTH - ARROW_WIDTH, (HEIGHT // 4) - (ARROW_HEIGHT // 2),
ARROW_WIDTH, ARROW_HEIGHT, ARROW_THICKNESS, ARROW_PADDING)
draw_down(WIDTH - ARROW_WIDTH, ((HEIGHT * 3) // 4) - (ARROW_HEIGHT // 2),
ARROW_WIDTH, ARROW_HEIGHT, ARROW_THICKNESS, ARROW_PADDING)
# Draw the fonts and menu
def draw_fonts():
display.font("sans")
display.thickness(1)
for i in range(len(FONT_NAMES)):
name = FONT_NAMES[i]
display.pen(0)
if i == selected_font:
display.rectangle(0, i * MENU_SPACING, MENU_WIDTH, MENU_SPACING)
display.pen(15)
display.text(name, MENU_PADDING, (i * MENU_SPACING) + (MENU_SPACING // 2), MENU_TEXT_SIZE)
display.font(FONT_NAMES[selected_font])
display.thickness(2)
display.pen(0)
display.text("The quick", TEXT_INDENT, 10, TEXT_SIZE)
display.text("brown fox", TEXT_INDENT, 32, TEXT_SIZE)
display.text("jumped over", TEXT_INDENT, 54, TEXT_SIZE)
display.text("the lazy dog.", TEXT_INDENT, 76, TEXT_SIZE)
display.text("0123456789", TEXT_INDENT, 98, TEXT_SIZE)
display.text("!\"£$%^&*()", TEXT_INDENT, 120, TEXT_SIZE)
display.thickness(1)
display.update()
# ------------------------------
# Program setup
# ------------------------------
# Global variables
selected_font = 0
pressed = False
# Create a new Badger and set it to update FAST
display = badger2040.Badger2040()
display.update_speed(badger2040.UPDATE_FAST)
# Set up the buttons
button_up = machine.Pin(badger2040.BUTTON_UP, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_down = machine.Pin(badger2040.BUTTON_DOWN, machine.Pin.IN, machine.Pin.PULL_DOWN)
# Button handling function
def button(pin):
global pressed
global selected_font
if not pressed:
if pin == button_up:
selected_font -= 1
if selected_font < 0:
selected_font = len(FONT_NAMES) - 1
pressed = True
return
if pin == button_down:
selected_font += 1
if selected_font >= len(FONT_NAMES):
selected_font = 0
pressed = True
return
# Register the button handling function with the buttons
button_up.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_down.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
# ------------------------------
# Main program loop
# ------------------------------
while True:
draw_frame()
draw_fonts()
pressed = False
while not pressed:
time.sleep(0.1)

View File

@ -0,0 +1,37 @@
import badger2040
from badger2040 import WIDTH
TEXT_SIZE = 0.45
LINE_HEIGHT = 16
display = badger2040.Badger2040()
display.pen(0)
display.rectangle(0, 0, WIDTH, 16)
display.thickness(1)
display.pen(15)
display.text("badgerOS", 3, 8, 0.4)
display.pen(0)
y = 16 + int(LINE_HEIGHT / 2)
display.thickness(2)
display.text("Normal:", 0, y, TEXT_SIZE)
display.thickness(1)
y += LINE_HEIGHT
display.text("Up / Down - Change launcher page", 0, y, TEXT_SIZE)
y += LINE_HEIGHT
display.text("a, b or c - Launch app", 0, y, TEXT_SIZE)
y += LINE_HEIGHT
y += LINE_HEIGHT
display.thickness(2)
display.text("Holding USER button:", 0, y, TEXT_SIZE)
display.thickness(1)
y += LINE_HEIGHT
display.text("Up / Down - Change font size", 0, y, TEXT_SIZE)
y += LINE_HEIGHT
display.text("a - Toggle invert", 0, y, TEXT_SIZE)
y += LINE_HEIGHT
display.update()

View File

@ -0,0 +1,148 @@
import os
import sys
import time
import machine
import badger2040
from badger2040 import WIDTH, HEIGHT
REAMDE = """
Images must be 296x128 pixel with 1bit colour depth.
You can use examples/badger2040/image_converter/convert.py to convert them:
python3 convert.py --binary --resize image_file_1.png image_file_2.png image_file_3.png
Create a new "images" directory via Thonny, and upload the .bin files there.
"""
OVERLAY_BORDER = 40
OVERLAY_SPACING = 20
OVERLAY_TEXT_SIZE = 0.5
TOTAL_IMAGES = 0
# Try to preload BadgerPunk image
try:
os.mkdir("images")
except OSError:
pass
try:
import badgerpunk
with open("images/badgerpunk.bin", "wb") as f:
f.write(badgerpunk.data())
f.flush()
with open("images/readme.txt", "w") as f:
f.write(REAMDE)
f.flush()
del badgerpunk
except (OSError, ImportError):
pass
try:
IMAGES = [f for f in os.listdir("/images") if f.endswith(".bin")]
TOTAL_IMAGES = len(IMAGES)
except OSError:
pass
display = badger2040.Badger2040()
button_a = machine.Pin(badger2040.BUTTON_A, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_b = machine.Pin(badger2040.BUTTON_B, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_c = machine.Pin(badger2040.BUTTON_C, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_up = machine.Pin(badger2040.BUTTON_UP, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_down = machine.Pin(badger2040.BUTTON_DOWN, machine.Pin.IN, machine.Pin.PULL_DOWN)
image = bytearray(int(296 * 128 / 8))
current_image = 0
# Draw an overlay box with a given message within it
def draw_overlay(message, width, height, line_spacing, text_size):
# Draw a light grey background
display.pen(12)
display.rectangle((WIDTH - width) // 2, (HEIGHT - height) // 2, width, height)
# Take the provided message and split it up into
# lines that fit within the specified width
words = message.split(" ")
lines = []
current_line = ""
for word in words:
if display.measure_text(current_line + word + " ", text_size) < width:
current_line += word + " "
else:
lines.append(current_line.strip())
current_line = word + " "
lines.append(current_line.strip())
display.pen(0)
display.thickness(2)
# Display each line of text from the message, centre-aligned
num_lines = len(lines)
for i in range(num_lines):
length = display.measure_text(lines[i], text_size)
current_line = (i * line_spacing) - ((num_lines - 1) * line_spacing) // 2
display.text(lines[i], (WIDTH - length) // 2, (HEIGHT // 2) + current_line, text_size)
def show_image(n):
file = IMAGES[n]
name = file.split(".")[0]
open("images/{}".format(file), "r").readinto(image)
display.image(image)
name_length = display.measure_text(name, 0.5)
display.pen(0)
display.rectangle(0, HEIGHT - 21, name_length + 11, 21)
display.pen(15)
display.rectangle(0, HEIGHT - 20, name_length + 10, 20)
display.pen(0)
display.text(name, 5, HEIGHT - 10, 0.5)
for i in range(TOTAL_IMAGES):
x = 286
y = int((128 / 2) - (TOTAL_IMAGES * 10 / 2) + (i * 10))
display.pen(0)
display.rectangle(x, y, 8, 8)
if current_image != i:
display.pen(15)
display.rectangle(x + 1, y + 1, 6, 6)
display.update()
if TOTAL_IMAGES == 0:
display.pen(15)
display.clear()
draw_overlay("To run this demo, create an /images directory on your device and upload some 1bit 296x128 pixel images.", WIDTH - OVERLAY_BORDER, HEIGHT - OVERLAY_BORDER, OVERLAY_SPACING, OVERLAY_TEXT_SIZE)
display.update()
sys.exit()
show_image(current_image)
while True:
if button_up.value():
if current_image > 0:
current_image -= 1
show_image(current_image)
if button_down.value():
if current_image < TOTAL_IMAGES - 1:
current_image += 1
show_image(current_image)
if button_a.value() or button_b.value() or button_c.value():
display.pen(15)
display.clear()
draw_overlay("To add images connect Badger2040 to a PC, load up Thonny, and see readme.txt in images/", WIDTH - OVERLAY_BORDER, HEIGHT - OVERLAY_BORDER, OVERLAY_SPACING, 0.5)
display.update()
time.sleep(4)
show_image(current_image)
time.sleep(0.01)

View File

@ -0,0 +1,34 @@
import badger2040
from badger2040 import WIDTH
TEXT_SIZE = 0.45
LINE_HEIGHT = 16
display = badger2040.Badger2040()
display.pen(0)
display.rectangle(0, 0, WIDTH, 16)
display.thickness(1)
display.pen(15)
display.text("badgerOS", 3, 8, 0.4)
display.pen(0)
y = 16 + int(LINE_HEIGHT / 2)
display.text("Made by Pimoroni, powered by MicroPython", 0, y, TEXT_SIZE)
y += LINE_HEIGHT
display.text("Dual-core RP2040, 133MHz, 264KB RAM", 0, y, TEXT_SIZE)
y += LINE_HEIGHT
display.text("2MB Flash (1MB OS, 1MB Storage)", 0, y, TEXT_SIZE)
y += LINE_HEIGHT
display.text("296x128 pixel Black/White e-Ink", 0, y, TEXT_SIZE)
y += LINE_HEIGHT
y += LINE_HEIGHT
display.thickness(2)
display.text("For more info:", 0, y, TEXT_SIZE)
display.thickness(1)
y += LINE_HEIGHT
display.text("https://pimoroni.com/badger2040", 0, y, TEXT_SIZE)
display.update()

View File

@ -0,0 +1,244 @@
import gc
import os
import sys
import time
import math
import machine
import badger2040
from badger2040 import WIDTH
import launchericons
MAX_BATTERY_VOLTAGE = 4.0
MIN_BATTERY_VOLTAGE = 3.2
page = 0
font_size = 1
inverted = False
icons = bytearray(launchericons.data())
examples = [
("_clock.py", 0),
("_fonts.py", 1),
("_ebook.py", 2),
("_image.py", 3),
("_list.py", 4),
("_badge.py", 5),
("_info.py", 6),
("_help.py", 7)
]
font_sizes = (0.5, 0.7, 0.9)
# Approximate center lines for buttons A, B and C
centers = (41, 147, 253)
MAX_PAGE = math.ceil(len(examples) / 3)
button_a = machine.Pin(badger2040.BUTTON_A, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_b = machine.Pin(badger2040.BUTTON_B, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_c = machine.Pin(badger2040.BUTTON_C, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_up = machine.Pin(badger2040.BUTTON_UP, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_down = machine.Pin(badger2040.BUTTON_DOWN, machine.Pin.IN, machine.Pin.PULL_DOWN)
# Inverted. For reasons.
button_user = machine.Pin(badger2040.BUTTON_USER, machine.Pin.IN, machine.Pin.PULL_UP)
# Battery measurement
vbat_adc = machine.ADC(badger2040.PIN_BATTERY)
vref_adc = machine.ADC(badger2040.PIN_1V2_REF)
vref_en = machine.Pin(badger2040.PIN_VREF_POWER)
vref_en.init(machine.Pin.OUT)
vref_en.value(0)
display = badger2040.Badger2040()
def map_value(input, in_min, in_max, out_min, out_max):
return (((input - in_min) * (out_max - out_min)) / (in_max - in_min)) + out_min
def get_battery_level():
# Enable the onboard voltage reference
vref_en.value(1)
# Calculate the logic supply voltage, as will be lower that the usual 3.3V when running off low batteries
vdd = 1.24 * (65535 / vref_adc.read_u16())
vbat = (vbat_adc.read_u16() / 65535) * 3 * vdd # 3 in this is a gain, not rounding of 3.3V
# Disable the onboard voltage reference
vref_en.value(0)
# Convert the voltage to a level to display onscreen
return int(map_value(vbat, MIN_BATTERY_VOLTAGE, MAX_BATTERY_VOLTAGE, 0, 4))
def draw_battery(level, x, y):
# Outline
display.thickness(1)
display.pen(15)
display.rectangle(x, y, 19, 10)
# Terminal
display.rectangle(x + 19, y + 3, 2, 4)
display.pen(0)
display.rectangle(x + 1, y + 1, 17, 8)
if level < 1:
display.pen(0)
display.line(x + 3, y, x + 3 + 10, y + 10)
display.line(x + 3 + 1, y, x + 3 + 11, y + 10)
display.pen(15)
display.line(x + 2 + 2, y - 1, x + 4 + 12, y + 11)
display.line(x + 2 + 3, y - 1, x + 4 + 13, y + 11)
return
# Battery Bars
display.pen(15)
for i in range(4):
if level / 4 > (1.0 * i) / 4:
display.rectangle(i * 4 + x + 2, y + 2, 3, 6)
def draw_disk_usage(x):
# f_bfree and f_bavail should be the same?
# f_files, f_ffree, f_favail and f_flag are unsupported.
f_bsize, f_frsize, f_blocks, f_bfree, _, _, _, _, _, f_namemax = os.statvfs("/")
f_total_size = f_frsize * f_blocks
f_total_free = f_bsize * f_bfree
f_total_used = f_total_size - f_total_free
f_used = 100 / f_total_size * f_total_used
# f_free = 100 / f_total_size * f_total_free
display.image(bytearray((
0b00000000,
0b00111100,
0b00111100,
0b00111100,
0b00111000,
0b00000000,
0b00000000,
0b00000001)), 8, 8, x, 4)
display.pen(15)
display.rectangle(x + 10, 3, 80, 10)
display.pen(0)
display.rectangle(x + 11, 4, 78, 8)
display.pen(15)
display.rectangle(x + 12, 5, int(76 / 100.0 * f_used), 6)
display.text("{:.2f}%".format(f_used), x + 91, 8, 0.4)
def render():
display.pen(15)
display.clear()
display.pen(0)
display.thickness(2)
max_icons = min(3, len(examples[(page * 3):]))
for i in range(max_icons):
x = centers[i]
label, icon = examples[i + (page * 3)]
label = label[1:-3]
display.pen(0)
display.icon(icons, icon, 512, 64, x - 32, 24)
w = display.measure_text(label, font_sizes[font_size])
display.text(label, x - int(w / 2), 16 + 80, font_sizes[font_size])
for i in range(MAX_PAGE):
x = 286
y = int((128 / 2) - (MAX_PAGE * 10 / 2) + (i * 10))
display.pen(0)
display.rectangle(x, y, 8, 8)
if page != i:
display.pen(15)
display.rectangle(x + 1, y + 1, 6, 6)
display.pen(0)
display.rectangle(0, 0, WIDTH, 16)
display.thickness(1)
draw_disk_usage(90)
draw_battery(get_battery_level(), WIDTH - 22 - 3, 3)
display.pen(15)
display.text("badgerOS", 3, 8, 0.4)
display.update()
def launch(file):
for k in locals().keys():
if k not in ("gc", "file"):
del locals()[k]
gc.collect()
__import__(file)
sys.exit(0)
def launch_example(index):
try:
launch(examples[(page * 3) + index][0])
return True
except IndexError:
return False
def button(pin):
global page, font_size, inverted
if button_user.value(): # User button is NOT held down
if pin == button_a:
launch_example(0)
if pin == button_b:
launch_example(1)
if pin == button_c:
launch_example(2)
if pin == button_up:
if page > 0:
page -= 1
render()
if pin == button_down:
if page < MAX_PAGE - 1:
page += 1
render()
else: # User button IS held down
if pin == button_up:
font_size += 1
if font_size == len(font_sizes):
font_size = 0
render()
if pin == button_down:
font_size -= 1
if font_size < 0:
font_size = 0
render()
if pin == button_a:
inverted = not inverted
display.invert(inverted)
render()
display.update_speed(badger2040.UPDATE_MEDIUM)
render()
display.update_speed(badger2040.UPDATE_FAST)
# Wait for wakeup button to be released
while button_a.value() or button_b.value() or button_c.value() or button_up.value() or button_down.value():
pass
while True:
if button_a.value():
button(button_a)
if button_b.value():
button(button_b)
if button_c.value():
button(button_c)
if button_up.value():
button(button_up)
if button_down.value():
button(button_down)
time.sleep(0.01)

View File

@ -0,0 +1,65 @@
import badger2040
import machine
display = badger2040.Badger2040()
button_a = machine.Pin(badger2040.BUTTON_A, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_b = machine.Pin(badger2040.BUTTON_B, machine.Pin.IN, machine.Pin.PULL_DOWN)
display.thickness(10)
display.pen(0)
display.line(0, 5, 295, 5)
display.line(0, 123, 295, 123)
display.thickness(1)
for x in range(14):
display.line(x * 20, 10, x * 20, 118)
display.line(0, 0, 295, 127)
display.line(0, 127, 295, 0)
display.font("sans")
display.thickness(5)
display.text("Hello World", 10, 30, 1.0)
display.pen(7)
display.text("Hello World", 10, 60, 1.0)
display.pen(11)
display.text("Hello World", 10, 90, 1.0)
display.update()
dirty = False
pressed = None
def button(pin):
global dirty, pressed
if pin == button_a:
pressed = "Button A"
dirty = True
return
if pin == button_b:
pressed = "Button B"
dirty = True
return
button_a.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_b.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
# This breaks Thonny, since it's no longer possible to Stop the code
# need to press the reset button on the board...
# It will also crash your USB bus, probably, your whole bus...
# @micropython.asm_thumb
# def lightsleep():
# wfi()
while True:
if dirty:
display.pen(15)
display.clear()
display.pen(0)
display.text(pressed, 10, 60, 2.0)
display.update()
dirty = False
# machine.lightsleep() # Currently imposible to wake from this on IRQ

View File

@ -0,0 +1,35 @@
include_directories(${CMAKE_CURRENT_LIST_DIR}/../../)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../")
include(pimoroni_i2c/micropython)
include(breakout_dotmatrix/micropython)
include(breakout_encoder/micropython)
include(breakout_ioexpander/micropython)
include(breakout_ltr559/micropython)
include(breakout_colourlcd160x80/micropython)
include(breakout_as7262/micropython)
include(breakout_roundlcd/micropython)
include(breakout_rgbmatrix5x5/micropython)
include(breakout_matrix11x7/micropython)
include(breakout_msa301/micropython)
include(breakout_paa5100/micropython)
include(breakout_pmw3901/micropython)
include(breakout_mics6814/micropython)
include(breakout_potentiometer/micropython)
include(breakout_rtc/micropython)
include(breakout_trackball/micropython)
include(breakout_sgp30/micropython)
include(breakout_colourlcd240x240/micropython)
include(breakout_bh1745/micropython)
include(breakout_bme68x/micropython)
include(breakout_bme280/micropython)
include(breakout_bmp280/micropython)
include(breakout_icp10125/micropython)
include(breakout_scd41/micropython)
include(badger2040/micropython)
include(plasma/micropython)
include(ulab/code/micropython)

View File

@ -0,0 +1,407 @@
# Badger 2040 <!-- omit in toc -->
Badger 2040 is an RP2040 powered EInk badge.
- [Summary](#summary)
- [Getting Started](#getting-started)
- [Update Speed](#update-speed)
- [Buttons](#buttons)
- [Other Functions](#other-functions)
- [Other Constants](#other-constants)
- [Screen Size](#screen-size)
- [EInk Pins](#eink-pins)
- [Power Pins](#power-pins)
- [Activity LED Pin](#activity-led-pin)
- [Function Reference](#function-reference)
- [Basic Drawing Settings](#basic-drawing-settings)
- [Pen Colour](#pen-colour)
- [Pen Thickness](#pen-thickness)
- [Text](#text)
- [Draw Text](#draw-text)
- [Measure Text](#measure-text)
- [Change Font](#change-font)
- [Lines, Pixels & Rectangles](#lines-pixels--rectangles)
- [Pixel](#pixel)
- [Line](#line)
- [Rectangle](#rectangle)
- [Images](#images)
- [Converting Images](#converting-images)
- [Image](#image)
- [Icon](#icon)
- [Updating The Display](#updating-the-display)
- [Update](#update)
- [Clear](#clear)
- [Partial Update](#partial-update)
- [Invert (aka Dark Mode)](#invert-aka-dark-mode)
- [Update Speed](#update-speed-1)
- [LED](#led)
# Summary
## Getting Started
To start coding your Badger 2040, you will need to add the following lines of code to the start of your code file.
```python
import badger2040
badger = badger2040.Badger2040()
```
This will create a `Badger2040` class called `badger` that will be used in the rest of the examples going forward.
## Update Speed
The EInk display on Badger 2040 supports several update speeds. These can be set using `update_speed(speed)` where `speed` is a value from `0` to `3`. For convenience these speeds have been given the following constants:
* `UPDATE_NORMAL` = `0`
* `UPDATE_MEDIUM` = `1`
* `UPDATE_FAST` = `2`
* `UPDATE_TURBO` = `3`
## Buttons
Badger 2040 features five buttons on its front, labelled A, B, C, ↑ (up), ↓ (down), and 1 button on the rear labelled BOOT/USR. These can be read using the `pressed(button)` function, which accepts the button's pin number. For convenience, each button can be referred to using these constants:
* `BUTTON_A` = `12`
* `BUTTON_B` = `13`
* `BUTTON_C` = `14`
* `BUTTON_UP` = `15`
* `BUTTON_DOWN` = `11`
* `BUTTON_USER` = `23`
Note, due to the BOOT/USR button performing both BOOT and USER functions, the output of reading it with `pressed()` will be inverted from the others.
## Other Functions
Below is a list of other functions that have been made available, to help with the creation of more advanced programs.
```python
pen(color)
thickness(thickness)
pixel(x, y)
line(x1, y1, x2, y2)
rectangle(x, y, w, h)
text(message, x, y, scale=1.0, rotation=0.0)
glyph(char, x, y, scale=1.0, rotation=0.0)
measure_text(message, scale=1.0)
measure_glyph(char, scale=1.0)
font(font)
led(brightness)
image(data, w=298, h=128, x=0, y=0)
icon(data, icon_index, sheet_size, icon_size)
clear()
update()
partial_update(x, y, w, h)
update_speed(speed)
invert(inverted)
```
## Other Constants
Below is a list of other constants that have been made available, to help with the creation of more advanced programs.
### Screen Size
* `WIDTH` = `296`
* `HEIGHT` = `128`
### EInk Pins
* `PIN_CS` = `17`
* `PIN_CLK` = `18`
* `PIN_MOSI` = `19`
* `PIN_DC` = `20`
* `PIN_RESET` = `21`
* `PIN_BUSY` = `26`
### Power Pins
* `PIN_VBUS_DETECT` = `24`
* `PIN_VREF_POWER` = `27`
* `PIN_1V2_REF` = `28`
* `PIN_BATTERY` = `29`
* `PIN_ENABLE_3V3` = `10`
### Activity LED Pin
* `PIN_LED` = `25`
# Function Reference
## Basic Drawing Settings
### Pen Colour
There are 16 pen colours - or "shades of grey" - to choose, from 0 (black) to 15 (white).
Since Badger2040 cannot display colours other than black and white, any value from 1 to 14 will apply dithering when drawn, to simulate a shade of grey.
```python
pen(
colour # int: colour from 0 to 15
)
```
### Pen Thickness
Thickness governs how thick a line should be and affects lines and text making them thicker or bolder respectively:
```python
thickness(
value # int: thickness in pixels
)
```
## Text
### Draw Text
To draw text in your selected font:
```python
text(
text, # string: the text to draw
x, # int: x coordinate for the left middle of the text
y, # int: y coordinate for the left middle of the text
scale=1.0, # float: size of the text
rotation=0.0 # float: rotation of the text in degrees
)
```
Text uses the "thickness" value, too, and a larger thickness value will give you bold text.
### Measure Text
Sometimes it's useful to know how big a particular bit of text will be on the screen. You can measure it like so:
```python
measure_text(
text, # string: the text to measure
scale # float: size of the text
)
```
### Change Font
There are five fonts to pick from:
* "sans"
* "gothic"
* "cursive"
* "serif"
* "serif_italic"
```python
font(
font # string: one of the fonts listed above
)
```
## Lines, Pixels & Rectangles
The basic building blocks of any Badger2040 interface are lines and rectangles.
### Pixel
Single pixels are always drawn in your pen colour, and with the thickness set by `thickness`.
Be wary that colours other than 0 and 15 can result in your pixel being dithered, and invisible! Badger2040 cannot draw just *one* grey pixel, sorry.
```python
pixel(
x, # int: x coordinate of pixel to draw
y # int: y coordinate of pixel to draw
)
```
### Line
Lines are always drawn in your pen colour, and with the line thickness set by `thickness`.
```python
line(
x1, # int: x coordinate of starting point
y1, # int: y coordinate of starting point
x2, # int: x coordinate of ending point
y2, # int: y coordinate of ending point
)
```
### Rectangle
Rectangles are always drawn in your pen colour.
They are the best way to see the dithering effects of different pens since anything from 1 to 14 (ie: not full black or white) is dithered.
```python
rectangle(
x, # int: x coordinate of the rectangle's top left corner
y, # int: y coordinate of the rectangle's top left corner
w, # int: width of rectangle
h # int: height of rectangle
)
```
## Images
Must be a multiple of 8 pixels wide (because reasons).
You will normally be using a `bytearray` as your source of data.
To load an image you must first allocate a `bytearray` big enough to store it. The formula is `WIDTH * HEIGHT / 8` since there are eight image pixels in every byte (one bit per pixels indicating either 1 black or 0 white):
```python
my_image = bytearray(int(296 * 128 / 8))
```
You can then open your file and read it into your `bytearray`:
```python
open("my_image.bin", "r").readinto(my_image)
```
And finally display it:
```python
screen = badger2040.Badger2040()
screen.image(my_image)
screen.update()
```
### Converting Images
We've supplied a script - `convert.py` - which will help you get your images converted.
Ideally you should pick something already 298x128 pixels or smaller, and in monochrome, but it will dither and convert images for you.
Find it in [examples/badger2040/image_converter](examples/badger2040/image_converter).
To convert an oversized image use:
```bash
python3 convert.py --resize --binary my_image.png
```
This will output `my_image.bin`, which you can save to your Badger2040 via Thonny and display with the code above.
For smaller images such as icons you can omit the `--resize` flag:
```bash
python3 convert.py --binary my_icon.png
```
In all cases your images should be a multiple of 8 pixels wide.
### Image
```python
image(
data, # bytearray: raw image data 1bpp
w=298, # int: width in pixels
h=128, # int: height in pixels
x=0, # int: destination x
y=0, # int: destination y
)
```
When displaying a full-sized (296x128 pixel) image you can supply only the raw data, eg:
```python
image(data)
```
### Icon
Copies a portion from an icon sheet onto the screen at x/y.
Icons must be square- equal width/height- and sized in multiples of 8 pixels.
IE: 8x8, 16x16, 24x24, 32x32, 64x64
```python
icon(
data, # bytearray: raw image data 1bpp
icon_index, # int: location of the icon in the sheet, left-most is 0, etc
sheet_size, # int: width of the icon sheet in pixels
icon_size, # int: icon width/height in pixels (multiple of 8)
dx, # int: destination x
dy, # int: destination y
)
```
## Updating The Display
### Update
Starts a full update of the screen. Will block until the update has finished.
Update takes no parameters, but the update time will vary depending on which `update_speed` you've selected.
```python
update()
```
### Clear
Before drawing again it can be useful to `clear` your display.
`clear` fills the drawing buffer with the pen colour, giving you a clean slate:
```python
clear()
```
### Partial Update
Starts a partial update of the screen. Will block until the update has finished.
A partial update allows you to update a portion of the screen rather than the whole thing.
That portion *must* be a multiple of 8 pixels tall, but can be any number of pixels wide.
```python
partial_update(
x, # int: x coordinate of the update region
y, # int: y coordinate of the update region (must be a multiple of 8)
w, # int: width of the update region
h # int: height of the update region (must be a multiple of 8)
)
```
### Invert (aka Dark Mode)
Badger2040 can invert all your display data for a quick and easy dark mode:
```python
invert(
inverted # bool: True to invert, False to... not invert!
)
```
### Update Speed
Badger2040 is capable of updating the display at multiple different speeds.
These offer a tradeoff between the quality of the final image and the speed of the update.
There are currently four constants naming the different update speeds from 0 to 3:
* `UPDATE_NORMAL` - a normal update, great for display the first screen of your application and ensuring good contrast and no ghosting
* `UPDATE_MEDIUM` - a good balance of speed and clarity, you probably want this most of the time
* `UPDATE_FAST` - a fast update, good for stepping through screens such as the pages of a book or the launcher
* `UPDATE_TURBO` - a super fast update, prone to ghosting, great for making minor changes such as moving a cursor through a menu
```python
update_speed(
speed # int: one of the update constants
)
```
## LED
The white indicator LED can be controlled, with brightness ranging from 0 (off) to 255:
```python
led(
brightness # int: 0 (off) to 255 (full)
)
```

View File

@ -0,0 +1,124 @@
#include "badger2040.h"
/***** Methods *****/
MP_DEFINE_CONST_FUN_OBJ_1(Badger2040___del___obj, Badger2040___del__);
MP_DEFINE_CONST_FUN_OBJ_2(Badger2040_update_speed_obj, Badger2040_update_speed);
MP_DEFINE_CONST_FUN_OBJ_1(Badger2040_is_busy_obj, Badger2040_is_busy);
MP_DEFINE_CONST_FUN_OBJ_1(Badger2040_update_obj, Badger2040_update);
MP_DEFINE_CONST_FUN_OBJ_KW(Badger2040_partial_update_obj, 4, Badger2040_partial_update);
MP_DEFINE_CONST_FUN_OBJ_2(Badger2040_invert_obj, Badger2040_invert);
MP_DEFINE_CONST_FUN_OBJ_2(Badger2040_led_obj, Badger2040_led);
MP_DEFINE_CONST_FUN_OBJ_2(Badger2040_font_obj, Badger2040_font);
MP_DEFINE_CONST_FUN_OBJ_2(Badger2040_pen_obj, Badger2040_pen);
MP_DEFINE_CONST_FUN_OBJ_2(Badger2040_thickness_obj, Badger2040_thickness);
MP_DEFINE_CONST_FUN_OBJ_2(Badger2040_pressed_obj, Badger2040_pressed);
MP_DEFINE_CONST_FUN_OBJ_1(Badger2040_clear_obj, Badger2040_clear);
MP_DEFINE_CONST_FUN_OBJ_3(Badger2040_pixel_obj, Badger2040_pixel);
MP_DEFINE_CONST_FUN_OBJ_KW(Badger2040_line_obj, 4, Badger2040_line);
MP_DEFINE_CONST_FUN_OBJ_KW(Badger2040_rectangle_obj, 4, Badger2040_rectangle);
MP_DEFINE_CONST_FUN_OBJ_KW(Badger2040_icon_obj, 4, Badger2040_icon);
MP_DEFINE_CONST_FUN_OBJ_KW(Badger2040_image_obj, 2, Badger2040_image);
MP_DEFINE_CONST_FUN_OBJ_KW(Badger2040_text_obj, 4, Badger2040_text);
MP_DEFINE_CONST_FUN_OBJ_KW(Badger2040_glyph_obj, 4, Badger2040_glyph);
MP_DEFINE_CONST_FUN_OBJ_KW(Badger2040_measure_text_obj, 2, Badger2040_measure_text);
MP_DEFINE_CONST_FUN_OBJ_KW(Badger2040_measure_glyph_obj, 2, Badger2040_measure_glyph);
MP_DEFINE_CONST_FUN_OBJ_3(Badger2040_command_obj, Badger2040_command);
/***** Binding of Methods *****/
STATIC const mp_rom_map_elem_t Badger2040_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&Badger2040___del___obj) },
{ MP_ROM_QSTR(MP_QSTR_is_busy), MP_ROM_PTR(&Badger2040_is_busy_obj) },
{ MP_ROM_QSTR(MP_QSTR_update_speed), MP_ROM_PTR(&Badger2040_update_speed_obj) },
{ MP_ROM_QSTR(MP_QSTR_update), MP_ROM_PTR(&Badger2040_update_obj) },
{ MP_ROM_QSTR(MP_QSTR_partial_update), MP_ROM_PTR(&Badger2040_partial_update_obj) },
{ MP_ROM_QSTR(MP_QSTR_invert), MP_ROM_PTR(&Badger2040_invert_obj) },
{ MP_ROM_QSTR(MP_QSTR_led), MP_ROM_PTR(&Badger2040_led_obj) },
{ MP_ROM_QSTR(MP_QSTR_font), MP_ROM_PTR(&Badger2040_font_obj) },
{ MP_ROM_QSTR(MP_QSTR_pen), MP_ROM_PTR(&Badger2040_pen_obj) },
{ MP_ROM_QSTR(MP_QSTR_thickness), MP_ROM_PTR(&Badger2040_thickness_obj) },
{ MP_ROM_QSTR(MP_QSTR_pressed), MP_ROM_PTR(&Badger2040_pressed_obj) },
{ MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&Badger2040_clear_obj) },
{ MP_ROM_QSTR(MP_QSTR_pixel), MP_ROM_PTR(&Badger2040_pixel_obj) },
{ MP_ROM_QSTR(MP_QSTR_line), MP_ROM_PTR(&Badger2040_line_obj) },
{ MP_ROM_QSTR(MP_QSTR_rectangle), MP_ROM_PTR(&Badger2040_rectangle_obj) },
{ MP_ROM_QSTR(MP_QSTR_icon), MP_ROM_PTR(&Badger2040_icon_obj) },
{ MP_ROM_QSTR(MP_QSTR_image), MP_ROM_PTR(&Badger2040_image_obj) },
{ MP_ROM_QSTR(MP_QSTR_text), MP_ROM_PTR(&Badger2040_text_obj) },
{ MP_ROM_QSTR(MP_QSTR_glyph), MP_ROM_PTR(&Badger2040_glyph_obj) },
{ MP_ROM_QSTR(MP_QSTR_measure_text), MP_ROM_PTR(&Badger2040_measure_text_obj) },
{ MP_ROM_QSTR(MP_QSTR_measure_glyph), MP_ROM_PTR(&Badger2040_measure_glyph_obj) },
{ MP_ROM_QSTR(MP_QSTR_command), MP_ROM_PTR(&Badger2040_command_obj) },
};
STATIC MP_DEFINE_CONST_DICT(Badger2040_locals_dict, Badger2040_locals_dict_table);
/***** Class Definition *****/
const mp_obj_type_t Badger2040_type = {
{ &mp_type_type },
.name = MP_QSTR_badger2040,
.print = Badger2040_print,
.make_new = Badger2040_make_new,
.locals_dict = (mp_obj_dict_t*)&Badger2040_locals_dict,
};
/***** Globals Table *****/
STATIC const mp_map_elem_t badger2040_globals_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_badger2040) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_Badger2040), (mp_obj_t)&Badger2040_type },
{ MP_ROM_QSTR(MP_QSTR_UPDATE_NORMAL), MP_ROM_INT(0) },
{ MP_ROM_QSTR(MP_QSTR_UPDATE_MEDIUM), MP_ROM_INT(1) },
{ MP_ROM_QSTR(MP_QSTR_UPDATE_FAST), MP_ROM_INT(2) },
{ MP_ROM_QSTR(MP_QSTR_UPDATE_TURBO), MP_ROM_INT(3) },
{ MP_ROM_QSTR(MP_QSTR_UPDATE_SUPER_EXTRA_TURBO), MP_ROM_INT(3) }, // ho ho placebo!
{ MP_ROM_QSTR(MP_QSTR_WIDTH), MP_ROM_INT(296) },
{ MP_ROM_QSTR(MP_QSTR_HEIGHT), MP_ROM_INT(128) },
{ MP_ROM_QSTR(MP_QSTR_BUTTON_A), MP_ROM_INT(12) },
{ MP_ROM_QSTR(MP_QSTR_BUTTON_B), MP_ROM_INT(13) },
{ MP_ROM_QSTR(MP_QSTR_BUTTON_C), MP_ROM_INT(14) },
{ MP_ROM_QSTR(MP_QSTR_BUTTON_D), MP_ROM_INT(15) },
{ MP_ROM_QSTR(MP_QSTR_BUTTON_E), MP_ROM_INT(11) },
{ MP_ROM_QSTR(MP_QSTR_BUTTON_UP), MP_ROM_INT(15) }, // alias for D
{ MP_ROM_QSTR(MP_QSTR_BUTTON_DOWN), MP_ROM_INT(11) }, // alias for E
{ MP_ROM_QSTR(MP_QSTR_BUTTON_USER), MP_ROM_INT(23) },
{ MP_ROM_QSTR(MP_QSTR_PIN_CS), MP_ROM_INT(17) },
{ MP_ROM_QSTR(MP_QSTR_PIN_CLK), MP_ROM_INT(18) },
{ MP_ROM_QSTR(MP_QSTR_PIN_MOSI), MP_ROM_INT(19) },
{ MP_ROM_QSTR(MP_QSTR_PIN_DC), MP_ROM_INT(20) },
{ MP_ROM_QSTR(MP_QSTR_PIN_RESET), MP_ROM_INT(21) },
{ MP_ROM_QSTR(MP_QSTR_PIN_BUSY), MP_ROM_INT(26) },
{ MP_ROM_QSTR(MP_QSTR_PIN_VBUS_DETECT), MP_ROM_INT(24) },
{ MP_ROM_QSTR(MP_QSTR_PIN_LED), MP_ROM_INT(25) },
{ MP_ROM_QSTR(MP_QSTR_PIN_VREF_POWER), MP_ROM_INT(27) },
{ MP_ROM_QSTR(MP_QSTR_PIN_1V2_REF), MP_ROM_INT(28) },
{ MP_ROM_QSTR(MP_QSTR_PIN_BATTERY), MP_ROM_INT(29) },
{ MP_ROM_QSTR(MP_QSTR_PIN_ENABLE_3V3), MP_ROM_INT(10) },
};
STATIC MP_DEFINE_CONST_DICT(mp_module_badger2040_globals, badger2040_globals_table);
/***** Module Definition *****/
const mp_obj_module_t badger2040_user_cmodule = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_badger2040_globals,
};
MP_REGISTER_MODULE(MP_QSTR_badger2040, badger2040_user_cmodule, MODULE_BADGER2040_ENABLED);

View File

@ -0,0 +1,470 @@
#include <cstdio>
#include "badger2040.hpp"
#define MP_OBJ_TO_PTR2(o, t) ((t *)(uintptr_t)(o))
extern "C" {
#include "badger2040.h"
#include "py/builtin.h"
#include "py/mpthread.h"
std::string mp_obj_to_string_r(const mp_obj_t &obj) {
if(mp_obj_is_str_or_bytes(obj)) {
GET_STR_DATA_LEN(obj, str, str_len);
return (const char*)str;
}
else if(mp_obj_is_float(obj))
mp_raise_TypeError("can't convert 'float' object to str implicitly");
else if(mp_obj_is_int(obj))
mp_raise_TypeError("can't convert 'int' object to str implicitly");
else if(mp_obj_is_bool(obj))
mp_raise_TypeError("can't convert 'bool' object to str implicitly");
else
mp_raise_TypeError("can't convert object to str implicitly");
}
typedef struct _mp_obj_float_t {
mp_obj_base_t base;
mp_float_t value;
} mp_obj_float_t;
const mp_obj_float_t const_float_1 = {{&mp_type_float}, 1.0f};
/********** WS2812 **********/
/***** Variables Struct *****/
typedef struct _Badger2040_obj_t {
mp_obj_base_t base;
pimoroni::Badger2040* badger2040;
void *buf;
} _Badger2040_obj_t;
_Badger2040_obj_t *badger2040_obj;
/***** Print *****/
void Badger2040_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
(void)kind; // Unused input parameter
(void)self_in;
//_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
mp_print_str(print, "Badger2040( ");
mp_print_str(print, " )");
}
/***** Destructor ******/
mp_obj_t Badger2040___del__(mp_obj_t self_in) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
// Try to ensure power is cut off when soft reset (IE: "Stop" in Thonny)
self->badger2040->power_off();
delete self->badger2040;
return mp_const_none;
}
/***** Constructor *****/
mp_obj_t Badger2040_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
enum { ARG_buffer };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_buffer, MP_ARG_OBJ, {.u_obj = nullptr} }
};
// Parse args.
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
int width = 296;
int height = 128;
uint8_t *buffer = nullptr;
if (args[ARG_buffer].u_obj) {
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_RW);
buffer = (uint8_t *)bufinfo.buf;
if(bufinfo.len < (size_t)(width * height / 8)) {
mp_raise_ValueError("Supplied buffer is too small!");
}
} else {
buffer = m_new(uint8_t, width * height / 8);
}
badger2040_obj = m_new_obj_with_finaliser(_Badger2040_obj_t);
badger2040_obj->base.type = &Badger2040_type;
badger2040_obj->buf = buffer;
badger2040_obj->badger2040 = new pimoroni::Badger2040(buffer);
badger2040_obj->badger2040->init();
return MP_OBJ_FROM_PTR(badger2040_obj);
}
mp_obj_t Badger2040_is_busy(mp_obj_t self_in) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
return self->badger2040->is_busy() ? mp_const_true : mp_const_false;
}
mp_obj_t Badger2040_update_speed(mp_obj_t self_in, mp_obj_t speed) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
self->badger2040->update_speed(mp_obj_get_int(speed));
return mp_const_none;
}
mp_obj_t Badger2040_update(mp_obj_t self_in) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
while(self->badger2040->is_busy()) {
#ifdef MICROPY_EVENT_POLL_HOOK
MICROPY_EVENT_POLL_HOOK
#endif
}
self->badger2040->update(false);
while(self->badger2040->is_busy()) {
#ifdef MICROPY_EVENT_POLL_HOOK
MICROPY_EVENT_POLL_HOOK
#endif
}
self->badger2040->power_off();
return mp_const_none;
}
mp_obj_t Badger2040_partial_update(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_self, ARG_x, ARG_y, ARG_w, ARG_h };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_w, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_h, MP_ARG_REQUIRED | MP_ARG_INT }
};
// Parse args.
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
int x = args[ARG_x].u_int;
int y = args[ARG_y].u_int;
int w = args[ARG_w].u_int;
int h = args[ARG_h].u_int;
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(args[ARG_self].u_obj, _Badger2040_obj_t);
while(self->badger2040->is_busy()) {
#ifdef MICROPY_EVENT_POLL_HOOK
MICROPY_EVENT_POLL_HOOK
#endif
}
self->badger2040->partial_update(x, y, w, h);
while(self->badger2040->is_busy()) {
#ifdef MICROPY_EVENT_POLL_HOOK
MICROPY_EVENT_POLL_HOOK
#endif
}
self->badger2040->power_off();
return mp_const_none;
}
// halt
// sleep
mp_obj_t Badger2040_invert(mp_obj_t self_in, mp_obj_t invert) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
self->badger2040->invert(invert == mp_const_true);
return mp_const_none;
}
mp_obj_t Badger2040_led(mp_obj_t self_in, mp_obj_t brightness) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
self->badger2040->led(mp_obj_get_int(brightness));
return mp_const_none;
}
mp_obj_t Badger2040_font(mp_obj_t self_in, mp_obj_t font) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
self->badger2040->font(mp_obj_to_string_r(font));
return mp_const_none;
}
mp_obj_t Badger2040_pen(mp_obj_t self_in, mp_obj_t color) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
self->badger2040->pen(mp_obj_get_int(color));
return mp_const_none;
}
mp_obj_t Badger2040_thickness(mp_obj_t self_in, mp_obj_t thickness) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
self->badger2040->thickness(mp_obj_get_int(thickness));
return mp_const_none;
}
mp_obj_t Badger2040_pressed(mp_obj_t self_in, mp_obj_t button) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
self->badger2040->update_button_states();
bool state = self->badger2040->pressed(mp_obj_get_int(button));
return state ? mp_const_true : mp_const_false;
}
// pressed
// pressed_to_wake
// wait_for_press - implement in terms of MicroPython!
// update_button_states
// button_states
mp_obj_t Badger2040_clear(mp_obj_t self_in) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
self->badger2040->clear();
return mp_const_none;
}
mp_obj_t Badger2040_pixel(mp_obj_t self_in, mp_obj_t x, mp_obj_t y) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
self->badger2040->pixel(mp_obj_get_int(x), mp_obj_get_int(y));
return mp_const_none;
}
mp_obj_t Badger2040_command(mp_obj_t self_in, mp_obj_t reg, mp_obj_t data) {
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(data, &bufinfo, MP_BUFFER_RW);
self->badger2040->debug_command(mp_obj_get_int(reg), bufinfo.len, (const uint8_t *)bufinfo.buf);
return mp_const_none;
}
mp_obj_t Badger2040_line(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_self, ARG_x1, ARG_y1, ARG_x2, ARG_y2 };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_x1, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_y1, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_x2, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_r2, MP_ARG_REQUIRED | MP_ARG_INT }
};
// Parse args.
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
int x1 = args[ARG_x1].u_int;
int y1 = args[ARG_y1].u_int;
int x2 = args[ARG_x2].u_int;
int y2 = args[ARG_y2].u_int;
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(args[ARG_self].u_obj, _Badger2040_obj_t);
self->badger2040->line(x1, y1, x2, y2);
return mp_const_none;
}
mp_obj_t Badger2040_rectangle(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_self, ARG_x1, ARG_y1, ARG_x2, ARG_y2 };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_w, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_h, MP_ARG_REQUIRED | MP_ARG_INT }
};
// Parse args.
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
int x = args[ARG_x1].u_int;
int y = args[ARG_y1].u_int;
int w = args[ARG_x2].u_int;
int h = args[ARG_y2].u_int;
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(args[ARG_self].u_obj, _Badger2040_obj_t);
self->badger2040->rectangle(x, y, w, h);
return mp_const_none;
}
mp_obj_t Badger2040_image(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_self, ARG_data, ARG_w, ARG_h, ARG_x, ARG_y };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_data, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_w, MP_ARG_INT, {.u_int = 296} },
{ MP_QSTR_h, MP_ARG_INT, {.u_int = 128} },
{ MP_QSTR_x, MP_ARG_INT, {.u_int = 0} },
{ MP_QSTR_y, MP_ARG_INT, {.u_int = 0} }
};
// Parse args.
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
int dw = args[ARG_w].u_int;
int dh = args[ARG_h].u_int;
int dx = args[ARG_x].u_int;
int dy = args[ARG_y].u_int;
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(args[ARG_data].u_obj, &bufinfo, MP_BUFFER_RW);
if(bufinfo.len < (size_t)(dw * dh / 8)) {
mp_raise_ValueError("image: Supplied buffer is too small!");
}
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(args[ARG_self].u_obj, _Badger2040_obj_t);
self->badger2040->image((uint8_t *)bufinfo.buf, dw, dh, dx, dy);
return mp_const_none;
}
mp_obj_t Badger2040_icon(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_self, ARG_data, ARG_icon_index, ARG_sheet_size, ARG_icon_size, ARG_dx, ARG_dy };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_data, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_icon_index, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_sheet_size, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_icon_size, MP_ARG_INT, {.u_int = 64} },
{ MP_QSTR_dx, MP_ARG_INT, {.u_int = 0} },
{ MP_QSTR_dy, MP_ARG_INT, {.u_int = 0} }
};
// Parse args.
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
int ssize = args[ARG_sheet_size].u_int;
int isize = args[ARG_icon_size].u_int;
int index = args[ARG_icon_index].u_int;
int dx = args[ARG_dx].u_int;
int dy = args[ARG_dy].u_int;
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(args[ARG_data].u_obj, &bufinfo, MP_BUFFER_RW);
if(bufinfo.len < (size_t)(ssize * isize / 8)) {
mp_raise_ValueError("icon: Supplied buffer is too small!");
}
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(args[ARG_self].u_obj, _Badger2040_obj_t);
self->badger2040->icon((uint8_t *)bufinfo.buf, ssize, isize, index, dx, dy);
return mp_const_none;
}
mp_obj_t Badger2040_text(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_self, ARG_message, ARG_x, ARG_y, ARG_scale, ARG_rotation };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_message, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_scale, MP_ARG_OBJ, {.u_obj = mp_const_none} },
{ MP_QSTR_rotation, MP_ARG_OBJ, {.u_obj = mp_const_none} }
};
// Parse args.
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
std::string message = mp_obj_to_string_r(args[ARG_message].u_obj);
int x = args[ARG_x].u_int;
int y = args[ARG_y].u_int;
float scale = 1.0f;
if (args[ARG_scale].u_obj != mp_const_none) {
scale = mp_obj_get_float(args[ARG_scale].u_obj);
}
float rotation = 0.0f;
if (args[ARG_rotation].u_obj != mp_const_none) {
rotation = mp_obj_get_float(args[ARG_rotation].u_obj);
}
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(args[ARG_self].u_obj, _Badger2040_obj_t);
self->badger2040->text(message, x, y, scale, rotation);
return mp_const_none;
}
mp_obj_t Badger2040_glyph(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_self, ARG_char, ARG_x, ARG_y, ARG_scale, ARG_rotation };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_char, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_scale, MP_ARG_OBJ, {.u_obj = mp_const_none} },
{ MP_QSTR_rotation, MP_ARG_OBJ, {.u_obj = mp_const_none} }
};
// Parse args.
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
int c = args[ARG_char].u_int;
int x = args[ARG_x].u_int;
int y = args[ARG_y].u_int;
float scale = 1.0f;
if (args[ARG_scale].u_obj != mp_const_none) {
scale = mp_obj_get_float(args[ARG_scale].u_obj);
}
float rotation = 0.0f;
if (args[ARG_rotation].u_obj != mp_const_none) {
rotation = mp_obj_get_float(args[ARG_rotation].u_obj);
}
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(args[ARG_self].u_obj, _Badger2040_obj_t);
self->badger2040->glyph(c, x, y, scale, rotation);
return mp_const_none;
}
mp_obj_t Badger2040_measure_text(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_self, ARG_message, ARG_scale };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_message, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_scale, MP_ARG_OBJ, {.u_obj = mp_const_none} },
};
// Parse args.
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
std::string message = mp_obj_to_string_r(args[ARG_message].u_obj);
float scale = 1.0f;
if (args[ARG_scale].u_obj != mp_const_none) {
scale = mp_obj_get_float(args[ARG_scale].u_obj);
}
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(args[ARG_self].u_obj, _Badger2040_obj_t);
return mp_obj_new_int(self->badger2040->measure_text(message, scale));
}
mp_obj_t Badger2040_measure_glyph(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_self, ARG_char, ARG_scale };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_char, MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_scale, MP_ARG_OBJ, {.u_obj = mp_const_none} },
};
// Parse args.
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
int c = args[ARG_char].u_int;
float scale = 1.0f;
if (args[ARG_scale].u_obj != mp_const_none) {
scale = mp_obj_get_float(args[ARG_scale].u_obj);
}
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(args[ARG_self].u_obj, _Badger2040_obj_t);
return mp_obj_new_int(self->badger2040->measure_glyph(c, scale));
}
}

View File

@ -0,0 +1,40 @@
// Include MicroPython API.
#include "py/runtime.h"
#include "py/objstr.h"
/***** Extern of Class Definition *****/
extern const mp_obj_type_t Badger2040_type;
/***** Extern of Class Methods *****/
extern void Badger2040_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind);
extern mp_obj_t Badger2040___del__(mp_obj_t self_in);
extern mp_obj_t Badger2040_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args);
extern mp_obj_t Badger2040_is_busy(mp_obj_t self_in);
extern mp_obj_t Badger2040_update_speed(mp_obj_t self_in, mp_obj_t speed);
extern mp_obj_t Badger2040_update(mp_obj_t self_in);
extern mp_obj_t Badger2040_partial_update(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t Badger2040_invert(mp_obj_t self_in, mp_obj_t invert);
extern mp_obj_t Badger2040_led(mp_obj_t self_in, mp_obj_t brightness);
extern mp_obj_t Badger2040_font(mp_obj_t self_in, mp_obj_t font);
extern mp_obj_t Badger2040_pen(mp_obj_t self_in, mp_obj_t color);
extern mp_obj_t Badger2040_thickness(mp_obj_t self_in, mp_obj_t thickness);
extern mp_obj_t Badger2040_pressed(mp_obj_t self_in, mp_obj_t button);
extern mp_obj_t Badger2040_clear(mp_obj_t self_in);
extern mp_obj_t Badger2040_pixel(mp_obj_t self_in, mp_obj_t x, mp_obj_t y);
extern mp_obj_t Badger2040_line(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t Badger2040_rectangle(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t Badger2040_image(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t Badger2040_icon(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t Badger2040_text(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t Badger2040_glyph(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t Badger2040_measure_text(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t Badger2040_measure_glyph(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t Badger2040_command(mp_obj_t self_in, mp_obj_t reg, mp_obj_t data);

View File

@ -0,0 +1,22 @@
set(MOD_NAME badger2040)
string(TOUPPER ${MOD_NAME} MOD_NAME_UPPER)
add_library(usermod_${MOD_NAME} INTERFACE)
target_sources(usermod_${MOD_NAME} INTERFACE
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.c
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/badger2040/badger2040.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/uc8151/uc8151.cpp
)
target_include_directories(usermod_${MOD_NAME} INTERFACE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/badger2040/
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/uc8151/
)
target_compile_definitions(usermod_${MOD_NAME} INTERFACE
MODULE_BADGER2040_ENABLED=1
)
target_link_libraries(usermod INTERFACE usermod_${MOD_NAME})

View File

@ -7,6 +7,8 @@ target_sources(usermod_${MOD_NAME} INTERFACE
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/${MOD_NAME}/${MOD_NAME}.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/st7735/st7735.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_graphics/pico_graphics.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_graphics/types.cpp
)
target_include_directories(usermod_${MOD_NAME} INTERFACE

View File

@ -7,6 +7,8 @@ target_sources(usermod_${MOD_NAME} INTERFACE
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/${MOD_NAME}/${MOD_NAME}.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/st7789/st7789.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_graphics/pico_graphics.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_graphics/types.cpp
)
target_include_directories(usermod_${MOD_NAME} INTERFACE

View File

@ -37,6 +37,7 @@ include(pico_display/micropython)
include(pico_display_2/micropython)
include(pico_explorer/micropython)
include(pico_wireless/micropython)
include(badger2040/micropython)
include(plasma/micropython)
include(hub75/micropython)
include(ulab/code/micropython)