From dcf8ebd034159a589c21dca9e72c095fa07cebf0 Mon Sep 17 00:00:00 2001 From: Torrie Fischer Date: Wed, 26 Dec 2018 20:35:58 -0800 Subject: [PATCH] Initial Commit by po --- .atom-build.yml | 54 +++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ .travis.yml | 10 +++++++++ README.md | 27 ++++++++++++++++++++++++ ci/travis.sh | 5 +++++ firmware/main.cpp | 11 ++++++++++ 6 files changed, 109 insertions(+) create mode 100644 .atom-build.yml create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 README.md create mode 100755 ci/travis.sh create mode 100644 firmware/main.cpp diff --git a/.atom-build.yml b/.atom-build.yml new file mode 100644 index 0000000..7946069 --- /dev/null +++ b/.atom-build.yml @@ -0,0 +1,54 @@ +--- +cmd: po +args: + - photon + - build +sh: false + +targets: + Build: + atomCommandName: po:Build Particle Firmware Locally + sh: false + args: + - photon + - build + cmd: po + keymap: ctrl-alt-1 + name: Build + Flash: + atomCommandName: po:Flash Particle Firmware Locally + sh: false + args: + - photon + - flash + cmd: po + keymap: ctrl-alt-2 + name: Flash + Clean: + atomCommandName: po:Clean Particle Firmware Locally + sh: false + args: + - photon + - clean + cmd: po + keymap: ctrl-alt-3 + name: Clean + DFU: + atomCommandName: po:Upload Particle Firmware Locally with DFU + sh: false + args: + - photon + - dfu + cmd: po + keymap: ctrl-alt-4 + name: DFU + OTA: + atomCommandName: po:Upload Particle Firmware Locally with OTA + sh: false + args: + - photon + - ota + - --multi + cmd: po + keymap: ctrl-alt-5 + name: OTA diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f73200f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +bin/* +*.bin diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b847b87 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +dist: trusty +sudo: required +language: generic + +script: + - ci/travis.sh + +cache: + directories: + - $HOME/.po-util diff --git a/README.md b/README.md new file mode 100644 index 0000000..7a8a2c8 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +[![Built with po-util](https://rawgit.com/nrobinson2000/po-util/master/images/built-with-po-util.svg)](https://po-util.com) + +# This repository is a [po-util](https://po-util.com) project + +Po makes it easy to locally develop firmware for Particle devices, and supports the Particle Photon, P1, Electron, Core, Raspberry Pi, and Redbear Duo. + +Your project’s C++ files go in the `firmware/` directory, and the binary will appear in the `bin/` directory. + +To compile code, run `po DEVICE_TYPE build`, substituting `DEVICE_TYPE` with `photon`, `P1`, `electron`, `core`, `pi`, or `duo`. + +To compile and flash code, run `po DEVICE_TYPE flash`. Code is compiled and then flashed to your device over USB. + +To clean the project, run `po DEVICE_TYPE clean`. + +To flash a project over USB without rebuilding, run `po DEVICE_TYPE dfu`. + +To upload a compiled project over the air run `po DEVICE ota DEVICE_NAME`, where `DEVICE_NAME` is the name of your device in the Particle cloud. **Note: You must be logged into particle-cli to use this feature. You can log into particle-cli with:** + +``` +particle login +``` + +For more help, run `man po`, or visit + +*By the way, po has tab completion. Try pressing [TAB] at any time to have arguments completed.* + +Feel free to edit this README.md to make it more suitable for your project. **(I do ask that you please include the badge at the top though.)** diff --git a/ci/travis.sh b/ci/travis.sh new file mode 100755 index 0000000..4d6fc50 --- /dev/null +++ b/ci/travis.sh @@ -0,0 +1,5 @@ +#!/bin/bash +bash <(curl -sL https://raw.githubusercontent.com/nrobinson2000/po/master/ci/ci-install) +po lib clean . -f &> /dev/null +yes "no" | po lib setup # change to "yes" to prefer libraries from GitHub +po photon build diff --git a/firmware/main.cpp b/firmware/main.cpp new file mode 100644 index 0000000..93d9104 --- /dev/null +++ b/firmware/main.cpp @@ -0,0 +1,11 @@ +#include "Particle.h" + +void setup() // Put setup code here to run once +{ + +} + +void loop() // Put code here to loop forever +{ + +}