Compare commits
51 Commits
Test_Digit
...
master
Author | SHA1 | Date | |
---|---|---|---|
fb05aecc88 | |||
dac17ed3bc | |||
e89df2c3a6 | |||
2b37808949 | |||
70c7838e02 | |||
c49ffd7aeb | |||
de00a4e005 | |||
77d04961ed | |||
418fca71c2 | |||
b13a1c02d1 | |||
ae774eb2d7 | |||
95b4e8fb91 | |||
59cf47ccff | |||
084eaa39b1 | |||
d67373902c | |||
7132586772 | |||
0700db282a | |||
5c8244dadf | |||
db8b2911bb | |||
2ac523ddce | |||
c18ead53af | |||
7e52710fcc | |||
25b60623f8 | |||
b1c29f2a5f | |||
9aee3e57fd | |||
5cbdf052bc | |||
b0c934cad4 | |||
1f6c1e26d6 | |||
cafd18d84a | |||
589d990dba | |||
1d18950d73 | |||
3c6b00e5bb | |||
e0d02340c2 | |||
96530b7d83 | |||
1819071f2a | |||
3f1a547c20 | |||
668fdcad25 | |||
0986f915f4 | |||
dccb8c98b0 | |||
d3503ed393 | |||
0330581fbc | |||
b2abe251c9 | |||
3f7fb745b6 | |||
a6859f7a4e | |||
c5fbc06d4f | |||
3872426e94 | |||
74556f01d7 | |||
46e72ba75c | |||
85cd960704 | |||
a112f94c68 | |||
582934d7c7 |
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
resources export-ignore
|
90
.project
@ -5,7 +5,97 @@
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.make.core.makeBuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.core.errorOutputParser</key>
|
||||
<value>org.eclipse.cdt.autotools.core.ErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.MakeErrorParser;</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.arguments</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.command</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.target.auto</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.target.clean</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.target.inc</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.environment</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.autotools.core.genmakebuilderV2</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>io.sloeber.core.inoToCpp</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.codan.core.codanBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>io.sloeber.arduinonature</nature>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.autotools.core.autotoolsNatureV2</nature>
|
||||
<nature>org.eclipse.cdt.make.core.makeNature</nature>
|
||||
<nature>org.eclipse.cdt.codan.core.codanNature</nature>
|
||||
<nature>org.eclipse.cdt.make.core.cfgSupportNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
42
.travis.yml
Normal file
@ -0,0 +1,42 @@
|
||||
# Continuous Integration (CI) is the practice, in software
|
||||
# engineering, of merging all developer working copies with a shared mainline
|
||||
# several times a day < https://docs.platformio.org/page/ci/index.html >
|
||||
#
|
||||
# Documentation:
|
||||
#
|
||||
# * Travis CI Embedded Builds with PlatformIO
|
||||
# < https://docs.travis-ci.com/user/integration/platformio/ >
|
||||
#
|
||||
# * PlatformIO integration with Travis CI
|
||||
# < https://docs.platformio.org/page/ci/travis.html >
|
||||
#
|
||||
# * User Guide for `platformio ci` command
|
||||
# < https://docs.platformio.org/page/userguide/cmd_ci.html >
|
||||
#
|
||||
#
|
||||
# Please choose one of the following templates (proposed below) and uncomment
|
||||
# it (remove "# " before each line) or use own configuration according to the
|
||||
# Travis CI documentation (see above).
|
||||
#
|
||||
|
||||
language: python
|
||||
python:
|
||||
- "3.7"
|
||||
|
||||
# Cache PlatformIO packages using Travis CI container-based infrastructure
|
||||
sudo: false
|
||||
cache:
|
||||
directories:
|
||||
- "~/.platformio"
|
||||
- $HOME/.cache/pip
|
||||
|
||||
env:
|
||||
- PLATFORMIO_CI_SRC=examples/Arduino4Leds4ButtonsWithInterrupt/Arduino4Leds4ButtonsWithInterrupt.ino
|
||||
- PLATFORMIO_CI_SRC=examples/readAll_Interrupt/readAll_Interrupt.ino
|
||||
|
||||
install:
|
||||
- pip install -U platformio pip setuptools
|
||||
- platformio update
|
||||
|
||||
script:
|
||||
- platformio ci --lib="." --board=uno --board=esp-wrover-kit
|
24
LICENSE.md
Normal file
@ -0,0 +1,24 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Renzo Mischianti www.mischianti.org All right reserved.
|
||||
|
||||
You may copy, alter and reuse this code in any way you like, but please leave
|
||||
reference to www.mischianti.org in your comments if you redistribute this code.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
2439
PCF8574.Doxyfile
364
PCF8574.cpp
@ -53,14 +53,14 @@ PCF8574::PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
|
||||
_usingInterrupt = true;
|
||||
};
|
||||
|
||||
#if !defined(__AVR) && !defined(__STM32F1__) && !defined(TEENSYDUINO)
|
||||
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO) && !defined(ARDUINO_ARCH_RENESAS)
|
||||
/**
|
||||
* Constructor
|
||||
* @param address: i2c address
|
||||
* @param sda: sda pin
|
||||
* @param scl: scl pin
|
||||
*/
|
||||
PCF8574::PCF8574(uint8_t address, uint8_t sda, uint8_t scl){
|
||||
PCF8574::PCF8574(uint8_t address, int sda, int scl){
|
||||
_wire = &Wire;
|
||||
|
||||
_address = address;
|
||||
@ -76,7 +76,7 @@ PCF8574::PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
|
||||
* @param interruptPin: pin to set interrupt
|
||||
* @param interruptFunction: function to call when interrupt raised
|
||||
*/
|
||||
PCF8574::PCF8574(uint8_t address, uint8_t sda, uint8_t scl, uint8_t interruptPin, void (*interruptFunction)() ){
|
||||
PCF8574::PCF8574(uint8_t address, int sda, int scl, uint8_t interruptPin, void (*interruptFunction)() ){
|
||||
_wire = &Wire;
|
||||
|
||||
_address = address;
|
||||
@ -90,7 +90,7 @@ PCF8574::PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef ESP32
|
||||
#if defined(ESP32) || defined(ARDUINO_ARCH_SAMD)|| defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RENESAS)
|
||||
/**
|
||||
* Constructor
|
||||
* @param address: i2c address
|
||||
@ -115,14 +115,15 @@ PCF8574::PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
|
||||
_interruptFunction = interruptFunction;
|
||||
_usingInterrupt = true;
|
||||
};
|
||||
|
||||
#endif
|
||||
#if defined(ESP32)
|
||||
/**
|
||||
* Constructor
|
||||
* @param address: i2c address
|
||||
* @param sda: sda pin
|
||||
* @param scl: scl pin
|
||||
*/
|
||||
PCF8574::PCF8574(TwoWire *pWire, uint8_t address, uint8_t sda, uint8_t scl){
|
||||
PCF8574::PCF8574(TwoWire *pWire, uint8_t address, int sda, int scl){
|
||||
_wire = pWire;
|
||||
|
||||
_address = address;
|
||||
@ -138,7 +139,7 @@ PCF8574::PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
|
||||
* @param interruptPin: pin to set interrupt
|
||||
* @param interruptFunction: function to call when interrupt raised
|
||||
*/
|
||||
PCF8574::PCF8574(TwoWire *pWire, uint8_t address, uint8_t sda, uint8_t scl, uint8_t interruptPin, void (*interruptFunction)() ){
|
||||
PCF8574::PCF8574(TwoWire *pWire, uint8_t address, int sda, int scl, uint8_t interruptPin, void (*interruptFunction)() ){
|
||||
_wire = pWire;
|
||||
|
||||
_address = address;
|
||||
@ -180,13 +181,29 @@ PCF8574::PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
|
||||
|
||||
}
|
||||
|
||||
bool PCF8574::begin(uint8_t address){
|
||||
_address = address;
|
||||
return PCF8574::begin();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* wake up i2c controller
|
||||
*/
|
||||
bool PCF8574::begin(){
|
||||
this->transmissionStatus = 4;
|
||||
#if !defined(__AVR) && !defined(__STM32F1__) && !defined(TEENSYDUINO)
|
||||
_wire->begin(_sda, _scl);
|
||||
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO) && !defined(ARDUINO_ARCH_RENESAS)
|
||||
DEBUG_PRINT(F("begin(sda, scl) -> "));DEBUG_PRINT(_sda);DEBUG_PRINT(F(" "));DEBUG_PRINTLN(_scl);
|
||||
// _wire->begin(_sda, _scl);
|
||||
#ifdef ARDUINO_ARCH_STM32
|
||||
_wire->begin((uint32_t)_sda, (uint32_t)_scl);
|
||||
#elif defined(ARDUINO_ARCH_RP2040)
|
||||
_wire->setSCL(_scl);
|
||||
_wire->setSDA(_sda);
|
||||
_wire->begin();
|
||||
#else
|
||||
_wire->begin((int)_sda, (int)_scl);
|
||||
#endif
|
||||
#else
|
||||
// Default pin for AVR some problem on software emulation
|
||||
// #define SCL_PIN _scl
|
||||
@ -208,7 +225,6 @@ bool PCF8574::begin(){
|
||||
#endif
|
||||
DEBUG_PRINTLN( resetInitial, BIN);
|
||||
|
||||
_wire->beginTransmission(_address);
|
||||
_wire->write(resetInitial);
|
||||
|
||||
initialBuffer = writeModeUp | readModePullUp;
|
||||
@ -369,24 +385,35 @@ bool PCF8574::checkProgression(byte oldValA, byte oldValB, byte newValA, byte ne
|
||||
}
|
||||
|
||||
#ifdef BASIC_ENCODER_ALGORITHM
|
||||
bool PCF8574::readEncoderValue(uint8_t pinA, uint8_t pinB, volatile long *encoderValue){
|
||||
bool PCF8574::readEncoderValue(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation){
|
||||
PCF8574::detachInterrupt();
|
||||
|
||||
bool changed = false;
|
||||
|
||||
byte na = PCF8574::digitalRead(pinA, true);
|
||||
byte nb = PCF8574::digitalRead(pinB, true);
|
||||
|
||||
byte encoderPinALast = (encoderValues & bit(pinA))>0?HIGH:LOW;
|
||||
byte encoderPinBLast = (encoderValues & bit(pinB))>0?HIGH:LOW;
|
||||
byte encoderPinALast = (this->encoderValues & bit(pinA))>0?HIGH:LOW;
|
||||
byte encoderPinBLast = (this->encoderValues & bit(pinB))>0?HIGH:LOW;
|
||||
|
||||
DEBUG_PRINT(pinA);
|
||||
DEBUG_PRINT(" TO --> ");
|
||||
DEBUG_PRINT(encoderPinALast);
|
||||
DEBUG_PRINT(encoderPinBLast);
|
||||
DEBUG_PRINT(" - ");
|
||||
DEBUG_PRINT(na);
|
||||
DEBUG_PRINT(nb);
|
||||
DEBUG_PRINTLN();
|
||||
|
||||
if ((encoderPinALast!=na || encoderPinBLast!=nb) && (encoderPinALast == LOW) && (na == HIGH)) {
|
||||
bool vCW = checkProgression(encoderPinALast, encoderPinBLast, na, nb, validCW);
|
||||
bool vCCW = checkProgression(encoderPinALast, encoderPinBLast, na, nb, validCCW);
|
||||
// bool vCW = checkProgression(encoderPinALast, encoderPinBLast, na, nb, validCW);
|
||||
// bool vCCW = checkProgression(encoderPinALast, encoderPinBLast, na, nb, validCCW);
|
||||
|
||||
if (nb == LOW) {
|
||||
*encoderValue = *encoderValue - 1;
|
||||
*encoderValue = *encoderValue + (!reverseRotation?+1:-1);
|
||||
changed = true;
|
||||
} else {
|
||||
*encoderValue = *encoderValue + 1;
|
||||
*encoderValue = *encoderValue + (!reverseRotation?-1:+1);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
@ -401,21 +428,166 @@ bool PCF8574::checkProgression(byte oldValA, byte oldValB, byte newValA, byte ne
|
||||
|
||||
}
|
||||
|
||||
encoderValues = (encoderPinALast!=na)?encoderValues ^ bit(pinA):encoderValues;
|
||||
encoderValues = (encoderPinBLast!=nb)?encoderValues ^ bit(pinB):encoderValues;
|
||||
this->encoderValues = (encoderPinALast!=na)?this->encoderValues ^ bit(pinA):this->encoderValues;
|
||||
this->encoderValues = (encoderPinBLast!=nb)?this->encoderValues ^ bit(pinB):this->encoderValues;
|
||||
PCF8574::attachInterrupt();
|
||||
|
||||
return changed;
|
||||
}
|
||||
int8_t PCF8574::readEncoderValue(uint8_t pinA, uint8_t pinB) {
|
||||
volatile long encoderValue = 0;
|
||||
PCF8574::readEncoderValue(pinA, pinB, &encoderValue);
|
||||
return encoderValue;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef SEQUENCE_ENCODER_ALGORITHM
|
||||
bool PCF8574::readEncoderValueSequence(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation){
|
||||
|
||||
PCF8574::detachInterrupt();
|
||||
bool changed = false;
|
||||
|
||||
delay(100);
|
||||
byte na = PCF8574::digitalRead(pinA, true);
|
||||
byte nb = PCF8574::digitalRead(pinB, true);
|
||||
|
||||
byte encoderPinALast = (this->encoderValues & bit(pinA))>0?HIGH:LOW;
|
||||
byte encoderPinBLast = (this->encoderValues & bit(pinB))>0?HIGH:LOW;
|
||||
|
||||
DEBUG_PRINT(pinA);
|
||||
DEBUG_PRINT(" TO --> ");
|
||||
DEBUG_PRINT(encoderPinALast);
|
||||
DEBUG_PRINT(encoderPinBLast);
|
||||
DEBUG_PRINT(" - ");
|
||||
DEBUG_PRINT(na);
|
||||
DEBUG_PRINT(nb);
|
||||
DEBUG_PRINT(" -- ");
|
||||
|
||||
int encoded = (na << 1) | nb; //converting the 2 pin value to single number
|
||||
int lastEncoded = (encoderPinALast << 1) | encoderPinBLast;
|
||||
int sum = (lastEncoded << 2) | encoded; //adding it to the previous encoded value
|
||||
|
||||
DEBUG_PRINT("sum - ");
|
||||
DEBUG_PRINT(sum, BIN);
|
||||
|
||||
DEBUG_PRINT(" enc - ");
|
||||
DEBUG_PRINT( *encoderValue);
|
||||
|
||||
if(
|
||||
sum == 0b1101
|
||||
|| sum == 0b0100
|
||||
|| sum == 0b0010
|
||||
|| sum == 0b1011
|
||||
){
|
||||
// encoderValue ++;
|
||||
*encoderValue = *encoderValue + (!reverseRotation?+1:-1);
|
||||
changed = true;
|
||||
}
|
||||
if(
|
||||
sum == 0b1110
|
||||
|| sum == 0b0111
|
||||
|| sum == 0b0001
|
||||
|| sum == 0b1000
|
||||
) {
|
||||
*encoderValue = *encoderValue + (!reverseRotation?-1:+1);
|
||||
changed = true;
|
||||
// encoderValue --;
|
||||
}
|
||||
|
||||
DEBUG_PRINT(" enc next - ");
|
||||
DEBUG_PRINTLN( *encoderValue);
|
||||
|
||||
this->encoderValues = (encoderPinALast!=na)?this->encoderValues ^ bit(pinA):this->encoderValues;
|
||||
this->encoderValues = (encoderPinBLast!=nb)?this->encoderValues ^ bit(pinB):this->encoderValues;
|
||||
PCF8574::attachInterrupt();
|
||||
return changed;
|
||||
}
|
||||
int8_t PCF8574::readEncoderValueSequence(uint8_t pinA, uint8_t pinB) {
|
||||
volatile long encoderValue = 0;
|
||||
PCF8574::readEncoderValueSequence(pinA, pinB, &encoderValue);
|
||||
return encoderValue;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef SEQUENCE_ENCODER_ALGORITHM_REDUCED
|
||||
bool PCF8574::readEncoderValueSequenceReduced(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation){
|
||||
|
||||
PCF8574::detachInterrupt();
|
||||
bool changed = false;
|
||||
|
||||
delay(100);
|
||||
byte na = PCF8574::digitalRead(pinA, true);
|
||||
byte nb = PCF8574::digitalRead(pinB, true);
|
||||
|
||||
byte encoderPinALast = (this->encoderValues & bit(pinA))>0?HIGH:LOW;
|
||||
byte encoderPinBLast = (this->encoderValues & bit(pinB))>0?HIGH:LOW;
|
||||
|
||||
DEBUG_PRINT(pinA);
|
||||
DEBUG_PRINT(" TO --> ");
|
||||
DEBUG_PRINT(encoderPinALast);
|
||||
DEBUG_PRINT(encoderPinBLast);
|
||||
DEBUG_PRINT(" - ");
|
||||
DEBUG_PRINT(na);
|
||||
DEBUG_PRINT(nb);
|
||||
DEBUG_PRINT(" -- ");
|
||||
|
||||
int encoded = (na << 1) | nb; //converting the 2 pin value to single number
|
||||
int lastEncoded = (encoderPinALast << 1) | encoderPinBLast;
|
||||
int sum = (lastEncoded << 2) | encoded; //adding it to the previous encoded value
|
||||
|
||||
DEBUG_PRINT("sum - ");
|
||||
DEBUG_PRINT(sum, BIN);
|
||||
|
||||
DEBUG_PRINT(" enc - ");
|
||||
DEBUG_PRINT( *encoderValue);
|
||||
|
||||
if(
|
||||
sum == 0b1101
|
||||
// || sum == 0b0100
|
||||
|| sum == 0b0010
|
||||
// || sum == 0b1011
|
||||
){
|
||||
// encoderValue ++;
|
||||
*encoderValue = *encoderValue + (!reverseRotation?+1:-1);
|
||||
changed = true;
|
||||
}
|
||||
if(
|
||||
sum == 0b1110
|
||||
// || sum == 0b0111
|
||||
|| sum == 0b0001
|
||||
// || sum == 0b1000
|
||||
) {
|
||||
*encoderValue = *encoderValue + (!reverseRotation?-1:+1);
|
||||
changed = true;
|
||||
// encoderValue --;
|
||||
}
|
||||
|
||||
DEBUG_PRINT(" enc next - ");
|
||||
DEBUG_PRINTLN( *encoderValue);
|
||||
|
||||
this->encoderValues = (encoderPinALast!=na)?this->encoderValues ^ bit(pinA):this->encoderValues;
|
||||
this->encoderValues = (encoderPinBLast!=nb)?this->encoderValues ^ bit(pinB):this->encoderValues;
|
||||
PCF8574::attachInterrupt();
|
||||
return changed;
|
||||
}
|
||||
int8_t PCF8574::readEncoderValueSequenceReduced(uint8_t pinA, uint8_t pinB) {
|
||||
volatile long encoderValue = 0;
|
||||
PCF8574::readEncoderValueSequenceReduced(pinA, pinB, &encoderValue);
|
||||
return encoderValue;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef MISCHIANTI_ENCODER_ALGORITHM
|
||||
bool PCF8574::readEncoderValue(uint8_t pinA, uint8_t pinB, volatile long *encoderValue){
|
||||
bool PCF8574::readEncoderValueMischianti(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation){
|
||||
PCF8574::detachInterrupt();
|
||||
bool changed = false;
|
||||
|
||||
byte na = PCF8574::digitalRead(pinA, true);
|
||||
byte nb = PCF8574::digitalRead(pinB, true);
|
||||
|
||||
byte encoderPinALast = (encoderValues & bit(pinA))>0?HIGH:LOW;
|
||||
byte encoderPinBLast = (encoderValues & bit(pinB))>0?HIGH:LOW;
|
||||
byte encoderPinALast = (this->encoderValues & bit(pinA))>0?HIGH:LOW;
|
||||
byte encoderPinBLast = (this->encoderValues & bit(pinB))>0?HIGH:LOW;
|
||||
|
||||
if ((encoderPinALast!=na || encoderPinBLast!=nb) && ((encoderPinALast == LOW) || encoderPinALast==encoderPinBLast) && (na == HIGH)) {
|
||||
DEBUG_PRINT("TO --> ");
|
||||
@ -427,26 +599,156 @@ bool PCF8574::checkProgression(byte oldValA, byte oldValB, byte newValA, byte ne
|
||||
DEBUG_PRINTLN();
|
||||
|
||||
if (nb == LOW && nb!=na) {
|
||||
*encoderValue = *encoderValue + 1;
|
||||
*encoderValue = *encoderValue + (!reverseRotation?+1:-1);
|
||||
changed = true;
|
||||
} else if (nb==na && encoderPinALast==encoderPinBLast) {
|
||||
*encoderValue = *encoderValue - 1;
|
||||
*encoderValue = *encoderValue + (!reverseRotation?-1:+1);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
// encoderValues = encoderValues & (~(bit(pinA) | bit(pinB)));
|
||||
// if (na == HIGH){
|
||||
// encoderValues = encoderValues | bit(pinA);
|
||||
// }
|
||||
// if (nb == HIGH){
|
||||
// encoderValues = encoderValues | bit(pinA);
|
||||
// }
|
||||
|
||||
if (encoderPinALast!=na || encoderPinBLast!=nb){
|
||||
this->encoderValues = (encoderPinALast!=na)?this->encoderValues ^ bit(pinA):this->encoderValues;
|
||||
this->encoderValues = (encoderPinBLast!=nb)?this->encoderValues ^ bit(pinB):this->encoderValues;
|
||||
}
|
||||
|
||||
PCF8574::attachInterrupt();
|
||||
return changed;
|
||||
}
|
||||
int8_t PCF8574::readEncoderValueMischianti(uint8_t pinA, uint8_t pinB) {
|
||||
volatile long encoderValue = 0;
|
||||
PCF8574::readEncoderValueMischianti(pinA, pinB, &encoderValue);
|
||||
return encoderValue;
|
||||
}
|
||||
|
||||
#endif
|
||||
//#ifdef MISCHIANTI_ENCODER_ALGORITHM_EVOLVED
|
||||
// bool PCF8574::readEncoderValueEvolved(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation){
|
||||
// PCF8574::detachInterrupt();
|
||||
// bool changed = false;
|
||||
//
|
||||
// byte na = PCF8574::digitalRead(pinA, true);
|
||||
// byte nb = PCF8574::digitalRead(pinB, true);
|
||||
//
|
||||
// byte encoderPinALast = (this->encoderValues & bit(pinA))>0?HIGH:LOW;
|
||||
// byte encoderPinBLast = (this->encoderValues & bit(pinB))>0?HIGH:LOW;
|
||||
//
|
||||
//// Serial.print(pinA);
|
||||
//// Serial.print(" TO --> ");
|
||||
//// Serial.print(encoderPinALast);
|
||||
//// Serial.print(encoderPinBLast);
|
||||
//// Serial.print(" - ");
|
||||
//// Serial.print(na);
|
||||
//// Serial.print(nb);
|
||||
//
|
||||
// if (
|
||||
//
|
||||
// ((encoderPinALast!=na || encoderPinBLast!=nb) && ((encoderPinALast == LOW) || encoderPinALast==encoderPinBLast) && (na == HIGH))
|
||||
// || ((encoderPinALast!=na || encoderPinBLast!=nb) && ((encoderPinALast == HIGH) || encoderPinALast==encoderPinBLast) && (na == LOW))
|
||||
// ){
|
||||
// DEBUG_PRINT("TO --> ");
|
||||
// DEBUG_PRINT(encoderPinALast);
|
||||
// DEBUG_PRINT(encoderPinBLast);
|
||||
// DEBUG_PRINT(" - ");
|
||||
// DEBUG_PRINT(na);
|
||||
// DEBUG_PRINT(nb);
|
||||
// DEBUG_PRINTLN();
|
||||
//
|
||||
//// Serial.print (" <------ ");
|
||||
//
|
||||
// if (nb == LOW && nb!=na) {
|
||||
// *encoderValue = *encoderValue + (!reverseRotation?+1:-1);
|
||||
// changed = true;
|
||||
// } else if (nb==na && encoderPinALast==encoderPinBLast) {
|
||||
// *encoderValue = *encoderValue + (!reverseRotation?-1:+1);
|
||||
// changed = true;
|
||||
// }
|
||||
// }
|
||||
//// Serial.println();
|
||||
//// encoderValues = encoderValues & (~(bit(pinA) | bit(pinB)));
|
||||
//// if (na == HIGH){
|
||||
//// encoderValues = encoderValues | bit(pinA);
|
||||
//// }
|
||||
//// if (nb == HIGH){
|
||||
//// encoderValues = encoderValues | bit(pinA);
|
||||
//// }
|
||||
//
|
||||
// if (encoderPinALast!=na || encoderPinBLast!=nb){
|
||||
// this->encoderValues = (encoderPinALast!=na)?this->encoderValues ^ bit(pinA):this->encoderValues;
|
||||
// this->encoderValues = (encoderPinBLast!=nb)?this->encoderValues ^ bit(pinB):this->encoderValues;
|
||||
// }
|
||||
//
|
||||
// PCF8574::attachInterrupt();
|
||||
// return changed;
|
||||
// }
|
||||
// int8_t PCF8574::readEncoderValueEvolved(uint8_t pinA, uint8_t pinB) {
|
||||
// volatile long encoderValue = 0;
|
||||
// PCF8574::readEncoderValueEvolved(pinA, pinB, &encoderValue);
|
||||
// return encoderValue;
|
||||
// }
|
||||
//
|
||||
//#endif
|
||||
|
||||
#ifdef POKI_ENCODER_ALGORITHM
|
||||
bool PCF8574::readEncoderValuePoki(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation){
|
||||
PCF8574::detachInterrupt();
|
||||
|
||||
bool changed = false;
|
||||
|
||||
byte na = PCF8574::digitalRead(pinA, true);
|
||||
byte nb = PCF8574::digitalRead(pinB, true);
|
||||
|
||||
byte encoderPinALast = (this->encoderValues & bit(pinA))>0?HIGH:LOW;
|
||||
byte encoderPinBLast = (this->encoderValues & bit(pinB))>0?HIGH:LOW;
|
||||
|
||||
DEBUG_PRINT("TO --> ");
|
||||
DEBUG_PRINT(encoderPinALast);
|
||||
DEBUG_PRINT(encoderPinBLast);
|
||||
DEBUG_PRINT(" - ");
|
||||
DEBUG_PRINT(na);
|
||||
DEBUG_PRINT(nb);
|
||||
DEBUG_PRINTLN();
|
||||
|
||||
if ((encoderPinALast!=na || encoderPinBLast!=nb) && ((encoderPinALast == LOW) || encoderPinALast==encoderPinBLast) && (na == HIGH)) {
|
||||
DEBUG_PRINT("TO --> ");
|
||||
DEBUG_PRINT(encoderPinALast);
|
||||
DEBUG_PRINT(encoderPinBLast);
|
||||
DEBUG_PRINT(" - ");
|
||||
DEBUG_PRINT(na);
|
||||
DEBUG_PRINT(nb);
|
||||
DEBUG_PRINTLN();
|
||||
|
||||
if (na && !nb) {
|
||||
if (encoderPinBLast) {
|
||||
*encoderValue = *encoderValue + (!reverseRotation?+1:-1);
|
||||
} else {
|
||||
*encoderValue = *encoderValue + (!reverseRotation?-1:+1);
|
||||
}
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
encoderValues = (encoderPinALast!=na)?encoderValues ^ bit(pinA):encoderValues;
|
||||
encoderValues = (encoderPinBLast!=nb)?encoderValues ^ bit(pinB):encoderValues;
|
||||
this->encoderValues = (encoderPinALast!=na)?this->encoderValues ^ bit(pinA):encoderValues;
|
||||
this->encoderValues = (encoderPinBLast!=nb)?this->encoderValues ^ bit(pinB):encoderValues;
|
||||
PCF8574::attachInterrupt();
|
||||
|
||||
return changed;
|
||||
}
|
||||
int8_t PCF8574::readEncoderValuePoki(uint8_t pinA, uint8_t pinB) {
|
||||
volatile long encoderValue = 0;
|
||||
PCF8574::readEncoderValue(pinA, pinB, &encoderValue);
|
||||
return encoderValue;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int8_t PCF8574::readEncoderValue(uint8_t pinA, uint8_t pinB) {
|
||||
volatile long encoderValue = 0;
|
||||
PCF8574::readEncoderValue(pinA, pinB, &encoderValue);
|
||||
return encoderValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read value from i2c and bufferize it
|
||||
|
110
PCF8574.h
@ -2,7 +2,7 @@
|
||||
* PCF8574 GPIO Port Expand
|
||||
*
|
||||
* AUTHOR: Renzo Mischianti
|
||||
* VERSION: 2.2.0
|
||||
* VERSION: 2.3.7
|
||||
*
|
||||
* https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/
|
||||
*
|
||||
@ -47,19 +47,22 @@
|
||||
#define DEFAULT_SCL SCL;
|
||||
|
||||
// Uncomment to enable printing out nice debug messages.
|
||||
// #define PCF8574_DEBUG
|
||||
// #define PCF8574_DEBUG
|
||||
|
||||
// Uncomment for low memory usage this prevent use of complex DigitalInput structure and free 7byte of memory
|
||||
// #define PCF8574_LOW_MEMORY
|
||||
|
||||
// Uncomment for low memory usage this prevent use of complex DigitalInput structure and free 7byte of memory
|
||||
// Uncomment for low latency to get realtime data every time.
|
||||
// #define PCF8574_LOW_LATENCY
|
||||
|
||||
//#define PCF8574_SOFT_INITIALIZATION
|
||||
|
||||
// Select an algorithm to manage encoder progression
|
||||
//#define BASIC_ENCODER_ALGORITHM
|
||||
#define MISCHIANTI_ENCODER_ALGORITHM
|
||||
#define BASIC_ENCODER_ALGORITHM
|
||||
// #define MISCHIANTI_ENCODER_ALGORITHM
|
||||
// #define SEQUENCE_ENCODER_ALGORITHM_REDUCED
|
||||
// #define SEQUENCE_ENCODER_ALGORITHM
|
||||
// #define POKI_ENCODER_ALGORITHM
|
||||
|
||||
// Define where debug output will be printed.
|
||||
#define DEBUG_PRINTER Serial
|
||||
@ -106,21 +109,23 @@ public:
|
||||
PCF8574(uint8_t address);
|
||||
PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunction)() );
|
||||
|
||||
#if !defined(__AVR) && !defined(__STM32F1__) && !defined(TEENSYDUINO)
|
||||
PCF8574(uint8_t address, uint8_t sda, uint8_t scl);
|
||||
PCF8574(uint8_t address, uint8_t sda, uint8_t scl, uint8_t interruptPin, void (*interruptFunction)());
|
||||
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO) && !defined(ARDUINO_ARCH_RENESAS)
|
||||
PCF8574(uint8_t address, int sda, int scl);
|
||||
PCF8574(uint8_t address, int sda, int scl, uint8_t interruptPin, void (*interruptFunction)());
|
||||
#endif
|
||||
|
||||
#ifdef ESP32
|
||||
#if defined(ESP32) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RENESAS)
|
||||
///// changes for second i2c bus
|
||||
PCF8574(TwoWire *pWire, uint8_t address);
|
||||
PCF8574(TwoWire *pWire, uint8_t address, uint8_t sda, uint8_t scl);
|
||||
|
||||
PCF8574(TwoWire *pWire, uint8_t address, uint8_t interruptPin, void (*interruptFunction)() );
|
||||
PCF8574(TwoWire *pWire, uint8_t address, uint8_t sda, uint8_t scl, uint8_t interruptPin, void (*interruptFunction)());
|
||||
#endif
|
||||
#if defined(ESP32)
|
||||
PCF8574(TwoWire *pWire, uint8_t address, int sda, int scl);
|
||||
PCF8574(TwoWire *pWire, uint8_t address, int sda, int scl, uint8_t interruptPin, void (*interruptFunction)());
|
||||
#endif
|
||||
|
||||
bool begin();
|
||||
bool begin(uint8_t address);
|
||||
void pinMode(uint8_t pin, uint8_t mode, uint8_t output_start = HIGH);
|
||||
|
||||
void encoder(uint8_t pinA, uint8_t pinB);
|
||||
@ -152,8 +157,30 @@ public:
|
||||
#endif
|
||||
bool digitalWrite(uint8_t pin, uint8_t value);
|
||||
|
||||
bool readEncoderValue(uint8_t pinA, uint8_t pinB, volatile long *encoderValue);
|
||||
#ifdef MISCHIANTI_ENCODER_ALGORITHM
|
||||
bool readEncoderValueMischianti(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation = false);
|
||||
int8_t readEncoderValueMischianti(uint8_t pinA, uint8_t pinB);
|
||||
#endif
|
||||
#ifdef POKI_ENCODER_ALGORITHM
|
||||
bool readEncoderValuePoki(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation = false);
|
||||
int8_t readEncoderValuePoki(uint8_t pinA, uint8_t pinB);
|
||||
#endif
|
||||
|
||||
// bool readEncoderValueEvolved(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation = false);
|
||||
// int8_t readEncoderValueEvolved(uint8_t pinA, uint8_t pinB);
|
||||
|
||||
#ifdef SEQUENCE_ENCODER_ALGORITHM
|
||||
bool readEncoderValueSequence(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation = false);
|
||||
int8_t readEncoderValueSequence(uint8_t pinA, uint8_t pinB);
|
||||
#endif
|
||||
#ifdef SEQUENCE_ENCODER_ALGORITHM_REDUCED
|
||||
bool readEncoderValueSequenceReduced(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation = false);
|
||||
int8_t readEncoderValueSequenceReduced(uint8_t pinA, uint8_t pinB);
|
||||
#endif
|
||||
#ifdef BASIC_ENCODER_ALGORITHM
|
||||
bool readEncoderValue(uint8_t pinA, uint8_t pinB, volatile long *encoderValue, bool reverseRotation = false);
|
||||
int8_t readEncoderValue(uint8_t pinA, uint8_t pinB);
|
||||
#endif
|
||||
|
||||
int getLatency() const {
|
||||
return latency;
|
||||
@ -168,22 +195,38 @@ public:
|
||||
}
|
||||
|
||||
bool isLastTransmissionSuccess(){
|
||||
DEBUG_PRINT(F("STATUS --> "));
|
||||
DEBUG_PRINTLN(transmissionStatus);
|
||||
return transmissionStatus==0;
|
||||
}
|
||||
private:
|
||||
uint8_t _address;
|
||||
|
||||
#ifdef __STM32F1__
|
||||
#ifndef SDA
|
||||
#define DEFAULT_SDA PB7
|
||||
#define DEFAULT_SCL PB6
|
||||
#if !defined(DEFAULT_SDA)
|
||||
# if defined(ARDUINO_ARCH_STM32)
|
||||
# define DEFAULT_SDA PB7
|
||||
# elif defined(ESP8266)
|
||||
# define DEFAULT_SDA 4
|
||||
# elif defined(SDA)
|
||||
# define DEFAULT_SDA SDA
|
||||
# else
|
||||
# error "Error define DEFAULT_SDA, SDA not declared, if you have this error contact the mantainer"
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(DEFAULT_SCL)
|
||||
# if defined(ARDUINO_ARCH_STM32)
|
||||
# define DEFAULT_SCL PB6
|
||||
# elif defined(ESP8266)
|
||||
# define DEFAULT_SCL 5
|
||||
# elif defined(SDA)
|
||||
# define DEFAULT_SCL SCL
|
||||
# else
|
||||
# error "Error define DEFAULT_SCL, SCL not declared, if you have this error contact the mantainer"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
uint8_t _sda = DEFAULT_SDA
|
||||
;
|
||||
uint8_t _scl = DEFAULT_SCL
|
||||
;
|
||||
int _sda = DEFAULT_SDA;
|
||||
int _scl = DEFAULT_SCL;
|
||||
|
||||
TwoWire *_wire;
|
||||
|
||||
@ -191,19 +234,19 @@ private:
|
||||
uint8_t _interruptPin = 2;
|
||||
void (*_interruptFunction)(){};
|
||||
|
||||
byte writeMode = B00000000;
|
||||
byte writeModeUp = B00000000;
|
||||
byte readMode = B00000000;
|
||||
byte readModePullUp = B00000000;
|
||||
byte readModePullDown = B00000000;
|
||||
byte byteBuffered = B00000000;
|
||||
byte resetInitial = B00000000;
|
||||
byte initialBuffer = B00000000;
|
||||
byte writeMode = 0b00000000;
|
||||
byte writeModeUp = 0b00000000;
|
||||
byte readMode = 0b00000000;
|
||||
byte readModePullUp = 0b00000000;
|
||||
byte readModePullDown = 0b00000000;
|
||||
byte byteBuffered = 0b00000000;
|
||||
byte resetInitial = 0b00000000;
|
||||
byte initialBuffer = 0b00000000;
|
||||
unsigned long lastReadMillis = 0;
|
||||
|
||||
byte writeByteBuffered = B00000000;
|
||||
byte writeByteBuffered = 0b00000000;
|
||||
|
||||
byte encoderValues = B00000000;
|
||||
volatile byte encoderValues = 0b00000000;
|
||||
|
||||
uint8_t prevNextCode = 0;
|
||||
uint16_t store=0;
|
||||
@ -214,8 +257,8 @@ private:
|
||||
|
||||
// byte validCW = B11100001;
|
||||
// byte validCCW = B01001011;
|
||||
byte validCW = B01001011;
|
||||
byte validCCW = B11100001;
|
||||
byte validCW = 0b01001011;
|
||||
byte validCCW = 0b11100001;
|
||||
|
||||
uint8_t transmissionStatus = 0;
|
||||
|
||||
@ -224,3 +267,4 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
42
PCF8574_library.h
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* PCF8574 GPIO Port Expand
|
||||
*
|
||||
* AUTHOR: Renzo Mischianti
|
||||
* VERSION: 2.3.7
|
||||
*
|
||||
* https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Renzo Mischianti www.mischianti.org All right reserved.
|
||||
*
|
||||
* You may copy, alter and reuse this code in any way you like, but please leave
|
||||
* reference to www.mischianti.org in your comments if you redistribute this code.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef PCF8574_LIBRARY_H
|
||||
#define PCF8574_LIBRARY_H
|
||||
|
||||
#include "PCF8574.h"
|
||||
|
||||
#endif
|
||||
|
||||
#pragma once
|
56
README.md
@ -9,30 +9,39 @@
|
||||
align="right"></a>
|
||||
</div>
|
||||
|
||||
### Additional information and document update here on my site: [pcf8574 Article](https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/).
|
||||
#
|
||||
|
||||
### If you need more pins [here](https://www.mischianti.org/2019/07/22/pcf8575-i2c-16-bit-digital-i-o-expander/) you can find pcf8575 16bit version of the IC.
|
||||
|
||||
### Version 2.2
|
||||
# PCF8574 PCF8574AP digital input and output expander with i2c bus.
|
||||
#### Complete documentation on my site: [pcf8574 Article](https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/).
|
||||
|
||||
Library to use i2c analog IC with arduino and esp8266. Can read and write digital value with only 2 wire (perfect for ESP-01).
|
||||
#### If you need more pins [here](https://www.mischianti.org/2019/07/22/pcf8575-i2c-16-bit-digital-i-o-expander/) you can find the pcf8575 16bit version of the IC.
|
||||
|
||||
Tutorial:
|
||||
## Changelog
|
||||
- 01/02/2024: v2.3.7 Add the possibility to insert address at begin()
|
||||
- 10/07/2023: v2.3.6 Support for Arduino UNO R4
|
||||
- 08/02/2023: v2.3.5 Fix STM32 support and add support for Raspberry Pi Pico and other rp2040 boards
|
||||
- 10/08/2022: v2.3.4 Add support for custom SERCOM interface of Arduino SAMD devices. Force SDA SCL to use GPIO numeration for STM32 bug (https://www.mischianti.org/forums/topic/compatible-with-stm32duino/).
|
||||
- 28/07/2022: v2.3.3 Force SDA SCL to use GPIO numeration (https://www.mischianti.org/forums/topic/cannot-set-sda-clk-on-esp8266/).
|
||||
- 28/07/2022: v2.3.2 Fix the SDA SCL type #58 and add basic support for SAMD device.
|
||||
- 26/04/2022: v2.3.1 Fix example for esp32 and double begin issue #56.
|
||||
- 06/04/2022: v2.3.0 Fix package size
|
||||
- 30/12/2021: v2.2.4 Minor fix and remove deprecated declaration
|
||||
- 23/11/2020: v2.2.2 Add multiple implementation for encoder management (you can enable by uncomment relative define)
|
||||
|
||||
To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder PCF8574. Check that the PCF8574 folder contains `PCF8574\\.cpp` and `PCF8574.h`. Place the DHT library folder your `<arduinosketchfolder>/libraries/` folder. You may need to create the libraries subfolder if its your first library. Restart the IDE.
|
||||
I try to simplify the use of this IC, with a minimal set of operations.
|
||||
|
||||
# Reef complete PCF8574 PCF8574AP digital input and output expander with i2c bus.
|
||||
I try to simplify the use of this IC, with a minimal set of operation.
|
||||
Tested with esp8266, esp32, Arduino, Arduino SAMD (Nano 33 IoT, MKR etc.), STM32 and rp2040 (Raspberry Pi Pico and similar)
|
||||
|
||||
PCF8574P address map 0x20-0x27
|
||||
PCF8574AP address map 0x38-0x3f
|
||||
|
||||
Constructor:
|
||||
you must pas the address of i2c (to check the adress use this guide [I2cScanner](https://playground.arduino.cc/Main/I2cScanner))
|
||||
**Constructor:**
|
||||
Pass the address of I2C (to check the address use this guide [I2cScanner](https://playground.arduino.cc/Main/I2cScanner))
|
||||
```cpp
|
||||
PCF8574(uint8_t address);
|
||||
```
|
||||
for esp8266 if you want specify SDA e SCL pin use this:
|
||||
For ESP8266 if you want to specify SDA and SCL pins use this:
|
||||
|
||||
```cpp
|
||||
PCF8574(uint8_t address, uint8_t sda, uint8_t scl);
|
||||
@ -44,11 +53,11 @@ You must set input/output mode:
|
||||
pcf8574.pinMode(P2, INPUT);
|
||||
```
|
||||
|
||||
then IC as you can see in the image have 8 digital input/output:
|
||||
then IC as you can see in the image has 8 digital input/output ports:
|
||||
|
||||

|
||||
|
||||
So to read all analog input in one trasmission you can do (even if I use a 10millis debounce time to prevent too much read from i2c):
|
||||
To read all analog input in one trasmission you can do (even if I use a 10millis debounce time to prevent too much read from i2c):
|
||||
```cpp
|
||||
PCF8574::DigitalInput di = PCF8574.digitalReadAll();
|
||||
Serial.print(di.p0);
|
||||
@ -60,13 +69,13 @@ So to read all analog input in one trasmission you can do (even if I use a 10mi
|
||||
Serial.println(di.p3);
|
||||
```
|
||||
|
||||
To follow a request (you can see It on [issue #5](https://github.com/xreef/PCF8574_library/issues/5)) I create a define variable to work with low memori device, if you decomment this line on .h file of the library:
|
||||
To follow a request (you can see It on [issue #5](https://github.com/xreef/PCF8574_library/issues/5)) I create a define variable to work with low memory devices, if you uncomment this line in the .h file of the library:
|
||||
|
||||
```cpp
|
||||
// #define PCF8574_LOW_MEMORY
|
||||
```
|
||||
|
||||
Enable low memory props and gain about 7byte of memory, and you must use the method to read all like so:
|
||||
Enable low memory props and gain about 7 bytes of memory, and you must use the method to read all like so:
|
||||
|
||||
```cpp
|
||||
byte di = pcf8574.digitalReadAll();
|
||||
@ -74,7 +83,7 @@ Enable low memory props and gain about 7byte of memory, and you must use the met
|
||||
Serial.println(di, BIN);
|
||||
```
|
||||
|
||||
where di is a byte like 1110001, so you must do a bitwise operation to get the data, operation that I already do in the "normal" mode, here an example:
|
||||
where `di` is a byte like 1110001, so you must do a bitwise operation to get the data, operation that I already do in the "normal" mode. For example:
|
||||
|
||||
```cpp
|
||||
p0 = ((di & bit(0))>0)?HIGH:LOW;
|
||||
@ -88,13 +97,13 @@ where di is a byte like 1110001, so you must do a bitwise operation to get the d
|
||||
```
|
||||
|
||||
|
||||
if you want read a single input:
|
||||
if you want to read a single input:
|
||||
|
||||
```cpp
|
||||
int p1Digital = PCF8574.digitalRead(P1); // read P1
|
||||
```
|
||||
|
||||
If you want write a digital value you must do:
|
||||
If you want to write a digital value:
|
||||
```cpp
|
||||
PCF8574.digitalWrite(P1, HIGH);
|
||||
```
|
||||
@ -103,18 +112,18 @@ or:
|
||||
PCF8574.digitalWrite(P1, LOW);
|
||||
```
|
||||
|
||||
You can also use interrupt pin:
|
||||
You can also use an interrupt pin:
|
||||
You must initialize the pin and the function to call when interrupt raised from PCF8574
|
||||
```cpp
|
||||
// Function interrupt
|
||||
// Function interrupt
|
||||
void keyPressedOnPCF8574();
|
||||
|
||||
// Set i2c address
|
||||
PCF8574 pcf8574(0x39, ARDUINO_UNO_INTERRUPT_PIN, keyPressedOnPCF8574);
|
||||
```
|
||||
Remember you can't use Serial or Wire on interrupt function.
|
||||
Remember you can't use Serial or Wire on an interrupt function.
|
||||
|
||||
The better way is to set only a variable to read on loop:
|
||||
It's better to only set a variable to read on loop:
|
||||
```cpp
|
||||
void keyPressedOnPCF8574(){
|
||||
// Interrupt called (No Serial no read no wire in this function, and DEBUG disabled on PCF library)
|
||||
@ -123,5 +132,6 @@ void keyPressedOnPCF8574(){
|
||||
```
|
||||
|
||||
For the examples I use this wire schema on breadboard:
|
||||

|
||||

|
||||
|
||||
https://downloads.arduino.cc/libraries/logs/github.com/xreef/PCF8574_library/
|
||||
|
1171
doc/rtf/refman.rtf
@ -0,0 +1,37 @@
|
||||
/*
|
||||
KeyPressed on PIN1
|
||||
by Mischianti Renzo <http://www.mischianti.org>
|
||||
|
||||
https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "PCF8574.h"
|
||||
|
||||
TwoWire aWire(&sercom3, 20, 21);
|
||||
// Set i2c address
|
||||
PCF8574 pcf8574(&aWire, 0x38);
|
||||
|
||||
unsigned long timeElapsed;
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
delay(1000);
|
||||
|
||||
pcf8574.pinMode(P0, OUTPUT);
|
||||
pcf8574.pinMode(P1, INPUT);
|
||||
|
||||
Serial.print("Init pcf8574...");
|
||||
if (pcf8574.begin()){
|
||||
Serial.println("OK");
|
||||
}else{
|
||||
Serial.println("KO");
|
||||
}
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
uint8_t val = pcf8574.digitalRead(P1);
|
||||
if (val==HIGH) Serial.println("KEY PRESSED");
|
||||
delay(50);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* PCF8574 GPIO Port Expand
|
||||
* https://www.mischianti.org
|
||||
* https://www.mischianti.org/2020/03/13/pcf8574-i2c-digital-i-o-expander-rotary-encoder-part-2/
|
||||
*
|
||||
* PCF8574 ----- WeMos
|
||||
* A0 ----- GRD
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* PCF8574 GPIO Port Expand
|
||||
* https://www.mischianti.org
|
||||
* https://www.mischianti.org/2020/03/13/pcf8574-i2c-digital-i-o-expander-rotary-encoder-part-2/
|
||||
*
|
||||
* PCF8574 ----- WeMos
|
||||
* A0 ----- GRD
|
||||
|
@ -34,7 +34,7 @@ PCF8574 pcf8574(0x20);
|
||||
// Function interrupt
|
||||
bool keyPressed = false;
|
||||
|
||||
void keyPressedOnPCF8574(){
|
||||
void ICACHE_RAM_ATTR keyPressedOnPCF8574(){
|
||||
// Serial.println("keyPressedOnPCF8574");
|
||||
keyPressed = true;
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include "Arduino.h"
|
||||
/*
|
||||
* PCF8574 GPIO Port Expand
|
||||
* Blink all led
|
||||
@ -45,7 +44,7 @@ void setup()
|
||||
{
|
||||
Serial.begin(112560);
|
||||
|
||||
I2Cone.begin(16,17,400000); // SDA pin 16, SCL pin 17, 400kHz frequency
|
||||
I2Cone.begin(16,17,400000U); // SDA pin 16, SCL pin 17, 400kHz frequency
|
||||
delay(1000);
|
||||
|
||||
// Set pinMode to OUTPUT
|
||||
@ -53,12 +52,12 @@ void setup()
|
||||
pcf8574.pinMode(i, OUTPUT);
|
||||
}
|
||||
|
||||
Serial.print("Init pcf8574...");
|
||||
if (pcf8574.begin()){
|
||||
Serial.println("OK");
|
||||
}else{
|
||||
Serial.println("KO");
|
||||
}
|
||||
Serial.print("Init pcf8574...");
|
||||
if (pcf8574.begin()){
|
||||
Serial.println("OK");
|
||||
} else {
|
||||
Serial.println("KO");
|
||||
}
|
||||
}
|
||||
|
||||
void loop()
|
||||
|
@ -71,7 +71,7 @@ void loop()
|
||||
}
|
||||
|
||||
if (millis() - lastSendTime > interval) {
|
||||
Serial.print("WRITE VALUE FROM P4 TO P7 ");
|
||||
Serial.print("WRITE ALL VALUE FROM P4 TO P7 ");
|
||||
Serial.println(startVal);
|
||||
|
||||
// pcf8574.digitalWrite(P7, startVal);
|
||||
|
@ -23,6 +23,7 @@ readBuffer KEYWORD2
|
||||
digitalRead KEYWORD2
|
||||
digitalReadAll KEYWORD2
|
||||
digitalWrite KEYWORD2
|
||||
digitalWriteAll KEYWORD2
|
||||
|
||||
readEncoderValue KEYWORD2
|
||||
getLatency KEYWORD2
|
||||
|
21
library.json
@ -1,19 +1,24 @@
|
||||
{
|
||||
"name": "PCF8574 library",
|
||||
"keywords": "i2c, pcf8574, io, sensor",
|
||||
"description": "Use i2c digital expander with Arduino and ESP8266. Can read write digital values with only 2 wire (perfect for ESP-01).",
|
||||
"authors": [
|
||||
"version": "2.3.7",
|
||||
"keywords": "digital, i2c, encoder, expander, pcf8574, pcf8574a, esp32, esp8266, stm32, SAMD, Arduino, wire, rp2040, Raspberry",
|
||||
"description": "Most starred PCF8574 library. i2c digital expander for Arduino, Raspberry Pi Pico and rp2040 boards, esp32, SMT32 and ESP8266. Can read write digital values with only 2 wire. Very simple to use and encoder support.",
|
||||
"homepage": "https://www.mischianti.org/category/my-libraries/pcf8574/",
|
||||
"authors":
|
||||
[
|
||||
{
|
||||
"name": "Renzo Mischianti",
|
||||
"email": "renzo.mischianti@gmail.com",
|
||||
"maintainer": true
|
||||
"maintainer": true,
|
||||
"url": "https://www.mischianti.org"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/xreef/PCF8574_library.git"
|
||||
"url": "https://github.com/xreef/PCF8574_library"
|
||||
},
|
||||
"version": "2.2.1",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*"
|
||||
}
|
||||
"platforms": "*",
|
||||
"headers": ["PCF8574.h, PCF8574_library.h"]
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
name=PCF8574 library
|
||||
version=2.2.1
|
||||
version=2.3.7
|
||||
author=Renzo Mischianti <renzo.mischianti@gmail.com>
|
||||
maintainer=Renzo Mischianti <renzo.mischianti@gmail.com>
|
||||
sentence=Arduino/ESP8266 library for PCF8574
|
||||
paragraph=Use i2c digital expander with Arduino, esp32 and ESP8266. Can read write digital values with only 2 wire. Very simple and encoder support.
|
||||
category=Sensors
|
||||
sentence=Most starred PCF8574 library for Arduino (standard and SAMD), Raspberry Pi Pico and rp2040 boards, ESP8266, smt32 and esp32
|
||||
paragraph=Most starred PCF8574 library. i2c digital expander for Arduino (standard and SAMD), esp32, Raspberry Pi Pico and rp2040 boards, SMT32 and ESP8266. Can read write digital values with only 2 wire. Very simple to use and encoder support.
|
||||
category=Signal Input/Output
|
||||
url=https://www.mischianti.org/category/my-libraries/pcf8574/
|
||||
repository=https://github.com/xreef/PCF8574_library
|
||||
architectures=*
|
||||
|
@ -1,232 +0,0 @@
|
||||
(G-CODE GENERATED BY FLATCAM v8.991 - www.flatcam.org - Version Date: 2019/12/27)
|
||||
|
||||
(Name: 05-Countour_cnc)
|
||||
(Type: G-code from Geometry)
|
||||
(Units: MM)
|
||||
|
||||
(Created on Wednesday, 12 February 2020 at 10:16)
|
||||
|
||||
(TOOL DIAMETER: 2.0 mm)
|
||||
(Feedrate: 120.0 mm/min)
|
||||
(Feedrate_Z: 60.0 mm/min)
|
||||
(Feedrate rapids 1500.0 mm/min)
|
||||
|
||||
(Z_Cut: -1.8 mm)
|
||||
(DepthPerCut: 0.9 mm <=>2 passes)
|
||||
(Z_Move: 2.0 mm)
|
||||
(Z Toolchange: 15.0 mm)
|
||||
(X,Y Toolchange: 0.0000, 0.0000 mm)
|
||||
(Z Start: None mm)
|
||||
(Z End: 15.0 mm)
|
||||
(Steps per circle: 64)
|
||||
(Preprocessor Geometry: default)
|
||||
|
||||
(X range: -1.1000 ... 35.7456 mm)
|
||||
(Y range: -1.1000 ... 45.6770 mm)
|
||||
|
||||
(Spindle Speed: None RPM)
|
||||
G21
|
||||
G90
|
||||
G94
|
||||
|
||||
|
||||
|
||||
|
||||
G01 F120.00
|
||||
G00 Z2.0000
|
||||
|
||||
M03
|
||||
G00 X-1.1000 Y9.6942
|
||||
G01 F60.00
|
||||
G01 Z-0.9000
|
||||
G01 F120.00
|
||||
G01 X-1.1000 Y-0.0000
|
||||
G01 X-1.0948 Y-0.1079
|
||||
G01 X-1.0789 Y-0.2146
|
||||
G01 X-1.0527 Y-0.3194
|
||||
G01 X-1.0163 Y-0.4210
|
||||
G01 X-0.9702 Y-0.5186
|
||||
G01 X-0.9147 Y-0.6112
|
||||
G01 X-0.8504 Y-0.6979
|
||||
G01 X-0.7779 Y-0.7779
|
||||
G01 X-0.6979 Y-0.8504
|
||||
G01 X-0.6112 Y-0.9147
|
||||
G01 X-0.5186 Y-0.9702
|
||||
G01 X-0.4210 Y-1.0163
|
||||
G01 X-0.3194 Y-1.0527
|
||||
G01 X-0.2146 Y-1.0789
|
||||
G01 X-0.1079 Y-1.0948
|
||||
G01 X-0.0000 Y-1.1000
|
||||
G01 X34.6456 Y-1.1000
|
||||
G00 X34.6456 Y-1.1000
|
||||
G01 F60.00
|
||||
G01 Z-1.8000
|
||||
G01 F120.00
|
||||
G01 X-0.0000 Y-1.1000
|
||||
G01 X-0.1079 Y-1.0948
|
||||
G01 X-0.2146 Y-1.0789
|
||||
G01 X-0.3194 Y-1.0527
|
||||
G01 X-0.4210 Y-1.0163
|
||||
G01 X-0.5186 Y-0.9702
|
||||
G01 X-0.6112 Y-0.9147
|
||||
G01 X-0.6979 Y-0.8504
|
||||
G01 X-0.7779 Y-0.7779
|
||||
G01 X-0.8504 Y-0.6979
|
||||
G01 X-0.9147 Y-0.6112
|
||||
G01 X-0.9702 Y-0.5186
|
||||
G01 X-1.0163 Y-0.4210
|
||||
G01 X-1.0527 Y-0.3194
|
||||
G01 X-1.0789 Y-0.2146
|
||||
G01 X-1.0948 Y-0.1079
|
||||
G01 X-1.1000 Y-0.0000
|
||||
G01 X-1.1000 Y9.6942
|
||||
G00 Z2.0000
|
||||
G00 X-1.1000 Y12.6942
|
||||
G01 F60.00
|
||||
G01 Z-0.9000
|
||||
G01 F120.00
|
||||
G01 X-1.1000 Y32.0828
|
||||
G00 X-1.1000 Y32.0828
|
||||
G01 F60.00
|
||||
G01 Z-1.8000
|
||||
G01 F120.00
|
||||
G01 X-1.1000 Y12.6942
|
||||
G00 Z2.0000
|
||||
G00 X-1.1000 Y35.0828
|
||||
G01 F60.00
|
||||
G01 Z-0.9000
|
||||
G01 F120.00
|
||||
G01 X-1.1000 Y44.5770
|
||||
G01 X-1.0948 Y44.6849
|
||||
G01 X-1.0789 Y44.7916
|
||||
G01 X-1.0527 Y44.8964
|
||||
G01 X-1.0163 Y44.9980
|
||||
G01 X-0.9702 Y45.0956
|
||||
G01 X-0.9147 Y45.1882
|
||||
G01 X-0.8504 Y45.2749
|
||||
G01 X-0.7779 Y45.3549
|
||||
G01 X-0.6979 Y45.4274
|
||||
G01 X-0.6112 Y45.4917
|
||||
G01 X-0.5186 Y45.5472
|
||||
G01 X-0.4210 Y45.5933
|
||||
G01 X-0.3194 Y45.6297
|
||||
G01 X-0.2146 Y45.6559
|
||||
G01 X-0.1079 Y45.6718
|
||||
G01 X-0.0000 Y45.6770
|
||||
G01 X34.6456 Y45.6770
|
||||
G01 X34.7535 Y45.6718
|
||||
G01 X34.8602 Y45.6559
|
||||
G01 X34.9650 Y45.6297
|
||||
G01 X35.0666 Y45.5933
|
||||
G01 X35.1642 Y45.5472
|
||||
G01 X35.2568 Y45.4917
|
||||
G01 X35.3435 Y45.4274
|
||||
G01 X35.4235 Y45.3549
|
||||
G01 X35.4960 Y45.2749
|
||||
G01 X35.5603 Y45.1882
|
||||
G01 X35.6158 Y45.0956
|
||||
G01 X35.6619 Y44.9980
|
||||
G01 X35.6983 Y44.8964
|
||||
G01 X35.7245 Y44.7916
|
||||
G01 X35.7404 Y44.6849
|
||||
G01 X35.7456 Y44.5770
|
||||
G01 X35.7456 Y35.0828
|
||||
G00 X35.7456 Y35.0828
|
||||
G01 F60.00
|
||||
G01 Z-1.8000
|
||||
G01 F120.00
|
||||
G01 X35.7456 Y44.5770
|
||||
G01 X35.7404 Y44.6849
|
||||
G01 X35.7245 Y44.7916
|
||||
G01 X35.6983 Y44.8964
|
||||
G01 X35.6619 Y44.9980
|
||||
G01 X35.6158 Y45.0956
|
||||
G01 X35.5603 Y45.1882
|
||||
G01 X35.4960 Y45.2749
|
||||
G01 X35.4235 Y45.3549
|
||||
G01 X35.3435 Y45.4274
|
||||
G01 X35.2568 Y45.4917
|
||||
G01 X35.1642 Y45.5472
|
||||
G01 X35.0666 Y45.5933
|
||||
G01 X34.9650 Y45.6297
|
||||
G01 X34.8602 Y45.6559
|
||||
G01 X34.7535 Y45.6718
|
||||
G01 X34.6456 Y45.6770
|
||||
G01 X-0.0000 Y45.6770
|
||||
G01 X-0.1079 Y45.6718
|
||||
G01 X-0.2146 Y45.6559
|
||||
G01 X-0.3194 Y45.6297
|
||||
G01 X-0.4210 Y45.5933
|
||||
G01 X-0.5186 Y45.5472
|
||||
G01 X-0.6112 Y45.4917
|
||||
G01 X-0.6979 Y45.4274
|
||||
G01 X-0.7779 Y45.3549
|
||||
G01 X-0.8504 Y45.2749
|
||||
G01 X-0.9147 Y45.1882
|
||||
G01 X-0.9702 Y45.0956
|
||||
G01 X-1.0163 Y44.9980
|
||||
G01 X-1.0527 Y44.8964
|
||||
G01 X-1.0789 Y44.7916
|
||||
G01 X-1.0948 Y44.6849
|
||||
G01 X-1.1000 Y44.5770
|
||||
G01 X-1.1000 Y35.0828
|
||||
G00 Z2.0000
|
||||
G00 X35.7456 Y32.0828
|
||||
G01 F60.00
|
||||
G01 Z-0.9000
|
||||
G01 F120.00
|
||||
G01 X35.7456 Y12.6942
|
||||
G00 X35.7456 Y12.6942
|
||||
G01 F60.00
|
||||
G01 Z-1.8000
|
||||
G01 F120.00
|
||||
G01 X35.7456 Y32.0828
|
||||
G00 Z2.0000
|
||||
G00 X35.7456 Y9.6942
|
||||
G01 F60.00
|
||||
G01 Z-0.9000
|
||||
G01 F120.00
|
||||
G01 X35.7456 Y-0.0000
|
||||
G01 X35.7404 Y-0.1079
|
||||
G01 X35.7245 Y-0.2146
|
||||
G01 X35.6983 Y-0.3194
|
||||
G01 X35.6619 Y-0.4210
|
||||
G01 X35.6158 Y-0.5186
|
||||
G01 X35.5603 Y-0.6112
|
||||
G01 X35.4960 Y-0.6979
|
||||
G01 X35.4235 Y-0.7779
|
||||
G01 X35.3435 Y-0.8504
|
||||
G01 X35.2568 Y-0.9147
|
||||
G01 X35.1642 Y-0.9702
|
||||
G01 X35.0666 Y-1.0163
|
||||
G01 X34.9650 Y-1.0527
|
||||
G01 X34.8602 Y-1.0789
|
||||
G01 X34.7535 Y-1.0948
|
||||
G01 X34.6456 Y-1.1000
|
||||
G00 X34.6456 Y-1.1000
|
||||
G01 F60.00
|
||||
G01 Z-1.8000
|
||||
G01 F120.00
|
||||
G01 X34.7535 Y-1.0948
|
||||
G01 X34.8602 Y-1.0789
|
||||
G01 X34.9650 Y-1.0527
|
||||
G01 X35.0666 Y-1.0163
|
||||
G01 X35.1642 Y-0.9702
|
||||
G01 X35.2568 Y-0.9147
|
||||
G01 X35.3435 Y-0.8504
|
||||
G01 X35.4235 Y-0.7779
|
||||
G01 X35.4960 Y-0.6979
|
||||
G01 X35.5603 Y-0.6112
|
||||
G01 X35.6158 Y-0.5186
|
||||
G01 X35.6619 Y-0.4210
|
||||
G01 X35.6983 Y-0.3194
|
||||
G01 X35.7245 Y-0.2146
|
||||
G01 X35.7404 Y-0.1079
|
||||
G01 X35.7456 Y-0.0000
|
||||
G01 X35.7456 Y9.6942
|
||||
G00 Z2.0000
|
||||
M05
|
||||
G00 Z2.0000
|
||||
G00 Z15.00
|
||||
G00 X0.0 Y0.0
|
||||
|
@ -1,173 +0,0 @@
|
||||
-1.6 37 11
|
||||
-1.6 47 14
|
||||
-2 0.6 2
|
||||
|
||||
|
||||
-1.6 -1.6 -0.045
|
||||
2.26 -1.6 0.055
|
||||
6.12 -1.6 0.151
|
||||
9.98 -1.6 0.307
|
||||
13.84 -1.6 -0.06
|
||||
17.7 -1.6 0.02
|
||||
21.56 -1.6 0.03
|
||||
25.42 -1.6 0.035
|
||||
29.28 -1.6 0.106
|
||||
33.14 -1.6 0.176
|
||||
37 -1.6 0.226
|
||||
|
||||
-1.6 2.13846 -0.176
|
||||
2.26 2.13846 -0.176
|
||||
6.12 2.13846 -0.146
|
||||
9.98 2.13846 -0.111
|
||||
13.84 2.13846 -0.065
|
||||
17.7 2.13846 -0.035
|
||||
21.56 2.13846 -0.03
|
||||
25.42 2.13846 0
|
||||
29.28 2.13846 0.055
|
||||
33.14 2.13846 0.131
|
||||
37 2.13846 0.196
|
||||
|
||||
-1.6 5.87692 -0.211
|
||||
2.26 5.87692 -0.201
|
||||
6.12 5.87692 -0.146
|
||||
9.98 5.87692 -0.151
|
||||
13.84 5.87692 -0.055
|
||||
17.7 5.87692 0.02
|
||||
21.56 5.87692 0.09
|
||||
25.42 5.87692 0.181
|
||||
29.28 5.87692 0.276
|
||||
33.14 5.87692 0.367
|
||||
37 5.87692 0.447
|
||||
|
||||
-1.6 9.61538 -0.231
|
||||
2.26 9.61538 -0.191
|
||||
6.12 9.61538 -0.171
|
||||
9.98 9.61538 -0.191
|
||||
13.84 9.61538 -0.176
|
||||
17.7 9.61538 -0.095
|
||||
21.56 9.61538 -0.181
|
||||
25.42 9.61538 -0.186
|
||||
29.28 9.61538 -0.176
|
||||
33.14 9.61538 -0.131
|
||||
37 9.61538 -0.085
|
||||
|
||||
-1.6 13.3538 -0.246
|
||||
2.26 13.3538 -0.266
|
||||
6.12 13.3538 -0.206
|
||||
9.98 13.3538 -0.221
|
||||
13.84 13.3538 -0.166
|
||||
17.7 13.3538 -0.09
|
||||
21.56 13.3538 -0.025
|
||||
25.42 13.3538 0.035
|
||||
29.28 13.3538 0.121
|
||||
33.14 13.3538 0.216
|
||||
37 13.3538 0.301
|
||||
|
||||
-1.6 17.0923 -0.246
|
||||
2.26 17.0923 -0.226
|
||||
6.12 17.0923 -0.231
|
||||
9.98 17.0923 -0.231
|
||||
13.84 17.0923 -0.181
|
||||
17.7 17.0923 -0.116
|
||||
21.56 17.0923 -0.04
|
||||
25.42 17.0923 0.04
|
||||
29.28 17.0923 0.121
|
||||
33.14 17.0923 0.216
|
||||
37 17.0923 0.291
|
||||
|
||||
-1.6 20.8308 -0.256
|
||||
2.26 20.8308 -0.226
|
||||
6.12 20.8308 -0.256
|
||||
9.98 20.8308 -0.241
|
||||
13.84 20.8308 -0.236
|
||||
17.7 20.8308 -0.261
|
||||
21.56 20.8308 -0.191
|
||||
25.42 20.8308 -0.161
|
||||
29.28 20.8308 -0.171
|
||||
33.14 20.8308 -0.121
|
||||
37 20.8308 -0.07
|
||||
|
||||
-1.6 24.5692 -0.261
|
||||
2.26 24.5692 -0.266
|
||||
6.12 24.5692 -0.251
|
||||
9.98 24.5692 -0.256
|
||||
13.84 24.5692 -0.246
|
||||
17.7 24.5692 -0.266
|
||||
21.56 24.5692 -0.271
|
||||
25.42 24.5692 -0.266
|
||||
29.28 24.5692 -0.196
|
||||
33.14 24.5692 -0.136
|
||||
37 24.5692 -0.09
|
||||
|
||||
-1.6 28.3077 -0.246
|
||||
2.26 28.3077 -0.251
|
||||
6.12 28.3077 -0.281
|
||||
9.98 28.3077 -0.271
|
||||
13.84 28.3077 -0.261
|
||||
17.7 28.3077 -0.286
|
||||
21.56 28.3077 -0.226
|
||||
25.42 28.3077 -0.196
|
||||
29.28 28.3077 -0.206
|
||||
33.14 28.3077 -0.151
|
||||
37 28.3077 -0.095
|
||||
|
||||
-1.6 32.0462 -0.261
|
||||
2.26 32.0462 -0.256
|
||||
6.12 32.0462 -0.261
|
||||
9.98 32.0462 -0.271
|
||||
13.84 32.0462 -0.261
|
||||
17.7 32.0462 -0.256
|
||||
21.56 32.0462 -0.281
|
||||
25.42 32.0462 -0.271
|
||||
29.28 32.0462 -0.221
|
||||
33.14 32.0462 -0.156
|
||||
37 32.0462 -0.106
|
||||
|
||||
-1.6 35.7846 -0.256
|
||||
2.26 35.7846 -0.261
|
||||
6.12 35.7846 -0.296
|
||||
9.98 35.7846 -0.276
|
||||
13.84 35.7846 -0.281
|
||||
17.7 35.7846 -0.302
|
||||
21.56 35.7846 -0.246
|
||||
25.42 35.7846 -0.216
|
||||
29.28 35.7846 -0.231
|
||||
33.14 35.7846 -0.166
|
||||
37 35.7846 -0.121
|
||||
|
||||
-1.6 39.5231 -0.256
|
||||
2.26 39.5231 -0.256
|
||||
6.12 39.5231 -0.251
|
||||
9.98 39.5231 -0.256
|
||||
13.84 39.5231 -0.256
|
||||
17.7 39.5231 -0.251
|
||||
21.56 39.5231 -0.286
|
||||
25.42 39.5231 -0.276
|
||||
29.28 39.5231 -0.211
|
||||
33.14 39.5231 -0.161
|
||||
37 39.5231 -0.111
|
||||
|
||||
-1.6 43.2615 -0.251
|
||||
2.26 43.2615 -0.236
|
||||
6.12 43.2615 -0.276
|
||||
9.98 43.2615 -0.261
|
||||
13.84 43.2615 -0.256
|
||||
17.7 43.2615 -0.281
|
||||
21.56 43.2615 -0.231
|
||||
25.42 43.2615 -0.196
|
||||
29.28 43.2615 -0.216
|
||||
33.14 43.2615 -0.151
|
||||
37 43.2615 -0.106
|
||||
|
||||
-1.6 47 -0.251
|
||||
2.26 47 -0.251
|
||||
6.12 47 -0.246
|
||||
9.98 47 -0.256
|
||||
13.84 47 -0.226
|
||||
17.7 47 -0.256
|
||||
21.56 47 -0.286
|
||||
25.42 47 -0.276
|
||||
29.28 47 -0.216
|
||||
33.14 47 -0.156
|
||||
37 47 -0.116
|
||||
|
@ -1,201 +0,0 @@
|
||||
(G-CODE GENERATED BY FLATCAM v8.991 - www.flatcam.org - Version Date: 2019/12/27)
|
||||
|
||||
(Name: 06-Drill_08_Bit.txt_cnc)
|
||||
(Type: G-code from Excellon)
|
||||
(Units: MM)
|
||||
|
||||
(Created on Wednesday, 12 February 2020 at 10:47)
|
||||
|
||||
(Feedrate: 300.0 mm/min)
|
||||
(Feedrate rapids 1500.0 mm/min)
|
||||
|
||||
(Z_Cut: -1.9 mm)
|
||||
(Z_Move: 2.0 mm)
|
||||
(Z Toolchange: 15.0 mm)
|
||||
(X,Y Toolchange: 0.0000, 0.0000 mm)
|
||||
(Z Start: None mm)
|
||||
(Z End: 0.5 mm)
|
||||
(Steps per circle: 64)
|
||||
(Preprocessor Excellon: default)
|
||||
|
||||
(X range: 3.2766 ... 32.1056 mm)
|
||||
(Y range: 7.6175 ... 38.9865 mm)
|
||||
|
||||
(Spindle Speed: None RPM)
|
||||
G21
|
||||
G90
|
||||
G94
|
||||
|
||||
|
||||
|
||||
|
||||
G01 F300.00
|
||||
G00 Z2.0000
|
||||
|
||||
M03
|
||||
G00 X8.8011 Y30.9220
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X8.8011 Y18.2220
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
M03
|
||||
G00 X31.6611 Y33.4620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X29.1211 Y33.4620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X26.5811 Y33.4620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X26.5811 Y25.8420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X29.1211 Y25.8420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X31.6611 Y25.8420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
M03
|
||||
G00 X21.5011 Y36.0020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X18.9611 Y33.4620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X11.3411 Y36.0020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X3.7211 Y38.5420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X8.8011 Y33.4620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X8.8011 Y30.9220
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X3.7211 Y28.3820
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X3.7211 Y18.2220
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X6.2611 Y18.2220
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X8.8011 Y18.2220
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X13.8811 Y28.3820
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X13.8811 Y25.8420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X13.8811 Y23.3020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X13.8811 Y20.7620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X13.8811 Y18.2220
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X13.8811 Y15.6820
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X13.8811 Y13.1420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X13.8811 Y10.6020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X3.7211 Y8.0620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X6.2611 Y8.0620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X13.8811 Y8.0620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X21.5011 Y8.0620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X24.0411 Y8.0620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X31.6611 Y8.0620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X21.5011 Y10.6020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X21.5011 Y13.1420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X21.5011 Y15.6820
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X21.5011 Y18.2220
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X21.5011 Y20.7620
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X21.5011 Y23.3020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X21.5011 Y25.8420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X21.5011 Y28.3820
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
M05
|
||||
G00 Z0.50
|
||||
G00 X0.0 Y0.0
|
||||
|
@ -1,91 +0,0 @@
|
||||
(G-CODE GENERATED BY FLATCAM v8.991 - www.flatcam.org - Version Date: 2019/12/27)
|
||||
|
||||
(Name: 07-Drill_09_Bit.txt_cnc)
|
||||
(Type: G-code from Excellon)
|
||||
(Units: MM)
|
||||
|
||||
(Created on Wednesday, 12 February 2020 at 10:48)
|
||||
|
||||
(Feedrate: 300.0 mm/min)
|
||||
(Feedrate rapids 1500.0 mm/min)
|
||||
|
||||
(Z_Cut: -1.9 mm)
|
||||
(Z_Move: 2.0 mm)
|
||||
(Z Toolchange: 15.0 mm)
|
||||
(X,Y Toolchange: 0.0000, 0.0000 mm)
|
||||
(Z Start: None mm)
|
||||
(Z End: 0.5 mm)
|
||||
(Steps per circle: 64)
|
||||
(Preprocessor Excellon: default)
|
||||
|
||||
(X range: 3.2766 ... 32.1056 mm)
|
||||
(Y range: 7.6175 ... 38.9865 mm)
|
||||
|
||||
(Spindle Speed: None RPM)
|
||||
G21
|
||||
G90
|
||||
G94
|
||||
|
||||
|
||||
|
||||
|
||||
G01 F300.00
|
||||
G00 Z2.0000
|
||||
|
||||
M03
|
||||
G00 X29.1211 Y18.2220
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X29.1211 Y15.6820
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X29.1211 Y13.1420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X29.1211 Y10.6020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X11.3411 Y10.6020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X11.3411 Y13.1420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X11.3411 Y15.6820
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X11.3411 Y18.2220
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X6.2611 Y23.3020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X6.2611 Y25.8420
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X6.2611 Y28.3820
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X6.2611 Y36.0020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
G00 X8.8011 Y36.0020
|
||||
G01 Z-1.9000
|
||||
G01 Z0
|
||||
G00 Z2.0000
|
||||
M05
|
||||
G00 Z0.50
|
||||
G00 X0.0 Y0.0
|
||||
|
@ -1,173 +0,0 @@
|
||||
-1.3 36 11
|
||||
-1.3 46 14
|
||||
-2 0.6 2
|
||||
|
||||
|
||||
-1.3 -1.3 0.005
|
||||
2.43 -1.3 0
|
||||
6.16 -1.3 0
|
||||
9.89 -1.3 0.015
|
||||
13.62 -1.3 0.035
|
||||
17.35 -1.3 0.04
|
||||
21.08 -1.3 0.04
|
||||
24.81 -1.3 0.035
|
||||
28.54 -1.3 0.025
|
||||
32.27 -1.3 0.035
|
||||
36 -1.3 0.03
|
||||
|
||||
-1.3 2.33846 -0.005
|
||||
2.43 2.33846 -0.015
|
||||
6.16 2.33846 -0.01
|
||||
9.89 2.33846 -0.005
|
||||
13.62 2.33846 0
|
||||
17.35 2.33846 0.01
|
||||
21.08 2.33846 0.01
|
||||
24.81 2.33846 0.02
|
||||
28.54 2.33846 0.005
|
||||
32.27 2.33846 0
|
||||
36 2.33846 0
|
||||
|
||||
-1.3 5.97692 -0.025
|
||||
2.43 5.97692 -0.035
|
||||
6.16 5.97692 -0.04
|
||||
9.89 5.97692 -0.03
|
||||
13.62 5.97692 -0.025
|
||||
17.35 5.97692 -0.025
|
||||
21.08 5.97692 -0.025
|
||||
24.81 5.97692 -0.04
|
||||
28.54 5.97692 -0.04
|
||||
32.27 5.97692 -0.05
|
||||
36 5.97692 -0.05
|
||||
|
||||
-1.3 9.61538 -0.05
|
||||
2.43 9.61538 -0.055
|
||||
6.16 9.61538 -0.055
|
||||
9.89 9.61538 -0.055
|
||||
13.62 9.61538 -0.05
|
||||
17.35 9.61538 -0.05
|
||||
21.08 9.61538 -0.05
|
||||
24.81 9.61538 -0.055
|
||||
28.54 9.61538 -0.065
|
||||
32.27 9.61538 -0.07
|
||||
36 9.61538 -0.08
|
||||
|
||||
-1.3 13.2538 -0.06
|
||||
2.43 13.2538 -0.07
|
||||
6.16 13.2538 -0.07
|
||||
9.89 13.2538 -0.065
|
||||
13.62 13.2538 -0.075
|
||||
17.35 13.2538 -0.075
|
||||
21.08 13.2538 -0.075
|
||||
24.81 13.2538 -0.091
|
||||
28.54 13.2538 -0.091
|
||||
32.27 13.2538 -0.101
|
||||
36 13.2538 -0.106
|
||||
|
||||
-1.3 16.8923 -0.08
|
||||
2.43 16.8923 -0.08
|
||||
6.16 16.8923 -0.08
|
||||
9.89 16.8923 -0.086
|
||||
13.62 16.8923 -0.091
|
||||
17.35 16.8923 -0.101
|
||||
21.08 16.8923 -0.101
|
||||
24.81 16.8923 -0.101
|
||||
28.54 16.8923 -0.106
|
||||
32.27 16.8923 -0.111
|
||||
36 16.8923 -0.121
|
||||
|
||||
-1.3 20.5308 -0.075
|
||||
2.43 20.5308 -0.086
|
||||
6.16 20.5308 -0.091
|
||||
9.89 20.5308 -0.096
|
||||
13.62 20.5308 -0.101
|
||||
17.35 20.5308 -0.111
|
||||
21.08 20.5308 -0.116
|
||||
24.81 20.5308 -0.116
|
||||
28.54 20.5308 -0.126
|
||||
32.27 20.5308 -0.131
|
||||
36 20.5308 -0.136
|
||||
|
||||
-1.3 24.1692 -0.065
|
||||
2.43 24.1692 -0.075
|
||||
6.16 24.1692 -0.091
|
||||
9.89 24.1692 -0.091
|
||||
13.62 24.1692 -0.106
|
||||
17.35 24.1692 -0.111
|
||||
21.08 24.1692 -0.121
|
||||
24.81 24.1692 -0.121
|
||||
28.54 24.1692 -0.121
|
||||
32.27 24.1692 -0.131
|
||||
36 24.1692 -0.136
|
||||
|
||||
-1.3 27.8077 -0.065
|
||||
2.43 27.8077 -0.075
|
||||
6.16 27.8077 -0.091
|
||||
9.89 27.8077 -0.106
|
||||
13.62 27.8077 -0.116
|
||||
17.35 27.8077 -0.121
|
||||
21.08 27.8077 -0.126
|
||||
24.81 27.8077 -0.131
|
||||
28.54 27.8077 -0.141
|
||||
32.27 27.8077 -0.141
|
||||
36 27.8077 -0.141
|
||||
|
||||
-1.3 31.4462 -0.055
|
||||
2.43 31.4462 -0.07
|
||||
6.16 31.4462 -0.086
|
||||
9.89 31.4462 -0.101
|
||||
13.62 31.4462 -0.116
|
||||
17.35 31.4462 -0.116
|
||||
21.08 31.4462 -0.126
|
||||
24.81 31.4462 -0.126
|
||||
28.54 31.4462 -0.136
|
||||
32.27 31.4462 -0.136
|
||||
36 31.4462 -0.146
|
||||
|
||||
-1.3 35.0846 -0.05
|
||||
2.43 35.0846 -0.065
|
||||
6.16 35.0846 -0.086
|
||||
9.89 35.0846 -0.096
|
||||
13.62 35.0846 -0.106
|
||||
17.35 35.0846 -0.116
|
||||
21.08 35.0846 -0.131
|
||||
24.81 35.0846 -0.131
|
||||
28.54 35.0846 -0.146
|
||||
32.27 35.0846 -0.141
|
||||
36 35.0846 -0.146
|
||||
|
||||
-1.3 38.7231 -0.055
|
||||
2.43 38.7231 -0.065
|
||||
6.16 38.7231 -0.086
|
||||
9.89 38.7231 -0.091
|
||||
13.62 38.7231 -0.106
|
||||
17.35 38.7231 -0.116
|
||||
21.08 38.7231 -0.131
|
||||
24.81 38.7231 -0.131
|
||||
28.54 38.7231 -0.141
|
||||
32.27 38.7231 -0.146
|
||||
36 38.7231 -0.156
|
||||
|
||||
-1.3 42.3615 -0.06
|
||||
2.43 42.3615 -0.075
|
||||
6.16 42.3615 -0.091
|
||||
9.89 42.3615 -0.111
|
||||
13.62 42.3615 -0.121
|
||||
17.35 42.3615 -0.131
|
||||
21.08 42.3615 -0.146
|
||||
24.81 42.3615 -0.151
|
||||
28.54 42.3615 -0.171
|
||||
32.27 42.3615 -0.176
|
||||
36 42.3615 -0.176
|
||||
|
||||
-1.3 46 -0.065
|
||||
2.43 46 -0.086
|
||||
6.16 46 -0.096
|
||||
9.89 46 -0.106
|
||||
13.62 46 -0.126
|
||||
17.35 46 -0.136
|
||||
21.08 46 -0.146
|
||||
24.81 46 -0.151
|
||||
28.54 46 -0.171
|
||||
32.27 46 -0.176
|
||||
36 46 -0.176
|
||||
|
@ -1,26 +0,0 @@
|
||||
G04 MADE WITH FRITZING*
|
||||
G04 WWW.FRITZING.ORG*
|
||||
G04 DOUBLE SIDED*
|
||||
G04 HOLES PLATED*
|
||||
G04 CONTOUR ON CENTER OF CONTOUR VECTOR*
|
||||
%ASAXBY*%
|
||||
%FSLAX23Y23*%
|
||||
%MOIN*%
|
||||
%OFA0B0*%
|
||||
%SFA1.0B1.0*%
|
||||
%ADD10R,1.364290X1.755230*%
|
||||
%ADD11C,0.008000*%
|
||||
%ADD10C,0.008*%
|
||||
%LNCONTOUR*%
|
||||
G90*
|
||||
G70*
|
||||
G54D10*
|
||||
G54D11*
|
||||
X4Y1751D02*
|
||||
X1360Y1751D01*
|
||||
X1360Y4D01*
|
||||
X4Y4D01*
|
||||
X4Y1751D01*
|
||||
D02*
|
||||
G04 End of contour*
|
||||
M02*
|
@ -1,68 +0,0 @@
|
||||
; NON-PLATED HOLES START AT T1
|
||||
; THROUGH (PLATED) HOLES START AT T100
|
||||
M48
|
||||
INCH
|
||||
T100C0.032000
|
||||
T101C0.035000
|
||||
T102C0.038000
|
||||
T103C0.031496
|
||||
%
|
||||
T100
|
||||
X001175Y013174
|
||||
X003175Y013174
|
||||
X002175Y010174
|
||||
X001175Y010174
|
||||
X003175Y010174
|
||||
X002175Y013174
|
||||
T101
|
||||
X005175Y014174
|
||||
X012175Y011174
|
||||
X005175Y007174
|
||||
X001175Y003174
|
||||
X010175Y012174
|
||||
X011175Y003174
|
||||
X012175Y015174
|
||||
X005175Y006174
|
||||
X005175Y010174
|
||||
X012175Y003174
|
||||
X008175Y004174
|
||||
X008175Y005174
|
||||
X005175Y009174
|
||||
X008175Y003174
|
||||
X008175Y009174
|
||||
X005175Y011174
|
||||
X005175Y005174
|
||||
X004175Y003174
|
||||
X008175Y011174
|
||||
X010175Y007174
|
||||
X011175Y007174
|
||||
X008175Y010174
|
||||
X012175Y007174
|
||||
X005175Y004174
|
||||
X008175Y008174
|
||||
X008175Y007174
|
||||
X010175Y013174
|
||||
X005175Y003174
|
||||
X008175Y006174
|
||||
X006175Y013174
|
||||
X009175Y014174
|
||||
X005175Y008174
|
||||
T102
|
||||
X002175Y007174
|
||||
X009175Y004174
|
||||
X011175Y011174
|
||||
X002175Y006174
|
||||
X010175Y014174
|
||||
X002175Y005174
|
||||
X009175Y006174
|
||||
X009175Y005174
|
||||
X009175Y007174
|
||||
X011175Y014174
|
||||
X011175Y010174
|
||||
X002175Y004174
|
||||
X011175Y009174
|
||||
T103
|
||||
X010175Y012174
|
||||
X010175Y007174
|
||||
T00
|
||||
M30
|
@ -1,41 +0,0 @@
|
||||
*Pick And Place List
|
||||
*Company=
|
||||
*Author=
|
||||
*eMail=
|
||||
*
|
||||
*Project=PCB_PCF8574_03
|
||||
*Date=12:19:36
|
||||
*CreatedBy=Fritzing 0.9.3b.04.19.5c895d327c44a3114e5fcc9d8260daf0cbb52806
|
||||
*
|
||||
*
|
||||
*Coordinates in mm, always center of component
|
||||
*Origin 0/0=Lower left corner of PCB
|
||||
*Rotation in degree (0-360, math. pos.)
|
||||
*
|
||||
*No;Value;Package;X;Y;Rotation;Side;Name
|
||||
1;;;16.7355;-3.11022;0;Bottom;TXT2
|
||||
2;;;15.9562;-41.2003;0;Bottom;TXT1
|
||||
3;;;25.8453;-24.5735;0;Bottom;Jumper1
|
||||
4;;THT;23.3053;-14.4135;180;Bottom;P4-P7
|
||||
5;;;25.8454;-30.9235;0;Bottom;Via2
|
||||
6;;;5.11652;-39.8462;0;Bottom;IMG1
|
||||
7;;;26.9445;-41.3844;0;Bottom;TXT1
|
||||
8;;THT;27.1153;-36.0035;-90;Bottom;Power G V
|
||||
9;;THT;5.52535;-14.4135;180;Bottom;P0-P3
|
||||
10;;;5.10104;-39.9375;0;Bottom;IMG1
|
||||
11;;THT;28.3853;-25.8435;180;Bottom;INT SDA SCL
|
||||
12;;;25.8454;-18.2234;0;Bottom;Via1
|
||||
13;10k;THT;30.9253;-13.1435;90;Bottom;Pull-up SDA
|
||||
14;10k;THT;6.79535;-8.06354;0;Bottom;Pull-down res A2
|
||||
15;;;16.7223;-2.49358;0;Bottom;TXT2
|
||||
16;10k;THT;28.3853;-13.1435;90;Bottom;Pull-up int
|
||||
17;10k;THT;20.7653;-33.4635;0;Bottom;Pull-down res A1
|
||||
18;;;32.8912;-25.6638;0;Bottom;TXT3
|
||||
19;;;16.9553;-8.06354;0;Bottom;Jumper2
|
||||
20;;dipswitch-02;6.79535;-29.6535;0;Bottom;SW2
|
||||
21;;DIP16 [THT];16.9553;-19.4935;0;Bottom;U1
|
||||
22;;;28.3641;-31.0931;0;Bottom;TXT3
|
||||
23;;;32.7887;-22.7954;0;Bottom;TXT3
|
||||
24;;dipswitch-02;4.25535;-29.6535;0;Bottom;Adress i2c
|
||||
25;10k;THT;30.9253;-33.4635;-90;Bottom;Pull-upp SCL
|
||||
26;10k;THT;18.2253;-36.0035;0;Bottom;Pull-down res A0
|
BIN
resources/PCB/PCB.zip
Normal file
BIN
resources/PCB/PCB2.zip
Normal file
BIN
resources/PCB/PCB3.zip
Normal file
BIN
resources/PCB/PCBSimple.zip
Normal file
Before Width: | Height: | Size: 326 KiB After Width: | Height: | Size: 292 KiB |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 384 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 497 KiB After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 377 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 535 KiB After Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 933 KiB After Width: | Height: | Size: 189 KiB |
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 396 KiB |