Skip to content

examples: Use board.I2C() #65

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 1 commit into from
May 12, 2021
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
5 changes: 2 additions & 3 deletions examples/seesaw_crickit_test.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

from board import SCL, SDA
import busio
import board
from adafruit_motor import servo
from adafruit_seesaw.seesaw import Seesaw
from adafruit_seesaw.pwmout import PWMOut

# from analogio import AnalogOut
# import board

i2c_bus = busio.I2C(SCL, SDA)
i2c_bus = board.I2C()
ss = Seesaw(i2c_bus)
pwm1 = PWMOut(ss, 17)
pwm2 = PWMOut(ss, 16)
Expand Down
5 changes: 2 additions & 3 deletions examples/seesaw_joy_featherwing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import time

from board import SCL, SDA
import busio
import board
from micropython import const

from adafruit_seesaw.seesaw import Seesaw
Expand All @@ -22,7 +21,7 @@
| (1 << BUTTON_SEL)
)

i2c_bus = busio.I2C(SCL, SDA)
i2c_bus = board.I2C()

ss = Seesaw(i2c_bus)

Expand Down
3 changes: 1 addition & 2 deletions examples/seesaw_rotary_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
# SPDX-License-Identifier: MIT

import board
import busio
from adafruit_seesaw.seesaw import Seesaw
from adafruit_seesaw.digitalio import DigitalIO

i2c_bus = busio.I2C(board.SCL, board.SDA)
i2c_bus = board.I2C()

seesaw = Seesaw(i2c_bus, addr=0x36)

Expand Down
5 changes: 2 additions & 3 deletions examples/seesaw_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
# https://learn.adafruit.com/adafruit-seesaw-atsamd09-breakout?view=all#circuitpython-wiring-and-test
import time

from board import SCL, SDA
import busio
import board
from adafruit_seesaw.seesaw import Seesaw

i2c_bus = busio.I2C(SCL, SDA)
i2c_bus = board.I2C()

ss = Seesaw(i2c_bus)

Expand Down
5 changes: 2 additions & 3 deletions examples/seesaw_soil_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@

import time

from board import SCL, SDA
import busio
import board

from adafruit_seesaw.seesaw import Seesaw

i2c_bus = busio.I2C(SCL, SDA)
i2c_bus = board.I2C()

ss = Seesaw(i2c_bus, addr=0x36)

Expand Down