Skip to content

Commit 75f9532

Browse files
committed
initial version
0 parents  commit 75f9532

File tree

278 files changed

+199395
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+199395
-0
lines changed

.github/workflows/site-pages.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy site to GitHub Pages dependencies preinstalled
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["main"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow one concurrent deployment
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: true
21+
22+
jobs:
23+
# Build job
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v2
31+
- name: Install pandoc
32+
run: sudo apt-get install -y pandoc
33+
- name: Install cssnano
34+
run: sudo npm install cssnano-cli --global
35+
- name: Install terser
36+
run: sudo npm install terser --global
37+
- name: Install python dependencies
38+
run: sudo pip install -r web-interface/requirements.txt
39+
- name: Install arduino-cli
40+
run: |
41+
mkdir -p ~/.local/bin
42+
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh
43+
- name: Build distribution
44+
run: make
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v1
47+
with:
48+
path: dist/
49+
50+
# Deployment job
51+
deploy:
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
runs-on: ubuntu-latest
56+
needs: build
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v1

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
dist
2+
*/build
3+
web-interface/*.html
4+
!web-interface/index.jinja2.html
5+
!web-interface/google*.html
6+
/firmware_list.md
7+
*.min.js
8+
*.min.css
9+
!web-interface/assets/**/*.min.js
10+
!web-interface/assets/**/*.min.css
11+
web-interface/melexis-bulma.css

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 mlx-kva
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.PHONY: clean all dist arduino_trinkey_qt
2+
3+
DIST_DIR=dist
4+
5+
6+
all: dist
7+
8+
arduino_trinkey_qt:
9+
rm -f i2c-stick-arduino/i2c_stick_dispatcher.cpp
10+
rm -f i2c-stick-arduino/i2c_stick_dispatcher.h
11+
make -C i2c-stick-arduino arduino_install_boards arduino_install_libs arduino_trinkey_qt
12+
echo "- [adafruit Trinkey RP2040 QT UF2-file](firmware/rp2040.rp2040.adafruit_trinkeyrp2040qt/melexis-i2c-stick-arduino.ino.uf2) -- [url](https://www.adafruit.com/product/5056)" >> firmware_list.md
13+
14+
dist: arduino_trinkey_qt
15+
@-cp -fv firmware_list.md web-interface
16+
make -C web-interface all
17+
@mkdir -p ${DIST_DIR}/firmware
18+
@cd i2c-stick-arduino/build/ && find -type f -name '*' -printf "mkdir -p ../../${DIST_DIR}/firmware/%h && cp -v '%h/%f' '../../${DIST_DIR}/firmware/%h/melexis-%f'\n" | sh && cd ../..
19+
20+
clean:
21+
@rm -rfv ${DIST_DIR}
22+
@rm -fv firmware.csv

doc/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
!*jpg
2+
!*png
3+
*.~vsdx

doc/01_hardware_and_software.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Melexis I2C Stick -- Hardware & Software.
2+
3+
## Hardware
4+
5+
Our goto board is this MCU boards:
6+
7+
- <https://www.adafruit.com/product/5056> (Adafruit Trinkey QT2040)
8+
9+
But it is known to work as well on those boards:
10+
11+
- <https://www.adafruit.com/product/4500> (Adafruit nrf52 CLUE)
12+
- <https://www.adafruit.com/product/4900> (Adafruit QT Py RP2040)
13+
- <https://www.pjrc.com/teensy/> (Teensy)
14+
15+
This sketch requires a board with a fair amount of memory, as we support
16+
multiple slaves as well the FIR array sensors.
17+
18+
19+
## Software
20+
21+
### Block diagram.
22+
23+
![](./media/melexis-i2c-stick-fw-overview.webp)
24+
25+
### Other resources
26+
27+
Besides this Arduino sketch, you also can have a look at our non-contact temperature drivers:
28+
29+
- <https://github.com/melexis/mlx90614-library>
30+
- <https://github.com/melexis/mlx90632-library>
31+
- <https://github.com/melexis/mlx90640-library>
32+
- <https://github.com/melexis/mlx90641-library>
33+
34+
Those are our released drivers.
35+
They require you to implement a couple of I2C routines specific for the MCU you choose.
36+
37+
For Arduino, you will find here an example on how to implement those I2C routines.
38+
39+
It is recommended to start your project from the above linked github drivers to build your own
40+
software, and use this Arduino project to get inspired. Especially the for the I2C routines and the functions within the sensor specific 'cmd' routines in the files `mlx<12345>_cmd.cpp/h`.

doc/02_serial_interface_tasks.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Melexis I2C Stick -- Serial Interface: Tasks.
2+
3+
## Tasks
4+
5+
Tasks are a single character requests, no need for `LF`
6+
This is handy when working in a serial terminal.
7+
8+
### `;` - Go Continuous Task
9+
10+
Enable to continuous mode.
11+
12+
The firmware will continuously poll each sensor (which has an associated
13+
driver) and display TA & TO as the data becomes available.
14+
15+
Send: `;`
16+
17+
Receive: `\\n;:continuous mode` + `LF`
18+
19+
### `!` - Stop Task
20+
21+
Stop the continuous mode, if it was started earlier.
22+
23+
Send: `!`
24+
25+
Receive: `\\n:interactive mode` + `LF`
26+
27+
Note: this is a single character command, no need for `LF`
28+
29+
### `>` -- Next active sensor Task
30+
31+
Select the next sensor on the bus as the active sensor.
32+
33+
Send: `>`
34+
35+
Receive: `\n>:5A:1,MLX90614` + `LF`
36+
37+
### `<` -- Previous active sensor Command
38+
39+
Select the previous sensor on the bus as the active sensor.
40+
41+
Send: `<`
42+
43+
Receive: `\n<:5A,1,MLX90614` + `LF`
44+
45+
### `?` -- help Task
46+
47+
Display help info about the tasks.
48+
49+
Send: `?`
50+
51+
Receive: `....` + `LF`
52+
53+
### `1` -- help Task
54+
55+
Alias for `?`-task.
56+
57+
### `5` -- refresh scan Task
58+
59+
Alias for `scan`-command. (see next chapter)

0 commit comments

Comments
 (0)