[[Glasgow Notes]]
## Sketch of applet workflow
![[Glasgow applets overview 2023-10-02 11.30.28.png]]
%%[[Glasgow applets overview 2023-10-02 11.30.28.excalidraw|🖋 Edit in Excalidraw]], and the [[Glasgow applets overview 2023-10-02 11.30.28.dark.png|dark exported image]]%%
### Applet inputs and outputs
![[Glasgow applets overview 2023-10-02 11.38.20.png]]
%%[[Glasgow applets overview 2023-10-02 11.38.20.excalidraw|🖋 Edit in Excalidraw]], and the [[Glasgow applets overview 2023-10-02 11.38.20.dark.png|dark exported image]]%%
## Creating an applet
Applets live in `glasgow/software/glasgow/applet` and are sorted into categories based on function (video, radio, sensor, etc.)
TO create a new applet, create a folder and `__init__.py`
`/applet/all.py` imports all the applet functions.
You can start with `/examples/boilerplate.py`
## Running scripts
```
glasgow script [FILENAME] applet
```
"run python script FILENAME in the applet context"
Not quite sure how this works but check out `examples/i2c-pcf8574.py`
## Test building the bitstream
```
glasgow build applet
```