Search found 7 matches

by deanr
Sun Feb 05, 2017 4:38 pm
Forum: Hardware Projects
Topic: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Replies: 27
Views: 15812

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

I was using an 8 Neopixel strip (Ywrobot Rainbow LED L8 V3) and the posted code on my pyboard (v1.8.7v 2017-01-08 PYPv1.1). It would only light the upper 7 units as if shifted up. I played with the code and the driver to understand this behavior and found that the first unit when lit (by accident) w...
by deanr
Thu Dec 03, 2015 12:52 am
Forum: General Discussion and Questions
Topic: Array copy m1=m2 works only on the first pass.
Replies: 12
Views: 3649

Re: Array copy m1=m2 works only on the first pass.

The number does seem to work as one when multiplied. It does print 0.0 with "v1.5-134-g5be60d6 on 2015-11-14" .
Just loaded "v1.5.1-58-gb4eccfd on 2015-12-03" and it prints the right answer. Thanks.
by deanr
Wed Dec 02, 2015 4:18 am
Forum: General Discussion and Questions
Topic: Array copy m1=m2 works only on the first pass.
Replies: 12
Views: 3649

Re: Array copy m1=m2 works only on the first pass.

I found a math quirk while reviewing my results. Try multiplying:
0.3117148*3.20806
This was supposed to be one in the identity matrix diagonal but showed up as 0.0
Any change in the lowest decimal gives a good answer. Strange bug.
by deanr
Sun Nov 29, 2015 6:19 pm
Forum: General Discussion and Questions
Topic: Array copy m1=m2 works only on the first pass.
Replies: 12
Views: 3649

Re: Array copy m1=m2 works only on the first pass.

I have a lot to learn before I understand this...
Thanks for the solution.
by deanr
Sun Nov 29, 2015 4:29 pm
Forum: General Discussion and Questions
Topic: Array copy m1=m2 works only on the first pass.
Replies: 12
Views: 3649

Re: Array copy m1=m2 works only on the first pass.

import pyb #Testing pyboard math speed. pyb.LED(3).on() #5x5 matrix y=A*X, X unknoown, coded A:Y:I, solved to I:X:Ainv, #This code may be shortened to solve only for X at minimal waste m2=[ [ 0.0 for i in range(11) ] for j in range(5) ] m1=[ [ 0.0 for i in range(11) ] for j in range(5) ] m2=[[2.3,5...
by deanr
Sat Nov 28, 2015 10:32 pm
Forum: General Discussion and Questions
Topic: Array copy m1=m2 works only on the first pass.
Replies: 12
Views: 3649

Re: Array copy m1=m2 works only on the first pass.

Same behavior with m1=list(m2). I will try to load the entire code import pyb #Testing pyboard math speed. pyb.LED(3).on() #5x5 matrix y=A*X, X unknoown, coded A:Y:I, solved to I:X:Ainv, #This code may be shortened to solve only for X at minimal waste m2=[ [ 0.0 for i in range(11) ] for j in range(5...
by deanr
Sat Nov 28, 2015 5:40 am
Forum: General Discussion and Questions
Topic: Array copy m1=m2 works only on the first pass.
Replies: 12
Views: 3649

Array copy m1=m2 works only on the first pass.

First I am just learning python and playing with my pyboard. To understand the capabilities of the pyboard I run a 5x5 matrix inversion program a large number of times (and get a measurable delay) and at the end compare one of the result values to the known answer and light the green LED if it match...