Compare commits
4 commits
master
...
remove-bad
| Author | SHA1 | Date | |
|---|---|---|---|
| cd006d3e7c | |||
| 6fe1c80520 | |||
| f179ce0645 | |||
| 5f81ba51b5 |
2 changed files with 2 additions and 5 deletions
|
|
@ -51,7 +51,6 @@ from digitalio import Direction, Pull
|
||||||
from adafruit_bus_device.spi_device import SPIDevice
|
from adafruit_bus_device.spi_device import SPIDevice
|
||||||
from micropython import const
|
from micropython import const
|
||||||
|
|
||||||
# pylint: disable=bad-whitespace
|
|
||||||
_MSG_COMMAND = const(0x10) # Command message
|
_MSG_COMMAND = const(0x10) # Command message
|
||||||
_MSG_RESPONSE = const(0x20) # Response message
|
_MSG_RESPONSE = const(0x20) # Response message
|
||||||
_MSG_ALERT = const(0x40) # Alert message
|
_MSG_ALERT = const(0x40) # Alert message
|
||||||
|
|
@ -84,8 +83,6 @@ _ERROR_UNSUPPORTED = const(0x8063) # AT: Unsupported command
|
||||||
_PACKET_BUTTON_LEN = const(5)
|
_PACKET_BUTTON_LEN = const(5)
|
||||||
_PACKET_COLOR_LEN = const(6)
|
_PACKET_COLOR_LEN = const(6)
|
||||||
|
|
||||||
# pylint: enable=bad-whitespace
|
|
||||||
|
|
||||||
|
|
||||||
class BluefruitSPI:
|
class BluefruitSPI:
|
||||||
"""Helper for the Bluefruit LE SPI Friend"""
|
"""Helper for the Bluefruit LE SPI Friend"""
|
||||||
|
|
@ -250,7 +247,7 @@ class BluefruitSPI:
|
||||||
return rsp
|
return rsp
|
||||||
raise RuntimeError("Unknown response (id:{0})".format(hex(msgid)))
|
raise RuntimeError("Unknown response (id:{0})".format(hex(msgid)))
|
||||||
except RuntimeError as error:
|
except RuntimeError as error:
|
||||||
raise RuntimeError("AT command failure: " + repr(error))
|
raise RuntimeError("AT command failure: " + repr(error)) from error
|
||||||
|
|
||||||
def command_check_OK(self, command, delay=0.0): # pylint: disable=invalid-name
|
def command_check_OK(self, command, delay=0.0): # pylint: disable=invalid-name
|
||||||
"""Send a fully formed bytestring AT command, and check
|
"""Send a fully formed bytestring AT command, and check
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import time
|
||||||
import busio
|
import busio
|
||||||
import board
|
import board
|
||||||
from digitalio import DigitalInOut
|
from digitalio import DigitalInOut
|
||||||
from adafruit_bluefruitspi import BluefruitSPI
|
|
||||||
import neopixel
|
import neopixel
|
||||||
|
from adafruit_bluefruitspi import BluefruitSPI
|
||||||
|
|
||||||
ADVERT_NAME = b"BlinkaNeoLamp"
|
ADVERT_NAME = b"BlinkaNeoLamp"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue