Git Product home page Git Product logo

firmware's Introduction

Firmware SHA2017Badge

Read project documentation and get involved.

Project updates:

Copyright (C) 2017 SHA2017 Badge team. Based on template application for Espressif IoT Development Framework (ESP-IDF). Copyright (C) 2016 Espressif Systems, licensed under the Apache License 2.0 as described in the file LICENSE.

Codacy Badge Build Status

Debian prerequisites

sudo apt-get install libncurses5-dev flex bison gperf python-serial libffi-dev libsdl2-dev libmbedtls-dev perl

Compiling and flashing

git submodule update --init --recursive
source set_env.sh
make defconfig
make -j5

Optional configuration

make menuconfig

Compiling MicroPython

make -j5 -C micropython/mpy-cross
make -j5 -C micropython/esp32/

Flashing MicroPython

cd auto-flasher
cp ../micropython/esp32/build/application.bin firmware/sha2017-badge.bin
./auto_flash.pl /dev/ttyUSB0

Interacting via serial

make monitor

Building on OSX

First you have to replace the linux toolchain:

  • download the mac toolchain from this page
  • rename the linux toolchain: mv xtensa-esp32-elf xtensa-esp32-elf-linux
  • untar the mac toolchain: tar zxf ~/Downloads/xtensa-esp32-elf-osx-1.22.0-61-gab8375a-5.2.0.tar.gz

Then install the CP2102 usbserial driver

In the sdkconfig file change this line:

CONFIG_ESPTOOLPY_PORT="/dev/tty.SLAB_USBtoUART"

MicroPython

import badge
badge.eink_init()
badge.display_picture(0,-1)
import ugfx
ugfx.init()
ugfx.demo("HACKING")
ugfx.clear(badge.BLACK)
ugfx.thickline(1,1,100,100,badge.WHITE,10,5)
ugfx.box(30,30,50,50,badge.WHITE)
ugfx.string(150,25,"STILL","Roboto_BlackItalic24",badge.WHITE)
ugfx.string(130,50,"Hacking","PermanentMarker22",badge.WHITE)
len = ugfx.get_string_width("Hacking","PermanentMarker22")
ugfx.line(130, 72, 144 + len, 72, badge.WHITE)
ugfx.line(140 + len, 52, 140 + len, 70, badge.WHITE)
ugfx.string(140,75,"Anyway","Roboto_BlackItalic24",badge.WHITE)
ugfx.flush()

More info on the MicroPython badge features

Badge Emulator

make -C micropython/unix
cd micropython/unix
./micropython ../../examples/Game\ of\ Life/game_of_life.py

firmware's People

Contributors

annejan avatar basvs avatar codacy-badger avatar doebi avatar gavanfantom avatar igrr avatar klondi avatar krzychb avatar nlitsme avatar osresearch avatar peetz0r avatar projectgus avatar raboof avatar renzenicolai avatar roosted7 avatar sebastius avatar spritetm avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.