Search found 13 matches

by cswiger
Tue Feb 09, 2016 11:45 pm
Forum: WiPy and CC3200 boards
Topic: Onewire and DS18B20
Replies: 42
Views: 56430

Re: Onewire and DS18B20

ds18b20 works here with the new onewire.py and latest firmware. Just using regular gnd and 3v3 vdd instead of GP1 and GP3, that did not work for me. 4k7 pullup. Reading in ice water got as low as 200, not a precision device. Looking forward to the LoRa device - why I'm brushing up on MicroPython :ge...
by cswiger
Tue Feb 09, 2016 8:31 pm
Forum: WiPy and CC3200 boards
Topic: os.urandom... isn't very random?
Replies: 6
Views: 9228

Re: os.urandom... isn't very random?

Collected about 4MB of os.urandom(1024) concatenated and ran this test (where ocassional low or high p values will occasionally occur in a good trng, that is, in another collection that one weak will go away and maybe another will appear elsewhere, it happens): chuck@pe1950b:~$ dieharder -a -f bigra...
by cswiger
Fri Oct 23, 2015 11:53 am
Forum: WiPy and CC3200 boards
Topic: Change in wifi behavior after update to 1.1.0
Replies: 4
Views: 5120

Re: Change in wifi behavior after update to 1.1.0

yes, hours of frustrated experimenting can save you minutes of reading :lol:
by cswiger
Thu Oct 22, 2015 11:53 pm
Forum: WiPy and CC3200 boards
Topic: Change in wifi behavior after update to 1.1.0
Replies: 4
Views: 5120

Change in wifi behavior after update to 1.1.0

My (admittedly sub-optimal) main.py wifi init script stopped working after update to 1.1.0. Took a while but traced it down to this: wifi = WLAN(WLAN.STA) wifi would still be in WLAN.AP mode and subsequent attempts to connect would error. This is working now: wifi = WLAN() wifi.mode(WLAN.STA) wifi.i...
by cswiger
Thu Oct 22, 2015 11:49 pm
Forum: WiPy and CC3200 boards
Topic: Timer example not working
Replies: 32
Views: 36610

Re: Timer example not working

Ok, we'll wait. Getting past the op error (by using freq=5) I've run into this before: >>> tim_ch.callback(handler=lambda t:led.toggle()) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: no such attribute >>> dir(tim_ch) ['freq', 'period', 'time', 'event_count',...
by cswiger
Thu Oct 22, 2015 11:42 pm
Forum: WiPy and CC3200 boards
Topic: Onewire and DS18B20
Replies: 42
Views: 56430

Re: Onewire and DS18B20

That makes sense - I juggled some things around and got what looks like it *should* work from what little I understand: http://swigerco.com/TempSensor_fixed-still-fails.jpg Just for comparison, here's an arduino rom scan, a lot tighter: http://swigerco.com/Arduino_ROM_SCAN.JPG The difference on the ...
by cswiger
Thu Oct 22, 2015 7:43 pm
Forum: WiPy and CC3200 boards
Topic: Timer example not working
Replies: 32
Views: 36610

Re: Timer example not working

I think you need to use a higher frequency than 2 - try 5 or more. The clock speed and max count are such that 5hz is about the lowest it can divide down to.

Mine's offline or I'd test it 8-)
by cswiger
Wed Oct 21, 2015 3:01 pm
Forum: WiPy and CC3200 boards
Topic: Setting pin alternate function
Replies: 16
Views: 13793

Re: Setting pin alternate function

Ha - thought I'd tried that somewhat obvious variation but guess not - that works! thanks. >>> p24 = Pin('GP24',Pin.ALT,alt=5) I'll readup on Timers to adapt it to GP24 as I don't see 25 on the pinout. This stab didn't work: >>> p24.alt_list() [('UART1_RX', 2), ('TIM3_CC0', 4), (' TIM0_PWM0 ', 5), (...
by cswiger
Tue Oct 20, 2015 9:34 pm
Forum: WiPy and CC3200 boards
Topic: Setting pin alternate function
Replies: 16
Views: 13793

Setting pin alternate function

Looking at the PWM example http://micropython.org/resources/docs/en/latest/wipy/wipy/quickref.html#pwm-pulse-width-modulation some things have changed - Pin.ALT instead of Pin.AF and I can do these: >>> p24 = Pin('GP24',Pin.ALT) >>> p24.alt_list() [('UART1_RX', 2), ('TIM3_CC0', 4), ('TIM0_PWM0', 5),...
by cswiger
Sun Oct 18, 2015 10:29 pm
Forum: WiPy and CC3200 boards
Topic: Onewire and DS18B20
Replies: 42
Views: 56430

Re: Onewire and DS18B20

Diving in with Lucien2K code - I'm seeing the presence pulse and reset returns true: >>> from tempsensor import TempSensor >>> from machine import Pin >>> p = Pin('GP1') >>> t = TempSensor(p) http://swigerco.com/ds18b20_init.JPG def reset(self): """ Perform the onewire reset function. Returns 1 if a...