update DH sketch
This commit is contained in:
parent
67cd82f168
commit
05b99a6da0
@ -1,11 +0,0 @@
|
|||||||
#include "LED_PCA9655E.h"
|
|
||||||
|
|
||||||
void LED_PCA9655E::on()
|
|
||||||
{
|
|
||||||
refPort.write(pin, HIGH);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LED_PCA9655E::off()
|
|
||||||
{
|
|
||||||
refPort.write(pin, LOW);
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
#ifndef LED_PCA9655E_H
|
|
||||||
#define LED_PCA9655E_H
|
|
||||||
#include <Arduino.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <Wire.h>
|
|
||||||
#include <LED.h>
|
|
||||||
#include <PortPCA9655E.h>
|
|
||||||
|
|
||||||
/* A LED_PCA9655E object is an PCA9655E pin that is connected to an LED indicator light.
|
|
||||||
Input/Ouput Direction configuration are set to ouput in PortPCA9655E.begin() and PortRead_PCA9655E.begin().
|
|
||||||
*/
|
|
||||||
class LED_PCA9655E: public LED
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
PortPCA9655E& refPort;
|
|
||||||
const uint8_t pin; //bit pattern, IOE pin to LED
|
|
||||||
|
|
||||||
public:
|
|
||||||
LED_PCA9655E(PortPCA9655E& refPort, const uint8_t pin) : refPort(refPort), pin(pin) {}
|
|
||||||
virtual void on();
|
|
||||||
virtual void off();
|
|
||||||
};
|
|
||||||
#endif
|
|
@ -35,7 +35,7 @@ This layout table shows left and right matrices:
|
|||||||
// ============ SPEED CONFIGURATION ============
|
// ============ SPEED CONFIGURATION ============
|
||||||
ScanDelay scanDelay(9000);
|
ScanDelay scanDelay(9000);
|
||||||
|
|
||||||
// ================= LEFT PINS =================
|
// ==================== IC =====================
|
||||||
// ---------------- LEFT SCANNER ---------------
|
// ---------------- LEFT SCANNER ---------------
|
||||||
uint8_t readPins[] = {14, 15};
|
uint8_t readPins[] = {14, 15};
|
||||||
const uint8_t readPinCount = sizeof(readPins)/sizeof(*readPins);
|
const uint8_t readPinCount = sizeof(readPins)/sizeof(*readPins);
|
||||||
@ -45,7 +45,6 @@ Scanner_uC scanner_L(LOW, readPins, readPinCount);
|
|||||||
// ----------------- LEFT LEDs -----------------
|
// ----------------- LEFT LEDs -----------------
|
||||||
LED_uC LED_CapsLck(21);
|
LED_uC LED_CapsLck(21);
|
||||||
|
|
||||||
// ================ RIGHT PINS =================
|
|
||||||
// --------------- RIGHT SCANNER ---------------
|
// --------------- RIGHT SCANNER ---------------
|
||||||
const uint8_t IOE_ADDR = 0x20; //MCP23S17 address, all 3 ADDR pins are grounded
|
const uint8_t IOE_ADDR = 0x20; //MCP23S17 address, all 3 ADDR pins are grounded
|
||||||
PortMCP23S17 portA(IOE_ADDR, 0, 1<<0 | 1<<1 ); //for read and LED
|
PortMCP23S17 portA(IOE_ADDR, 0, 1<<0 | 1<<1 ); //for read and LED
|
||||||
|
Reference in New Issue
Block a user