Closed SphaeroX closed 7 months ago
Helllo i buyed the MKS TinyBee for an Project and now im not able to Set the Output of some pins.
Here is what im try to do:
// IOExpander.h #ifndef IO_EXPANDER_H #define IO_EXPANDER_H #define DATA_PIN 25 #define LATCH_PIN 26 #define CLOCK_PIN 27 void setupIOExpander() { pinMode(DATA_PIN, OUTPUT); pinMode(LATCH_PIN, OUTPUT); pinMode(CLOCK_PIN, OUTPUT); } void test() { byte patternHigh = 0b11111111; byte patternLow = 0b00000000; Serial.println("HIGH"); digitalWrite(LATCH_PIN, LOW); for (int i = 0; i < 3; i++) { shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, patternHigh); } digitalWrite(LATCH_PIN, HIGH); delay(1000); Serial.println("LOW"); digitalWrite(LATCH_PIN, LOW); for (int i = 0; i < 3; i++) { shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, patternLow); } digitalWrite(LATCH_PIN, HIGH); } #endif
but all signals are still low, what im doing wrong?
I don't know why but know it works
Helllo i buyed the MKS TinyBee for an Project and now im not able to Set the Output of some pins.
Here is what im try to do:
but all signals are still low, what im doing wrong?