You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
V2 micro:bit has just been released this week. Noteable features to add support to bitio are:
loud/quiet sensing and threshold detection
support for music library (play sounds)
selecting cap or resistive touch sensing mode
touch sensing on the eyes logo
Also, there is a new 'combined hex' format, so we should roll together the V1.5 and V2 hex files into a single combined hex using the tool that the foundation are releasing. This will also close #23
Might choose to add some much needed GPIO features at same time.
Have some ideas to make api.py either an auto-sensing proxy, or a data driven table of API methods (rather than having to hand-code new method wrappers every time), so would like to experiment with that.
The auto sensing proxy would use getattr to build a wrapper for any function, and if it gets an exception when passing to the REPL on first use, it would replace it's implementation with an error handler. This might fail unhelpfully if the first call has an invalid parameter though.
The data-driven approach would be the same as the auto sensing proxy, but with the addition of a string table of valid method names. Thus, a generic call would look up the name in the table, reject it if not listed. If it is listed, it would build a proxy function and then pass whatever parameters you pass, on the REPL, and mirror the exception at the MicroPython end back at the host side as a similar exception. This would mean anyone could just add new function names to the table to get an auto proxy (and we should allow for manual functions as well where we still need to do a bit of data marshalling and type cleaning aka: #30)
The text was updated successfully, but these errors were encountered:
V2 micro:bit has just been released this week. Noteable features to add support to bitio are:
Also, there is a new 'combined hex' format, so we should roll together the V1.5 and V2 hex files into a single combined hex using the tool that the foundation are releasing. This will also close #23
Might choose to add some much needed GPIO features at same time.
Have some ideas to make api.py either an auto-sensing proxy, or a data driven table of API methods (rather than having to hand-code new method wrappers every time), so would like to experiment with that.
The auto sensing proxy would use getattr to build a wrapper for any function, and if it gets an exception when passing to the REPL on first use, it would replace it's implementation with an error handler. This might fail unhelpfully if the first call has an invalid parameter though.
The data-driven approach would be the same as the auto sensing proxy, but with the addition of a string table of valid method names. Thus, a generic call would look up the name in the table, reject it if not listed. If it is listed, it would build a proxy function and then pass whatever parameters you pass, on the REPL, and mirror the exception at the MicroPython end back at the host side as a similar exception. This would mean anyone could just add new function names to the table to get an auto proxy (and we should allow for manual functions as well where we still need to do a bit of data marshalling and type cleaning aka: #30)
The text was updated successfully, but these errors were encountered: