-
Notifications
You must be signed in to change notification settings - Fork 5
Ideas
This page is for long-running ideas. Feel free to add whatever you think could be interesting. Maybe features you would like to see implemented, fun projects that could be built using Physical Bits, cool experiments, I don't know...
Also, if you're interested in contributing some code to the project this would be a good place to look for inspiration.
This would allow users to add support for any additional hardware that I don't have by extending the firmware. I'm thinking something along the lines of Firmata, where you can either use a general purpose sketch or use it as a library. I'm not sure how to implement this, though, or which extensions points should be added. At the minimum, I think the users should be able to define their own primitives. It would require some language support so I would have to change the UziScript compiler. Some of that support is already there in the form of the prim
keyword, but I have a feeling that it won't be enough...
I think this shouldn't be too difficult but I don't know. I'm particularly interested in the NodeMCU platform.
These are some ideas for how to improve the UziScript language. Some of these could also be useful for later optimizations.
-
Constants. The
const
keyword could be used to define constant values. These values could be inlined by the compiler in the appropriate places and that could probably save some memory. - Array support. I'm thinking static arrays shouldn't be too hard to add. Maybe they could be implemented as syntactic sugar on top of regular variables. I don't know.
- Struct support. Something similar to the array might work for structs as well.
- Pointers? I'm not sure about this but it could be fun.
- Strings. I'm worried about the impact of strings in the memory usage. Maybe I could just add a subset of the ASCII table? Or maybe use some sort of compression?
- HEX literals. This could be useful for specifying bit fields.
- Private variables? Some variables could be marked as private so that they don't appear in the inspector panel. Although maybe this is useless and imported vars should be private by default.