-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Arduino build + English manual #62
base: main
Are you sure you want to change the base?
Changes from 14 commits
2a6069b
e92fac5
52ffb41
30305eb
bfa0f53
03959ee
e969625
8ab6675
f1726f9
bee4578
d0d68d0
65c3cec
963b6c3
6f5dd10
3b4bafb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
platforms: | ||
rpipico: | ||
board: rp2040:rp2040:rpipico | ||
package: rp2040:rp2040 | ||
gcc: | ||
features: | ||
defines: | ||
- ARDUINO_ARCH_RP2040 | ||
warnings: | ||
flags: | ||
|
||
packages: | ||
rp2040:rp2040: | ||
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json | ||
|
||
compile: | ||
# Choosing to run compilation tests on 2 different Arduino platforms | ||
platforms: | ||
# - uno | ||
# - due | ||
# - zero | ||
# - leonardo | ||
# - m4 | ||
- esp32 | ||
# - esp8266 | ||
# - mega2560 | ||
# - rpipico | ||
libraries: | ||
- U8g2 | ||
- HX711 | ||
- ESP32Servo | ||
Comment on lines
+28
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to apply version pinning here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not that I know of, default it uses the latest versions as far as I know. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Arduino-lint | ||
|
||
on: [push, pull_request] | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: arduino/arduino-lint-action@v1 | ||
with: | ||
library-manager: update | ||
compliance: strict |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Arduino CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
runTest: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
- run: | | ||
gem install arduino_ci | ||
arduino_ci.rb | ||
Comment on lines
+15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can probably read up on it on the documentation of Arduino-CI, but let us also ask right here: What does invoking On the Arduino-CI docs, I can find:
We can't imagine some set of standard mocks can satisfy the requirements of HaniMandl easily. What about the display interface, for example? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We guess the current state "just compiles" the code, and verifies it on behalf of that outcome, just like platformio-ci.yaml is doing it, right? Coming from there, do you have any suggestions how we could apply better unit testing to the codebase? I guess it would need to be tremendously modularized, in order to achieve that? Apologies for our beginner's questions. Please do not spend too much time answering them, we are also writing them down for our own reference, in order to outline where we will need to level up on understanding and using Arduino-CI properly. The right way will be to do it hands-on, paired with reading relevant documentation sections. We just didn't get around doing it, yet. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
arduino_ci.rb is a ruby script that calls the command line Arduino compilers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Mocks are not too difficult, but takes quite some effort to implement, so I do not know if it is worth the effort. Mocks are ideal for testing a part of a library, when you would create some core "hanimandl" library it might make sense to put the effort in. A way to do this is to split of typical functions in a separate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That is right, however it does compile the code under the Arduino IDE, not under the PlatformIO environment. As these are different it adds "robustness". The same is true for doing the LINT check, it does look at the code and even if it compiles it warns you of some risky code constructs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, think so. I looked quickly at the code and I see you have organized it in a way that keeps all things close to each other, however many functions do handle pins, do display work and changes some setting etc. A program of this size I would split of all display handling in one file, all the reading of buttons (pin IO) in one file, the handling of rotary encoders in one file. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: JSON check | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.json' | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: json-syntax-check | ||
uses: limitusus/json-syntax-check@v2 | ||
with: | ||
pattern: "\\.json$" |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,6 +4,8 @@ | |||||
![Documentation](https://readthedocs.org/projects/hanimandl/badge/) | ||||||
![Version](https://img.shields.io/github/v/tag/hiveeyes/hanimandl.svg) | ||||||
|
||||||
[![Arduino CI](https://gh.neting.cchiveeyes/hanimandl/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just spotted a one-character typo.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will fix that one right away. |
||||||
|
||||||
[de] Ein halbautomatischer Honig-Abfüll-Roboter. | ||||||
<br/> | ||||||
[en] A semi-automatic honey filling robot. | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Change Log | ||
|
||
## 2020-08-13, (v0.2.4 bis) v0.2.6 | ||
|
||
Display: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that
esp32
is selected down below. In this spirit, I am wondering why any references to the Pico are needed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These rpipico lines are not needed per se, however it would allow you to include it in a future test.
Pico is not supported directly in the core Arduino build.
This is what is needed to get the build working with an rpipico compiler.