Skip to content

Commit cbf8651

Browse files
authored
Merge pull request #10 from ladyada/ladyada-patch-2
attempt 3 at 1am!
2 parents fe61408 + a7cb57b commit cbf8651

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

adafruit_trellism4.py

-27
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@
4444

4545
import board
4646
import digitalio
47-
import busio
4847
import neopixel
4948
import adafruit_matrixkeypad
50-
import adafruit_adxl34x
5149

5250
__version__ = "0.0.0-auto.0"
5351
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_TrellisM4.git"
@@ -187,10 +185,6 @@ class TrellisM4Express:
187185
def __init__(self, rotation=0):
188186
self._rotation = rotation
189187

190-
# Define accelerometer
191-
i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
192-
self._adxl345 = adafruit_adxl34x.ADXL345(i2c)
193-
194188
# Define NeoPixels
195189
self.pixels = _NeoPixelArray(board.NEOPIXEL, width=8, height=4, rotation=rotation)
196190
"""Sequence like object representing the 32 NeoPixels on the Trellis M4 Express, Provides a
@@ -301,24 +295,3 @@ def pressed_keys(self):
301295
current_press = pressed
302296
"""
303297
return self._matrix.pressed_keys
304-
305-
@property
306-
def acceleration(self):
307-
"""Obtain data from the x, y and z axes.
308-
309-
This example prints the values. Try moving the board to see how the
310-
printed values change.
311-
312-
.. code-block:: python
313-
314-
import time
315-
import adafruit_trellism4
316-
317-
trellis = adafruit_trellism4.TrellisM4Express()
318-
319-
while True:
320-
x, y, z = trellis.acceleration
321-
print(x, y, z)
322-
time.sleep(0.1)
323-
"""
324-
return self._adxl345.acceleration

examples/trellism4_acceleration.py

-9
This file was deleted.

0 commit comments

Comments
 (0)