wovo / godafoss-code

0 stars 0 forks source link

This is the source repository for godafoss, a micro-python library.

To work on the sources, clone this repository (wovo/godafoss-code, not wovo/godafoss) and copy the godafoss directory to your MicroPython device.

TODO

lcd_spi_cd.py should be spi_cd.py

where does sleep() come from??

xy - is an immutable... xyz.within

for images: https://github.com/peterhinch/micropython-samples/blob/master/SERIALISATION.md

mcp2515

pass pullup parameters gpio plaatje $$ref() enzo moeten inline zijn, andere structuur (command class) pins: invert the description, refer to links

http://www.jczn1688.com/zlxz https://registry.platformio.org/libraries/rzeldent/esp32_smartdisplay

https://en.wikipedia.org/wiki/ESP32 https://en.wikipedia.org/wiki/ESP8266 https://forum.micropython.org/viewtopic.php?t=1747 https://en.wikipedia.org/wiki/RP2040 https://github.com/OkuboHeavyIndustries?tab=repositories - 128x64 grpahics

If using Thonny IDE, in the Tools -> Manage Packages menu, search for "MicroPython_CAN_BUS_MCP2515" and install

lcd240c320a oled128m64a epaper240m320a

blinka: pin_in_out pin_in pin_oc spi i2c

reversie game with touch

https://abyz.me.uk/rpi/pigpio/python.html check https://github.com/russhughes/gc9a01py for fonts sx127x boost should not be a config param, because it is a HW feature

rotate a sd1306 oled?

air101 requires pull-ups?

what to do with documentation of inherited interfaces?

https://rpyc.readthedocs.io/en/latest/tutorial/tut3.html

1 x beschrijving voor module display parameters maybe gf.horizontal gf.vertical etc. should be global? or east, south, west, north? "E" etc.

class directions north = north_east = east = south_east = south = south_west = west = north_west =

ESP32 generic spiram on sunton_esp32_2432s028 has no effect at all on board with soldered spiram? (not even crash)

build & load arguments separate, any order target, gf, nogf, spiram, octal, baudrate

time the downloads pause at end of .bat is useless

more timing data in demos

https://www.openhasp.com/0.7.0/hardware/ MicroPython image

general esp32 discussion, incl. spiram way to load the nogf images internal links to the boards noteer ook interne / externe antennes

luatos c3 - air101

https://learn.adafruit.com/circuitpython-libraries-on-any-computer-with-mcp2221/windows

import gc; gc.collect(); print( gc.mem_free() )

install godafoss as hosted library

board: pycom lopy

inherit:

https://github.com/lemariva/uPyLoRaWAN

https://snapcraft.io/install/micropython/raspbian https://gpiozero.readthedocs.io/en/latest/recipes.html https://sourceforge.net/projects/raspberry-gpio-python/ https://github.com/peterhinch/micropython-touch/

gpio_oc is not implemented!

builds

https://dev.to/shilleh/how-to-use-esp32-cam-with-micropython-4odo

https://khalsalabs.com/how-to-use-micropython-on-esp32-your-ultimate-free-guide/

https://github.com/micropython/micropython-lib/tree/master/micropython

https://github.com/peterhinch/micropython-nano-gui

https://docs.python.org/3/c-api/memoryview.html

https://github.com/v923z/micropython-ulab?tab=readme-ov-file#stm-based-boards

directly from git, no branch https://github.com/florisla/stm32loader

https://www.arducam.com/ov2640/

TODO

TTGO LORA32 (ESP32-DOWDQ6) with godafoss intial RAM 163.712 kB initial FLASH 2.0 MB blink (not edge) time 80 ms, memory 2592 bytes (165344->162752) without godafoss (bin from site) intial RAM 163.408 kB initial FLASH 2.0 MB
idem with /lib/godafoss (.mpy files) intial RAM 163312 kB initial FLASH 0.872 MB blink (not edge) time 14176 ms, memory 4608 bytes (161632->157024)
idem with /lib/godafoss (.py files) intial RAM 163.632 kB initial FLASH 0,4 MB blink (not edge) time 19330 ms, memory 4784 bytes (161488->156704)

freeze other resources https://github.com/orgs/micropython/discussions/12094

blink teensy.py time 447 ms, memory 8528 bytes (760464->751936) teensy.mpy time 491 ms, memory 8912 bytes (760464->751552) rp2040w.py can't download rp2040w.mpy time 3172 ms, memory 12304 bytes (182640->170336) rp2040.py time 4356 ms, memory 11936 bytes (182864->170928) 1.4M of 1.6M used

kitt teensy.py time 796 ms, memory 13968 bytes (760448->746480) teensy.mpy time 864 ms, memory 14720 bytes (760448->745728) rp2040w.mpy time 5083 ms, memory 16976 bytes (182624->165648) 812 of 848 kB Flash used rp2040.py time 6914 ms, memory 16288 bytes (182848->166560)

large LCD teensy.py time 1141 ms, memory 181296 bytes (760144->578848) time 33452 ms, memory 192784 bytes (760144->567360) teensy.mpy time 1195 ms, memory 181728 bytes (760112->578384) time 34015 ms, memory 193472 bytes (760112->566640)

large LCD monochrome 240x320 rp2040.py time 7843 ms, memory 47792 bytes (182528->134736)

http://www.lcdwiki.com/1.6inch_SPI_Module_SSD1283A_SKU:MSP1601

https://github.com/orgs/micropython/discussions/13233

WiPy specific stuff on https://docs.micropython.org/en/latest/library/index.html

https://github.com/LilyGO/MicroPython-1

https://github.com/peterhinch/micropython-samples/blob/master/README.md#5-module-index

https://github.com/loboris/ESP32_ePaper_example

https://github.com/ZinggJM/GxEPD2

https://github.com/mcauser/micropython-waveshare-epaper

https://github.com/HelTecAutomation/Wireless-Paper

ili9341

line buffer 240 2 = 480 bytes each call 320 calls
10 MHz 1.51 ms 20 MHz 1.45 makes sense: 240
480*8/20M = 0.06 s without the write_command calls 1.33 ms

python, range, avoid *, write_cmd( buffer = ), line buffer, 20 Mhz 1413 ms breaks down: pixel retrieve line 400 ms write_command 120 ms

python, 20 MHz
for b in self._buffer: self.write_command( None, buffer = self._pixels[ b ] ) 1.58 ms self._spi.write( self._pixels[ b ] ) 687 ms
idem native 680 ms zonder native, array index out of the loop 670 ms idem, 2 spi calls 1318 ms -> spi calls now take all time make the spi calls transfer 2 x the data longer _pixels 821 ms (same as -> 10 MHz) p + p 995 ms

30 MHz 687 ms 20 MHz 691 ms 10 MHz 820 ms

(er wordt iets te veel geschreven - waarom??)

accummulate byte array 1 1214 2 753 4 (64) 690 (varies a lot)

idem single allocation 1 (16) 970 2 713 4 544 8 464 16 444

This is promising, continue with the 16 base 445

native, ms, copy to temp 1: 779 2: 529 4: 382 8: 318 16: 311 -> avoid lookup 301 32: 361 (??) 128: 771

explicit copy loop, python 8: 2391
native 1478

280 ms