Skip to content

updated travis.yml #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2018
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ python:
cache:
pip: true
deploy:
provider: releases
- provider: releases
api_key: "$GITHUB_TOKEN"
file_glob: true
file: "$TRAVIS_BUILD_DIR/bundles/*"
Expand Down
2 changes: 1 addition & 1 deletion examples/adc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
# Author: Tony DiCola
import time
import board
import busio
import adafruit_lis3dh


# Uncomment _one_ of the hardware setups below depending on your wiring:

# Hardware I2C setup:
import busio
i2c = busio.I2C(board.SCL, board.SDA)
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c)

Expand Down
3 changes: 2 additions & 1 deletion examples/lis3dh_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
# Author: Tony DiCola
import time
import board
import busio
import adafruit_lis3dh


# Uncomment _one_ of the hardware setups below depending on your wiring:

# Hardware I2C setup. Use the CircuitPlayground built-in accelerometer if available;
# otherwise check I2C pins.
import busio
# pylint: disable=no-member
if hasattr(board, 'ACCELEROMETER_SCL'):
i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19)
Expand Down
5 changes: 3 additions & 2 deletions examples/spinner.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
import board
import busio

from micropython import const

import adafruit_lis3dh
import neopixel

from micropython import const

# Configuration:
ACCEL_RANGE = adafruit_lis3dh.RANGE_16_G # Accelerometer range.
TAP_THRESHOLD = 20 # Accelerometer tap threshold. Higher values
Expand Down Expand Up @@ -55,6 +55,7 @@ def get_position(self, delta):
return self._position


# pylint: disable=no-member
# Initialize NeoPixels and accelerometer.
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, auto_write=False)
pixels.fill((0, 0, 0))
Expand Down
6 changes: 4 additions & 2 deletions examples/spinner_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
import busio
import digitalio

from micropython import const

import adafruit_lis3dh
import neopixel

from micropython import const

# Configuration:
ACCEL_RANGE = adafruit_lis3dh.RANGE_16_G # Accelerometer range.
TAP_THRESHOLD = 20 # Accelerometer tap threshold. Higher values
Expand Down Expand Up @@ -134,6 +134,7 @@ def update(self, position, primary, secondary):
self._pixels[pos] = primary
self._pixels.show()


class SmoothAnimation:

def __init__(self, pixels, frequency=2.0):
Expand Down Expand Up @@ -162,6 +163,7 @@ def update(self, position, primary, secondary):
self._pixels.show()


# pylint: disable=no-member
# Initialize and turn off NeoPixels.
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, auto_write=False)
pixels.fill((0, 0, 0))
Expand Down
3 changes: 2 additions & 1 deletion examples/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
# Open the serial port after running to see the output printed.
# Author: Tony DiCola
import board
import adafruit_lis3dh
import busio
import digitalio
import adafruit_lis3dh


# Uncomment _one_ of the hardware setups below depending on your wiring:

# Hardware I2C setup. Use the CircuitPlayground built-in accelerometer if available;
# otherwise check I2C pins.
# pylint: disable=no-member
if hasattr(board, 'ACCELEROMETER_SCL'):
i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
int1 = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT)
Expand Down