feat: fixed some pins, added RESET pins for each device
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// I2C pins
|
||||
#define SDA_PIN 21
|
||||
#define SCL_PIN 22
|
||||
|
||||
// I2C slave addresses
|
||||
#define SLAVE_ONE_ADDRESS 0x08
|
||||
#define SLAVE_TWO_ADDRESS 0x09
|
||||
#define SLAVE_THREE_ADDRESS 0x0A
|
||||
#define SLAVE_FOUR_ADDRESS 0x0B
|
||||
#define SLAVE_FIVE_ADDRESS 0x0C
|
||||
|
||||
// Buttons pins
|
||||
#define PLAYER_ONE_BUTTON_PIN 32
|
||||
#define PLAYER_ONE_A_BUTTON_PIN 33
|
||||
#define PLAYER_ONE_B_BUTTON_PIN 25
|
||||
#define PLAYER_ONE_C_BUTTON_PIN 26
|
||||
|
||||
#define PLAYER_TWO_BUTTON_PIN 27
|
||||
#define PLAYER_TWO_A_BUTTON_PIN 14
|
||||
#define PLAYER_TWO_B_BUTTON_PIN 12
|
||||
#define PLAYER_TWO_C_BUTTON_PIN 13
|
||||
|
||||
// LEDs pins and configuration
|
||||
#define LED_DATA_PIN 5
|
||||
#define LED_COUNT 29
|
||||
#define BRIGHTNESS 64
|
||||
#define LED_TYPE WS2812B
|
||||
#define COLOR_ORDER GRB
|
||||
+1
-27
@@ -1,33 +1,7 @@
|
||||
#include <Arduino.h>
|
||||
#include <Wire.h>
|
||||
#include <FastLED.h>
|
||||
|
||||
#define SDA_PIN 21
|
||||
#define SCL_PIN 22
|
||||
|
||||
#define SLAVE_ONE_ADDRESS 0x08
|
||||
#define SLAVE_TWO_ADDRESS 0x09
|
||||
#define SLAVE_THREE_ADDRESS 0x0A
|
||||
#define SLAVE_FOUR_ADDRESS 0x0B
|
||||
#define SLAVE_FIVE_ADDRESS 0x0C
|
||||
|
||||
// Buttons pins
|
||||
#define PLAYER_ONE_BUTTON_PIN 32
|
||||
#define PLAYER_ONE_A_BUTTON_PIN 33
|
||||
#define PLAYER_ONE_B_BUTTON_PIN 25
|
||||
#define PLAYER_ONE_C_BUTTON_PIN 26
|
||||
|
||||
#define PLAYER_TWO_BUTTON_PIN 27
|
||||
#define PLAYER_TWO_A_BUTTON_PIN 14
|
||||
#define PLAYER_TWO_B_BUTTON_PIN 12
|
||||
#define PLAYER_TWO_C_BUTTON_PIN 13
|
||||
|
||||
// LEDs pins and configuration
|
||||
#define LED_DATA_PIN 5
|
||||
#define LED_COUNT 29
|
||||
#define BRIGHTNESS 64
|
||||
#define LED_TYPE WS2812B
|
||||
#define COLOR_ORDER GRB
|
||||
#include <Conts.h>
|
||||
|
||||
CRGB leds[LED_COUNT];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user