Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flow3r
flow3r firmware
Commits
4f682a76
Commit
4f682a76
authored
1 year ago
by
q3k
Committed by
schneider
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
docs: more simulator docs
parent
c4ead2d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!67
docs: more simulator docs
Pipeline
#6226
passed
1 year ago
Stage: check
Stage: build
Stage: deploy
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/badge/application-programming.rst
+39
-7
39 additions, 7 deletions
docs/badge/application-programming.rst
docs/badge/programming.rst
+5
-1
5 additions, 1 deletion
docs/badge/programming.rst
with
44 additions
and
8 deletions
docs/badge/application-programming.rst
+
39
−
7
View file @
4f682a76
...
...
@@ -413,7 +413,7 @@ file which describes the application so flow3r knows where to put it in the menu
Together with the Python code this file forms a so called bundle
(see also :py:class:`BundleMetadata`).
-- code-block
::
::
[app]
name = "My Demo"
...
...
@@ -433,16 +433,48 @@ and put that folder into the `apps` folder on your flow3r (if there is no `apps`
there might be an `apps` folder in the `sys` folder). Restart the flow3r and it should pick up your
new application.
Distributing applications
-------------------------
*TODO*
Using the simulator
-------------------
The simulator deserves its own page in the docs. For now have a look at the "Firmware Development" page
to see how to set it up.
The flow3r badge firmware repository comes with a Python-based simulator which
allows you to run the Python part of :ref:`st3m` on your local computer, using
Python, Pygame and wasmer.
Currently the simulator supports the display, LEDs, the buttons and some static
input values from the accelerometer, gyroscope, temperature sensor and pressure
sensor.
It does **not** support any audio API, and in fact currently doesn't even stub
out the relevant API methods, so it will crash when attempting to run any Music
app. It also does not support positional captouch APIs.
To set the simulator up, clone the repository and prepare a Python virtual
environment with the required packages:
::
$ git clone https://git.flow3r.garden/flow3r/flow3r-firmware
$ cd flow3r-firmware
$ python3 -m venv venv
$ venv/bin/pip install pygame wasmer wasmer-compiler-cranelift
*TODO: set up a pyproject/poetry/... file?*
You can then run the simulator:
::
$ venv/bin/python sim/run.py
The simulators apps live in `python_payload/apps` copy you app folder in there and it will appear in
the simulators menu system. Currently the simulator supports the display, LEDs, the buttons and some
static input values from the accelerometer, gyroscope, temperature sensor and pressure sensor.
Grey areas near the petals and buttons can be pressed.
No audio output on the simulator yet. Want to step up and get it in?
The simulators apps live in `python_payload/apps` copy you app folder in there
and it will appear in the simulators menu system.
*TODO: make simulator directly run a bundle on startup when requested*
This diff is collapsed.
Click to expand it.
docs/badge/programming.rst
+
5
−
1
View file @
4f682a76
...
...
@@ -136,4 +136,8 @@ Disk Mode can also be enabled when the badge is in :ref:`Recovery mode`.
Writing Applications
--------------------
TODO
Once you feel some familiary with the REPL, you're ready to advance to the next
chapter: writing full-fledged applications that can draw graphics on the screen,
respond to input and play sound!
For that, continue with :ref:`application_programming`.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment