forked from W4D/soundcube-firmware
alpha build
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build
|
||||
@ -4,8 +4,8 @@
|
||||
#include <PWMAudio.h>
|
||||
#include <I2S.h>
|
||||
|
||||
#define HAPTIC 0
|
||||
#define AURAL 0
|
||||
#define HAPTIC 1
|
||||
#define AURAL 1
|
||||
#define UI_SAMPLERATE 22050
|
||||
|
||||
I2S i2s(INPUT_PULLUP);
|
||||
@ -74,7 +74,8 @@ void setup() {
|
||||
Serial.println("SUCCESS");
|
||||
|
||||
// Rotary Encoder
|
||||
ENC.begin(4); // set direction pin.
|
||||
ENC.begin(); // set direction pin.
|
||||
ENC.setDirection(AS5600_COUNTERCLOCK_WISE);
|
||||
|
||||
pinMode(6, OUTPUT); // Vibration Motor
|
||||
pinMode(7, OUTPUT); // UI Amp Enable
|
||||
@ -104,6 +105,8 @@ void setup() {
|
||||
// }
|
||||
}
|
||||
int active = 0;
|
||||
int active_led_ring = 0;
|
||||
|
||||
uint32_t lastTime = 0;
|
||||
int32_t position = 0;
|
||||
|
||||
@ -177,6 +180,8 @@ void loop() {
|
||||
|
||||
ui_pixels.setPixelColor(active + 3 + 48 + 4, edge_pixels.Color(255, 255, 255));
|
||||
|
||||
active_led_ring = abs((position / 256) % 48);
|
||||
ui_pixels.setPixelColor(active_led_ring + 3, edge_pixels.Color(255, 255, 255));
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
edge_pixels.show(); // Set all pixel colors to 'off'
|
||||
|
||||
Reference in New Issue
Block a user