diff --git a/.github/workflows/check-arduino.yml b/.github/workflows/check-arduino.yml index adb330f..e818685 100644 --- a/.github/workflows/check-arduino.yml +++ b/.github/workflows/check-arduino.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v4 - name: Arduino Lint - uses: arduino/arduino-lint-action@v1 + uses: arduino/arduino-lint-action@v2 with: compliance: specification library-manager: update diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 39fd50f..b03232d 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -54,7 +54,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: Save memory usage change report as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error path: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 9cde1ac..53a9f54 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -70,7 +70,7 @@ jobs: file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }} - name: Pass configuration files to next job via workflow artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: | *.yaml @@ -108,13 +108,13 @@ jobs: uses: actions/checkout@v4 - name: Download configuration files artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} path: ${{ env.CONFIGURATIONS_FOLDER }} - name: Remove unneeded artifact - uses: geekyeggo/delete-artifact@v2 + uses: geekyeggo/delete-artifact@v5 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} diff --git a/examples/RTC/RTC.ino b/examples/RTC/RTC.ino index 44df326..ba94ef4 100644 --- a/examples/RTC/RTC.ino +++ b/examples/RTC/RTC.ino @@ -62,7 +62,7 @@ void loop() { Serial.print(":"); Serial.println(MachineControl_RTCController.getSeconds()); - time_t utc_time = time(NULL); + time_t utc_time = MachineControl_RTCController.getEpoch(); Serial.print("Date as UTC time: "); Serial.println(utc_time); Serial.println(); diff --git a/library.properties b/library.properties index 5aacf4d..b523049 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Arduino_PortentaMachineControl -version=1.0.2 +version=1.0.3 author=Arduino maintainer=Arduino sentence=Arduino Library for Portenta Machine Control (PMC) diff --git a/src/TCTempProbeClass.cpp b/src/TCTempProbeClass.cpp index 9e74a62..7d40699 100644 --- a/src/TCTempProbeClass.cpp +++ b/src/TCTempProbeClass.cpp @@ -18,8 +18,9 @@ uint8_t* boardInfo(); TCTempProbeClass::TCTempProbeClass(PinName tc_cs_pin, PinName ch_sel0_pin, PinName ch_sel1_pin, - PinName ch_sel2_pin) -: MAX31855Class(tc_cs_pin), _tc_cs{tc_cs_pin}, _ch_sel0{ch_sel0_pin}, _ch_sel1{ch_sel1_pin}, _ch_sel2{ch_sel2_pin} + PinName ch_sel2_pin, + PinName tc_th_pin) +: MAX31855Class(tc_cs_pin), _tc_cs{tc_cs_pin}, _ch_sel0{ch_sel0_pin}, _ch_sel1{ch_sel1_pin}, _ch_sel2{ch_sel2_pin}, _tc_th{tc_th_pin} { } TCTempProbeClass::~TCTempProbeClass() @@ -31,6 +32,7 @@ bool TCTempProbeClass::begin() { pinMode(_ch_sel0, OUTPUT); pinMode(_ch_sel1, OUTPUT); pinMode(_ch_sel2, OUTPUT); + pinMode(_tc_th, OUTPUT); pinMode(_tc_cs, OUTPUT); @@ -92,10 +94,12 @@ void TCTempProbeClass::end() { void TCTempProbeClass::_enable() { digitalWrite(_tc_cs, LOW); + digitalWrite(_tc_th, LOW); } void TCTempProbeClass::_disable() { digitalWrite(_tc_cs, HIGH); + digitalWrite(_tc_th, HIGH); } TCTempProbeClass MachineControl_TCTempProbe; diff --git a/src/TCTempProbeClass.h b/src/TCTempProbeClass.h index 7001042..f0e74a0 100644 --- a/src/TCTempProbeClass.h +++ b/src/TCTempProbeClass.h @@ -41,7 +41,8 @@ class TCTempProbeClass: public MAX31855Class { TCTempProbeClass(PinName tc_cs_pin = MC_TC_CS_PIN, PinName ch_sel0_pin = MC_TC_SEL0_PIN, PinName ch_sel1_pin = MC_TC_SEL1_PIN, - PinName ch_sel2_pin = MC_TC_SEL2_PIN); + PinName ch_sel2_pin = MC_TC_SEL2_PIN, + PinName tc_th_pin = MC_TC_TH_PIN); /** * @brief Destruct the TCTempProbeClass object. @@ -74,6 +75,7 @@ class TCTempProbeClass: public MAX31855Class { PinName _ch_sel0; // Pin for the first channel selection bit PinName _ch_sel1; // Pin for the second channel selection bit PinName _ch_sel2; // Pin for the third channel selection bit + PinName _tc_th; // Pin for the TC/RTD connection /** * @brief Enable the chip select (CS) of the MAX31855 digital converter. diff --git a/src/pins_mc.h b/src/pins_mc.h index d89a75c..089466c 100644 --- a/src/pins_mc.h +++ b/src/pins_mc.h @@ -84,6 +84,7 @@ #define MC_TC_SEL0_PIN MC_RTD_SEL0_PIN #define MC_TC_SEL1_PIN MC_RTD_SEL1_PIN #define MC_TC_SEL2_PIN MC_RTD_SEL2_PIN +#define MC_TC_TH_PIN MC_RTD_TH_PIN /* USB */ #define MC_USB_PWR_PIN PB_14