Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotak committed Oct 14, 2023
1 parent 0a965e0 commit 97a9898
Show file tree
Hide file tree
Showing 9 changed files with 761 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Language: Cpp
BasedOnStyle: Google
SeparateDefinitionBlocks: Always
EmptyLineBeforeAccessModifier: LogicalBlock
ColumnLimit: 120
ReflowComments: true
InsertBraces: true
IndentPPDirectives: BeforeHash
AllowShortFunctionsOnASingleLine: Empty
AllowShortBlocksOnASingleLine: Empty
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: build

on:
push:
paths-ignore:
- "README.md"
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Check conventional commits
uses: webiny/[email protected]

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install dependencies
run: pip install --upgrade platformio

- name: Build
run: |
pio run
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Build
if: success()
run: |
pio run
- name: Prepare files
run: |
set -x
mkdir -p /tmp/dist
for path in ./.pio/build/*/; do
name="$(basename "${path}")"
mv "./.pio/build/$name/firmware.hex" "/tmp/dist/$name.hex"
done
- name: Create release
uses: softprops/action-gh-release@v1
with:
files: /tmp/dist/*.hex
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.pio
.vscode
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# ds2482-bridge
# DS248x serial bridge

[![Framework Badge Arduino](https://img.shields.io/badge/framework-arduino-00979C.svg)](https://arduino.cc)

Simple FW for reading Dallas temperature sensors via DS248x with output as JSON

Output example
```
{"0x28FF5A1A31180210":23.06,"0x28FF9725311801EE":23.12}
```

> All credits for DS2482 library goes to https://github.com/cybergibbons/DS2482_OneWire/
Loading

0 comments on commit 97a9898

Please sign in to comment.