Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions TinyPod/code.py → BLE_Apple_Watch_Controller/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@
# while BLE connected
while ble.connected:
position = encoder.position
# if the encoder is turned to the right
if position > last_position:
kbd.send(Keycode.RIGHT_ARROW)
# if the encoder is turned to the left
if position < last_position:
kbd.send(Keycode.LEFT_ARROW)
# reset encoder position
if position != last_position:
# if the encoder is turned to the right
if position > last_position:
kbd.send(Keycode.RIGHT_ARROW)
# if the encoder is turned to the left
if position < last_position:
kbd.send(Keycode.LEFT_ARROW)
# reset encoder position
last_position = position
print(f"Position: {position}")
for b in range(5):
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-FileCopyrightText: 2022 Limor Fried for Adafruit Industries
//
// SPDX-License-Identifier: MIT

#include <Arduino.h>
#include <Adafruit_NeoPixel.h>
#include "Adafruit_TestBed.h"

extern Adafruit_TestBed TB;

void setup() {
Serial.begin(115200);
// while (! Serial) delay(10);

delay(100);

TB.neopixelPin = PIN_NEOPIXEL;
TB.neopixelNum = 1;
TB.begin();
TB.setColor(WHITE);
}

uint8_t j = 0;

void loop() {

if (j % 10 == 0) {
TB.printI2CBusScan();
}
TB.setColor(TB.Wheel(j++));
delay(100);
return;
}
Loading