Skip to content

Commit

Permalink
[examples] Add ThingPlus-RP2040 blinky
Browse files Browse the repository at this point in the history
  • Loading branch information
cocasema committed Aug 18, 2022
1 parent cb9e297 commit 874c8d6
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Examples RP20 Devices
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py rp_pico feather_rp2040)
(cd examples && ../tools/scripts/examples_compile.py feather_rp2040 rp_pico thingplus_rp2040)
- name: Execute Python Scripts
if: always()
run: |
Expand Down
39 changes: 39 additions & 0 deletions examples/thingplus_rp2040/blink/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2016, Sascha Schade
* Copyright (c) 2017, Niklas Hauser
*
* This file is part of the modm project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// ----------------------------------------------------------------------------

#include <modm/board.hpp>

using namespace Board;

/*
* Blinks the user LED with 1 Hz.
* It is on for 90% of the time and off for 10% of the time.
*/

int
main()
{
Board::initialize();

Led::setOutput();

while (true)
{
Led::set();
modm::delay(900ms);

Led::reset();
modm::delay(100ms);
}

return 0;
}
9 changes: 9 additions & 0 deletions examples/thingplus_rp2040/blink/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<library>
<extends>modm:thingplus-rp2040</extends>
<options>
<option name="modm:build:build.path">../../../build/thingplus_rp2040/blink</option>
</options>
<modules>
<module>modm:build:scons</module>
</modules>
</library>

0 comments on commit 874c8d6

Please sign in to comment.