emfcamp / mk3-firmware Goto Github PK
View Code? Open in Web Editor NEWFirmware that runs on the TiLDA v3 Badge
License: MIT License
Firmware that runs on the TiLDA v3 Badge
License: MIT License
One file can run another file either by doing:
execfile("new_file.py")
__import__("new_file.py")
m = __import__("new_file.py"); m.main()
The issues with each idea is:
Also default inputs. See list for examples
ugfx class needs a setDefaultBackColor(), and each container needs a setBackColor()
there should only ever be one instance for the pin and interrupt objects, no instance of the class should be needed, so any file could call:
import badge; badge.is_pressed()
a = pyb.ADCAll(12)
a.read_channel(0) #USB voltage
a.read_channel(17) #internal reference - will read ~1600
a.read_channel(18) # or a.read_core_vbat()
a.read_channel(17) #this will now always be junk
a.read_channel(0) #will still read OK
If orientation is 90/270. Doesn't seem to happen for imageboxes, or gifs. Probably due to hacking about with the driver
So apps can't accidently overwrite each others settings
import os
import ugfx
import pyb
ugfx.init()
ugfx.Keyboard(0, int(ugfx.height()/2), ugfx.width(), int(ugfx.height()/2))
ugfx.Textbox(0, 0,ugfx.width(),int(ugfx.height()/2))
tim = pyb.Timer(3)
tim.init(freq=60)
tim.callback(lambda t:ugfx.poll())
while True:
pyb.wfi()
Calls _gosHeapInit to ensure rogue apps cant assign all the RAM without clearing
Currently it is a subclass of pyb It should be separate.
At the moment when you connect to an access point you have to code a busy loop as below:
while (not nic.is_connected()):
nic.update()
pyb.delay(100)
This is not idea for the developer, and has no timeout in this form.
Restructure the connect() method to include the loop, and to take a timeout value.
eg wgin_list.c L682
They can probably all share the same function
can allocate size(SRAM2)-2k to ugfx (30kB)
It's quite low atm, from my testing with 10cm cables. Now it is correctly working on board, we should increase the transfer speed
Alternatively just use the green led for network stuff
Currently it's not possible to create an SSL socket through micropython. This is for two reasons,
the protocol argument of the constructor is not passed through in stmhal/modusocket.c socket_make_new()
There is no exposure to setup the structure for the certificates exposed to micropython yet.
Should ugfx_yield() (which does things like poll buttons and redraw widgets when needed) be moved from systick (almost certainly), and moved to TIM3? with a low priority interrupt?
When the selected item is removed, no further items can be selected
The primitives in ugfx.c can be called from containers too if function prototype is placed in ugfx.h.
Each primitive will need to check the type of the mp_obj_t self_in object, and decide whether to call gdispFillXxx(...) or gwinFillXxx(GHandle gh, ...)
The primitives then need adding to the pyb_ugfx_container_locals_dict_table of each container class
Currently hardcoded for v2, needs changing to use pins.csv autogen stuff
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.