-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove unfinished examples; black update
- Loading branch information
Showing
7 changed files
with
1 addition
and
149 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +0,0 @@ | ||
# Bluefruit Playground server program, to run on CLUE | ||
|
||
from adafruit_service import AdafruitServerAdvertisement | ||
|
||
from adafruit_service.accelerometer_service import AccelerometerService | ||
from adafruit_service.addressable_pixel_service import AddressablePixelService | ||
from adafruit_service.barometric_pressure_service import BarometricPressureService | ||
from adafruit_service.button_service import ButtonService | ||
from adafruit_service.gyroscope_service import GyroscopeService | ||
from adafruit_service.humidity_service import HumidityService | ||
from adafruit_service.light_sensor_service import LightSensorService | ||
from adafruit_service.magnetometer_service import MagnetometerService | ||
from adafruit_service.temperature_service import TemperatureService | ||
|
||
adv = BluefruitPlaygroundAdvertisement() | ||
# Adafruit Circuit Playground Bluefruit USB PID: | ||
adv.pid = 0x8046 *********** CHANGE | ||
|
||
while True: | ||
# Advertise when not connected. | ||
ble.start_advertising(advertisement) | ||
while not ble.connected: | ||
pass | ||
ble.stop_advertising() | ||
|
||
|
||
while ble.connected: | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +0,0 @@ | ||
# For use on a Circuit Playground Bluefruit. | ||
# Easily tested withe the Bluefruit Playground app. | ||
|
||
# Act as a BLE peripheral. Provide all possible adafruit_services services. | ||
|
||
import board | ||
import neopixel | ||
from adafruit_ble import BLERadio | ||
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement | ||
|
||
class AdafruitService | ||
|
||
def update(): | ||
|
||
|
||
|
||
|
||
def run(): | ||
ble = BLERadio() | ||
advertisement = ProvideServicesAdvertisement(uart_server) | ||
|
||
while True: | ||
# Advertise when not connected. | ||
ble.start_advertising(advertisement) | ||
while not ble.connected: | ||
pass | ||
ble.stop_advertising() | ||
|
||
while ble.connected: | ||
update() | ||
packet = Packet.from_stream(uart_server) | ||
if isinstance(packet, ColorPacket): | ||
print(packet.color) | ||
pixels.fill(packet.color) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters