Skip to content
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

update GitHub actions #13

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# These are supported funding model platforms

github: RobTillaart
github: RobTillaart
custom: "https://www.paypal.me/robtillaart"

3 changes: 2 additions & 1 deletion .github/workflows/arduino-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: arduino/arduino-lint-action@v1
with:
library-manager: update
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/arduino_test_runner.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---

name: Arduino CI

on: [push, pull_request]

jobs:
runTest:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/jsoncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ on:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
uses: limitusus/json-syntax-check@v2
with:
pattern: "\\.json$"

2 changes: 1 addition & 1 deletion ADT7470.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FILE: ADT7470.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.2.0
// VERSION: 0.2.1
// PURPOSE: Arduino library for I2C ADT7470 Fan Monitoring
// URL: https://github.com/RobTillaart/ADT7470
// http://forum.arduino.cc/index.php?topic=363218.0
Expand Down
5 changes: 2 additions & 3 deletions ADT7470.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
//
// FILE: ADT7470.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.0
// VERSION: 0.2.1
// PURPOSE: Arduino library for I2C ADT7470 Fan Monitoring
// URL: https://github.com/RobTillaart/ADT7470
// http://forum.arduino.cc/index.php?topic=363218.0



#include "Arduino.h"
#include "Wire.h"

#define ADT7470_LIB_VERSION (F("0.2.0"))
#define ADT7470_LIB_VERSION (F("0.2.1"))

#ifndef ADT7470_TIMEOUT
#define ADT7470_TIMEOUT 1000
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.2.1] - 2023-04-06
- update GitHub actions
- minor edits


## [0.2.0] - 2023-10-13
- add support for Wire1 etc (ESP32)
- add CHANGELOG.md
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2015-2023 Rob Tillaart
Copyright (c) 2015-2024 Rob Tillaart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ inductive pulse when switched off. (see also datasheet).

(from datasheet)

| Pin 11 | (ADDR) State | Address |
|:----------------------|:------------:|:---------------------------------------------:|
| High (10 kΩ to VCC) | 010 1111 | (0x5E left-justified or 0x2F right-justified) |
| Low (10 kΩ to GND) | 010 1100 | (0x58 left-justified or 0x2C right-justified) |
| Floating (no pull-up) | 010 1110 | (0x5C left-justified or 0x2E right-justified) |
| Pin 11 | (ADDR) State | Address |
|:------------------------|:------------:|:---------------------------------------------:|
| HIGH (10 kΩ to VCC) | 010 1111 | 0x5E left-justified or 0x2F right-justified |
| LOW (10 kΩ to GND) | 010 1100 | 0x58 left-justified or 0x2C right-justified |
| Floating (no pull-up) | 010 1110 | 0x5C left-justified or 0x2E right-justified |


## Interface
Expand All @@ -54,10 +54,10 @@ inductive pulse when switched off. (see also datasheet).
#include "ADT7470.h"
```

The interface consists of:
Check datasheet for the details as this section needs to be elaborated.

- **ADT7470()** constructor
- **void begin()** initialize the I2C bus
- **ADT7470(uint8_t address, TwoWire \*wire = &Wire)** constructor, with default I2C bus.
- **void begin()** initialize the library
- **bool isConnected()** check if the module is connected to the I2C bus
- **void startMonitoring()**
- **void stopMonitoring()**
Expand All @@ -78,15 +78,15 @@ The interface consists of:
of sensor index. Temperature sensors are daisy changed.
- **int8_t getMaxTemperature()** get max temperature of connected temperature sensors.
- **bool setTemperatureLimit(uint8_t index, int8_t low, int8_t high)** for ALARM function
- **int8_t getTemperatureLowLimit(uint8_t index)**
- **int8_t getTemperatureHighLimit(uint8_t index)**
- **int8_t getTemperatureLowLimit(uint8_t index)** return the set value. Default ?
- **int8_t getTemperatureHighLimit(uint8_t index)** return the set value. Default ?


#### PWM

- **bool setPWM(uint8_t index, uint8_t value)** set the speed of the fan at index
- **uint8_t getPWM(uint8_t index)** read back the speed set.
- **bool setFanLowFreq(value = 0)**
- **bool setFanLowFreq(value = 0)** set PWM frequency.
- **bool setFanHighFreq(value = 0)**
- **void setInvertPWM(uint8_t index)**
- **uint8_t getInvertPWM(uint8_t index)**
Expand Down
8 changes: 3 additions & 5 deletions examples/adt7470_demo/adt7470_demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// PURPOSE: demo ADT7470 library


#include <Wire.h>
#include "ADT7470.h"

ADT7470 ADT(ADT7470_ADDR_FLOAT); // default Wire
Expand All @@ -18,8 +17,8 @@ void setup()
Serial.println("ADT7470_LIB_VERSION: ");
Serial.println(ADT7470_LIB_VERSION);
Serial.println();


Wire.begin();

Serial.begin(115200);
Expand All @@ -41,7 +40,6 @@ void setup()
testTach();
testFanSpeed();


testStop();
}
Serial.println("Done");
Expand Down Expand Up @@ -141,7 +139,7 @@ void testTach()
ADT.setPulsesPerRevolution(i, ppr[i]);
bool b = (ppr[i] == ADT.getPulsesPerRevolution(i));
Serial.print("\t");
Serial.print(b ? "T" : "F"); // expect TTTT
Serial.print(b ? "T" : "F"); // expect TTTT
}
Serial.println();

Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/ADT7470.git"
},
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",
"frameworks": "*",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ADT7470
version=0.2.0
version=0.2.1
author=Rob Tillaart <[email protected]>
maintainer=Rob Tillaart <[email protected]>
sentence=ADT7470 Library
Expand Down
Loading