Giter Site home page Giter Site logo

tinypico-micropython's Introduction

TinyPICO MicroPython Software

In this repository you'll find our MicroPython based libraries and example projects for the TinyPICO and some accompanying shields

This repository will be updated frequently during the TinyPICO campaign.

Open Source License

These files are released as open source under the MIT license. Please review the license before using these files in your own projects to understand your obligations.

TinyPICO Branding

The name TinyPICO, logos and TinyPICO brand is owned by Unexpected Maker. If you would like to use the name in a project you are making that supports the TinyPICO hardware, please contact us and we'll be happy to talk to you about it.

Support Unexpected Maker

We love designing, making and releasing our projects as open source. We do it because we believe it’s important to share knowledge and give back to the community, like many have done before us. It helps us all learn and grow.

That said, a lot of time, effort and finances have gone into designing and releasing these files, so please consider supporting us by backing TinyPICO on our Crowd Supply campaign:

https://www.crowdsupply.com/unexpected-maker/tinypico

Or by buying one of our products on tindie:

https://www.tindie.com/stores/seonr/

Or by becoming a Patron:

https://www.patreon.com/unexpectedmaker

Unexpected Maker

http://youtube.com/c/unexpectedmaker

http://twitter.com/unexpectedmaker

https://www.facebook.com/unexpectedmaker/

https://www.instagram.com/unexpectedmaker/

tinypico-micropython's People

Contributors

mcauser avatar unexpectedmaker avatar

Stargazers

 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  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

Watchers

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

tinypico-micropython's Issues

Tiny snake game speaker.freq(0) causing ValueError

Today soldered my new TinyPICO. Flashed MicroPython v1.18 of 2022-01-17.
I tried the tiny-snake example.
In all lines containing the command speaker.freq(0) the error: ValueError: frequency must be from 1Hz to 40MHz occurred.
Changing all the occurrances into speaker.freq(1) solved it.
See functions: play_boot_music(), play_death() and play_sound()

Tiny Snake not running on fresh delivered device.

I got my delivery and wanted to test out the play shield. After loading the files of the repository https://github.com/tinypico/tinypico-micropython/tree/master/play%20shield%20examples/tiny-snake I get this error:

File "ssd1306.py", line 109, in write_data
AttributeError: 'I2C' object has no attribute 'writevto'
MicroPython v1.10-231-g673db939b-dirty on 2019-03-31; ESP32 module with ESP32

Workaround:

I manged to get it to work by replacing the lines 108,109 of the ssd1306.py file with its previous content from Commit cf9a2b5 :

def write_data(self, buf):	  
        self.temp[0] = self.addr << 1	     
        self.temp[1] = 0x40 
        self.i2c.start()	
        self.i2c.write(self.temp)	
        self.i2c.write(buf)	
        self.i2c.stop()

I am new to micropython and its usage but it seems to me that this latest version is assuming a newer or different 'core/kernel' (or whatever the pre installed image is called ) version.

[ssd1306] update required when used with h/w i2c

Just tested the new h/w i2c feature with 1.11-latest. It turns out that i2c.start() is not a valid method in that mode. So I suggest the following update to SSD1306_I2C which works for both versions (h/w and s/w):

class SSD1306_I2C(SSD1306):
    def __init__(self, width, height, i2c, addr=0x3c, external_vcc=False):
        self.i2c = i2c
        self.addr = addr
        super().__init__(width, height, external_vcc)

    def write_cmd(self, cmd):
        self.i2c.writeto_mem(self.addr, 0x80, bytes((cmd,)))

    def write_data(self, buf):
        self.i2c.writeto_mem(self.addr, 0x40, buf)

UART causes a crash

with tinypico-idf3-20200110-v1.12-45-gbfbd94401.bin (or with the idf4 version), UARTs cannot be used:

from machine import UART
u = UART(1)
=> crash, reboot loop (when in program code)

From REPL:

MPY: soft reboot
MicroPython v1.12 on 2019-12-20; TinyPICO with ESP32-PICO-D4
Type "help()" for more information.
from machine import UART
u = UART(1)
I (36410) uart: ALREADY NULL

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.