Skip to content

Commit

Permalink
add run-cl-arduino.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ackPeng committed Dec 19, 2024
1 parent 2df8123 commit 40105d5
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 4 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/run-cl-arduino.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Run Ci Arduino

on:
push:
pull_request:
repository_dispatch:
types: [trigger-workflow]

jobs:
ci-arduino:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout script repository
uses: actions/checkout@v4
with:
repository: Seeed-Studio/ci-arduino
path: ci


- name: Setup arduino cli
uses: arduino/[email protected]

- name: Create a depend.list file
run: |
# eg: echo "<repo>" >> depend.list
echo "adafruit/Adafruit_TinyUSB_ArduinoCore" >> depend.list
- name: Create a ignore.list file
run: |
# eg: echo "<path>,<fqbn>" >> ignore.list
- name: Build sketch
run: ./ci/tools/compile.sh

- name: Build result
run: |
cat build.log
if [ ${{ github.event_name }} == 'pull_request' ] && [ -f compile.failed ]; then
exit 1
fi
- name: Generate issue
if: ${{ github.event_name != 'pull_request' }}
run: ./ci/tools/issue.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion SeeedOLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "Wire.h"
#include "SeeedOLED.h"

#if (defined(__AVR__) || defined(__SAMD21G18A__))
#if (defined(__AVR__) || defined(__SAMD21G18A__) || defined(NRF52840_XXAA) || defined(ARDUINO_XIAO_RA4M1))
#include <avr/pgmspace.h>
#else
#include <pgmspace.h>
Expand Down
3 changes: 3 additions & 0 deletions SeeedOLED.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#include "Wire.h"
#endif




#define SeeedOLED_Max_X 127 //128 Pixels
#define SeeedOLED_Max_Y 63 //64 Pixels

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
#include <Wire.h>
#include <SeeedOLED.h>

#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
#ifdef SEEED_XIAO_M0
#define RefVal 5.0
#define SERIAL Serial
#elif defined(ARDUINO_SAMD_VARIANT_COMPLIANCE)
#define RefVal 3.3
#define SERIAL SerialUSB
#else
Expand Down
10 changes: 8 additions & 2 deletions examples/Seeed_ACS70331_basis_Demo/Seeed_ACS70331_basis_Demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,21 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#include <Wire.h>
#include <SeeedOLED.h>


#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
#ifdef SEEED_XIAO_M0
#define RefVal 5.0
#define SERIAL Serial
#elif defined(ARDUINO_SAMD_VARIANT_COMPLIANCE)
#define RefVal 3.3
#define SERIAL SerialUSB
#else
#define RefVal 5.0
#define SERIAL Serial
#endif


//An OLED Display is required here
//use pin A0
#define Pin A0
Expand Down

0 comments on commit 40105d5

Please sign in to comment.