Search found 2 matches

by spaceman_spiff
Thu Feb 12, 2015 2:07 am
Forum: MicroPython pyboard
Topic: SPI with PullUp?
Replies: 2
Views: 3762

Re: SPI with PullUp?

Scott, have you tried

Code: Select all

pin.init(Pin.AF_PP, pull=Pin.PULL_UP, af=Pin.AF5_SPI1)
? I got the

Code: Select all

Pin.AF5_SPI1
value from running

Code: Select all

pin.p.af_list()
on the appropriate pin (X8 for SPI1 MOSI). I'm not sure if the pull-up and SPI output modes are compatible, but it's worth a try.

M
by spaceman_spiff
Thu Feb 12, 2015 1:42 am
Forum: General Discussion and Questions
Topic: Class inheritance considered harmful?
Replies: 2
Views: 3512

Class inheritance considered harmful?

Hello everyone, I'm writing a small utility class for the SRF08 and SFR10 ultrasonic rangefinders which is based on the pyb.I2C implementation. Since I'm trying to accommodate the possibility of using multiple sensors I'd like to inherit from a sensor base class so I can eliminate code duplication. ...