Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/numworks/epsilon-sample-app-cpp
A sample C++ app for the NumWorks graphing calculator
https://github.com/numworks/epsilon-sample-app-cpp
cpp embedded numworks
Last synced: 6 days ago
JSON representation
A sample C++ app for the NumWorks graphing calculator
- Host: GitHub
- URL: https://github.com/numworks/epsilon-sample-app-cpp
- Owner: numworks
- License: bsd-3-clause
- Created: 2021-06-14T13:43:35.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-23T10:37:32.000Z (almost 2 years ago)
- Last Synced: 2023-10-20T22:08:25.708Z (about 1 year ago)
- Topics: cpp, embedded, numworks
- Language: C++
- Homepage:
- Size: 146 KB
- Stars: 27
- Watchers: 13
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sample C++ app for Epsilon
[![Build](https://github.com/numworks/epsilon-sample-app-cpp/actions/workflows/build.yml/badge.svg)](https://github.com/numworks/epsilon-sample-app-cpp/actions/workflows/build.yml)
This is a sample C++ app to use on a [NumWorks calculator](https://www.numworks.com).
```cpp
using namespace EADK;
void eadk_main() {
Display::pushRectUniform(
Display::Rect(0, 0, 320, 240),
Display::Color(0x000000)
);
while (1) {
Keyboard::State kbd = Keyboard::scan();
if (kbd.keyDown(Keyboard::Key::OK)) {
spaceship.createRockets();
}
if (kbd.keyDown(Keyboard::Key::Up)) {
spaceship.move(0, -Spaceship::k_step);
}
refreshScene();
}
}
```## Build the app
To build this sample app, you will need to install the [embedded ARM toolchain](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain) and [Node.js](https://nodejs.org/en/). The C SDK for Epsilon apps is shipped as an npm module called [nwlink](https://www.npmjs.com/package/nwlink) that will automatically be installed at compile time.
```shell
brew install numworks/tap/arm-none-eabi-gcc node # Or equivalent on your OS
make
```You should now have a `target/voord.nwa` file that you can distribute! Anyone can now install it on their calculator from the [NumWorks online uploader](https://my.numworks.com/apps).
## Run the app locally
To run the app on your development machine, you can use the following command
```shell
# Now connect your NumWorks calculator to your computer using the USB cable
make run
```## License
This sample app is distributed under the terms of the BSD License. See LICENSE for details.
## Trademarks
NumWorks is a registered trademark.