Skip to content

tschissler/TFSCampEmbeddedChallenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleship Embedded

A simple game of Battleship, written in C++ for embedded devices (ESP32).

Tools

While the code might work with other development tools, it has been created and tested by using VSCode (https://code.visualstudio.com) with the PlatformIO extension (https://platformio.org). For just executing task on the CLI, PlatformIO Core is sufficient (https://docs.platformio.org/en/latest/core/installation.html)

Using Docker

If you do not want to install PlatformIO and other needed tools locally, you can use a docker container to run the commands.

docker run -it -v ${PWD}:/battleship -w /battleship infinitecoding/platformio-for-ci bash

Build and upload firmware to device

To build the project, use

pio run

To upload the firmware to the device, use

pio run --target upload

Run unit-tests

To allow running unit-tests on a development machine or in a build process, the code is part of a platform independent library. You can use the PlatformIO CLI to execute these tests

pio test -e native

This requires a locally installed g++ compiler. Alternatively you can execute the tests within a docker container (see above) that comes with all necessary tools.

Deployment

You might find some helpful scripts in the _deploy folder.

To flash the firmware on the device, the esptool can be used. This is isntalled together with PlatformIO or can be installed separately by running

pip install esptool

Test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published