Compare commits

..

1 commit

Author SHA1 Message Date
dherrada
499e8d4658 Fixed discord invite link 2020-07-08 16:49:04 -04:00
3 changed files with 6 additions and 3 deletions

View file

@ -6,7 +6,7 @@ Introduction
:alt: Documentation Status
.. image:: https://img.shields.io/discord/327254708534116352.svg
:target: https://discord.gg/nBQh6qu
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_BluefruitSPI/workflows/Build%20CI/badge.svg

View file

@ -51,6 +51,7 @@ from digitalio import Direction, Pull
from adafruit_bus_device.spi_device import SPIDevice
from micropython import const
# pylint: disable=bad-whitespace
_MSG_COMMAND = const(0x10) # Command message
_MSG_RESPONSE = const(0x20) # Response message
_MSG_ALERT = const(0x40) # Alert message
@ -83,6 +84,8 @@ _ERROR_UNSUPPORTED = const(0x8063) # AT: Unsupported command
_PACKET_BUTTON_LEN = const(5)
_PACKET_COLOR_LEN = const(6)
# pylint: enable=bad-whitespace
class BluefruitSPI:
"""Helper for the Bluefruit LE SPI Friend"""
@ -247,7 +250,7 @@ class BluefruitSPI:
return rsp
raise RuntimeError("Unknown response (id:{0})".format(hex(msgid)))
except RuntimeError as error:
raise RuntimeError("AT command failure: " + repr(error)) from error
raise RuntimeError("AT command failure: " + repr(error))
def command_check_OK(self, command, delay=0.0): # pylint: disable=invalid-name
"""Send a fully formed bytestring AT command, and check

View file

@ -5,8 +5,8 @@ import time
import busio
import board
from digitalio import DigitalInOut
import neopixel
from adafruit_bluefruitspi import BluefruitSPI
import neopixel
ADVERT_NAME = b"BlinkaNeoLamp"